Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aivenio/eslint-config-aiven

Package Overview
Dependencies
Maintainers
0
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aivenio/eslint-config-aiven

ESLint configuration, following the styleguide of aiven.io

  • 7.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8K
increased by40.9%
Maintainers
0
Weekly downloads
 
Created
Source

eslint-config-aiven

Our internal ESLint and prettier configuration. We want to autoformat code like prettier does, but also do more static checks that eslint does. To do both, we use eslint-plugin-prettier and eslint acts as the frontend to check and autofix style and other issues.

The configuration is split into:

  • @aivenio/eslint-config-aiven
    • Recommended base configuration for TypeScript.
  • @aivenio/eslint-config-aiven/react
    • Base + React additions.
  • @aivenio/eslint-config-aiven/typescript-type-checked
  1. npm install @aivenio/eslint-config-aiven

  2. Create an .eslintrc file to your repository root and select which configuration to use:

{
  "extends": ["@aivenio/eslint-config-aiven"]
  // "extends": ["@aivenio/eslint-config-aiven/react", "@aivenio/eslint-config-aiven/typescript-type-checked"]
}

When using eslint-config-aiven/react, install the required peer dependencies: eslint-plugin-react, eslint-plugin-react-hooks and eslint-plugin-jsx-a11y.

  1. Setup npm scripts in package.json
  "eslint:fix": "eslint --config .eslintrc --fix \"src/**/*.{ts,tsx}\"",
  "eslint:check": "eslint --config .eslintrc \"src/**/*.{ts,tsx}\"",
  1. Remember to setup a CI task to lint source code. See .github/workflows/test.yml for a GH action example.

Install for React

  1. Follow all steps in "Install recommended base" first

  2. Install additional peer dependencies

npm i --save-dev eslint-plugin-jsx-a11y
npm i --save-dev eslint-plugin-react
  1. Change the .eslintrc in your repository to have the following contents:
{
  "extends": ["@aivenio/eslint-config-aiven/react"]
}

FAQs

Package last updated on 04 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc