Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Latest commit

 

History

History

eslint-config

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@azimutlabs/eslint-config

Sharable ESLint configurations used in our projects.

We assume that you already have eslint package installed.

Available configurations

  • legacy - default lint rules with some plugin extensions.
    • required libs: babel-eslint eslint-plugin-import, eslint-plugin-array-func, eslint-plugin-functional, eslint-plugin-simple-import-sort
    • required libs for typescript: @typescript-eslint/parser, @typescript-eslint/eslint-plugin
    • download command: npm i -D babel-eslint eslint-plugin-import eslint-plugin-array-func eslint-plugin-functional eslint-plugin-simple-import-sort @typescript-eslint/parser @typescript-eslint/eslint-plugin
  • prettier - prettier config for eslint.
    • required libs: prettier, eslint-config-prettier, eslint-plugin-prettier
    • download command: npm i -D prettier eslint-config-prettier eslint-plugin-prettier
  • jest - jest specific rules.
    • required libs: eslint-plugin-jest
    • download command: npm i -D eslint-plugin-jest
  • react - react specific rules with extensions.
    • required libs: eslint-plugin-react, eslint-plugin-react-hooks
    • download command: npm i -D eslint-plugin-react eslint-plugin-react-hooks
  • a11y - jsx accessibility.
    • required libs: eslint-plugin-jsx-a11y
    • download command: npm i -D eslint-plugin-jsx-a11y

Recommended usage

Extending ALL configs via package.json:

{
  "eslintConfig": {
    "extends": [
      "@azimutlabs"
    ]
  }
}

Extending configs separately:

{
  "eslintConfig": {
    "extends": [
      "@azimutlabs/eslint-config/legacy",
      "@azimutlabs/eslint-config/prettier",
      "@azimutlabs/eslint-config/react"
    ]
  }
}