@gravity-ui/eslint-config

3.2.0 • Public • Published

@gravity-ui/eslint-config

Install

npm install --save-dev eslint @gravity-ui/eslint-config

Usage

Add .eslintrc file in the project root with the following content:

{
  "extends": "@gravity-ui/eslint-config",
  "root": true
}

Add client and server config files in corresponding directories:

{
  "extends": "@gravity-ui/eslint-config/server"
}
{
  "extends": "@gravity-ui/eslint-config/client"
}

Prettier

If you are using Prettier, extend root config with the additional rules:

{
  "extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/prettier"],
  "root": true
}

a11y

If you want to spot accessibility issues, extend root config with the additional rules:

{
  "extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/a11y"],
  "root": true
}

Order

if you want to enforce a convention in module import order, extend root config with the additional rules:

{
  "extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/import-order"],
  "root": true
}

Readme

Keywords

Package Sidebar

Install

npm i @gravity-ui/eslint-config

Weekly Downloads

1,427

Version

3.2.0

License

MIT

Unpacked Size

16.4 kB

Total Files

12

Last publish

Collaborators

  • gravity-ui-bot
  • amje
  • resure