@quic-pro/eslint-config
Shareable ESLint config.
Installation
# Using npm
npm install --save-dev @quic-pro/eslint-config
# Using yarn
yarn add --dev @quic-pro/eslint-config
Required ESLint version >= 8
Configs
Available configs:
- default same as recommended
- recommended
- typescript
- react
Use the recommended config with other configs.
Usage
default
-
Add to your ESLint config:
{ "extends": [ "@quic-pro/eslint-config" ] }
Or you can also omit the eslint-config and it will be automatically assumed by ESLint:
{ "extends": [ "@quic-pro" ] }
recommended
-
Add to your ESLint config:
{ "extends": [ "@quic-pro/eslint-config/recommended" ] }
typescript
-
Install required dependencies:
#Using npm npm install --save-dev typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser # Using yarn yarn add --dev typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser
Required versions:
typescript >= 4
@typescript-eslint/eslint-plugin >= 5
@typescript-eslint/parser >= 5 -
Add to your ESLint config:
{ "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": "latest", "sourceType": "module", "project": "./tsconfig.json" }, "extends": [ "@quic-pro/eslint-config/recommended", "@quic-pro/eslint-config/typescript" ] }
react
-
Install required dependencies:
# Using npm npm install --save-dev eslint-config-react-app eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-simple-import-sort # Using yarn yarn add --dev eslint-config-react-app eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-simple-import-sort
Required versions:
eslint-config-react-app >= 7
eslint-plugin-jsx-a11y >= 6
eslint-plugin-react >= 7
eslint-plugin-react-hooks >= 4
eslint-plugin-simple-import-sort >= 8 -
Add to your ESLint config:
{ "extends": [ "@quic-pro/eslint-config/recommended", "@quic-pro/eslint-config/react" ] }
If you are using TypeScript with React then you can also add "@quic-pro/eslint-config/typescript". See instructions above.