A fully customized ESLint configuration based on the default ESLint, React and TypeScript rules
-
ESLint rules:
-
React rules:
-
TypeScript rules:
-
Node rules:
-
Stylistic rules:
This package contains six
configurations for your usage:
- default: Consists of
all
the rules. - eslint: Consists of the
ESLint
rules. - react: Consists of the
React
rules. - typescript: Consists of the
TypeScript
rules. - node: Consists of the
Node
rules. - stylistic: Consists of the
Stylistic
rules.
The simplest usage is to extend the default configuration in your .eslintrc.json
as the followings:
{
"extends": "eslint-config-zoro"
}
You can also extend with any combination of the last five rules
, such as:
{
"extends": [
"eslint-config-zoro/eslint",
"eslint-config-zoro/react",
"eslint-config-zoro/stylistic",
"eslint-config-zoro/typescript"
]
}
This is the default configuration which contains all
the rules.
-
Install:
npm i -D eslint-config-zoro eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-node
-
Add to your
.eslintrc.json
file:{ "extends": "eslint-config-zoro" }
This configuration only contains the ESLint
rules.
-
Install:
npm i -D eslint-config-zoro eslint
-
Add to your
.eslintrc.json
file:{ "extends": "eslint-config-zoro/eslint" }
This configuration only contains the React
rules.
-
Install:
npm i -D eslint-config-zoro eslint eslint-plugin-react eslint-plugin-react-hooks
-
Add to your
.eslintrc.json
file:{ "extends": "eslint-config-zoro/react" }
This configuration only contains the TypeScript
rules.
-
Install:
npm i -D eslint-config-zoro eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
-
In your
.eslintrc.json
file, add:{ "extends": "eslint-config-zoro/typescript" }
This configuration only contains the Node
rules.
-
Install:
npm i -D eslint-config-zoro eslint eslint-plugin-node
-
In your
.eslintrc.json
file, add:{ "extends": "eslint-config-zoro/node" }
This configuration only contains the Stylistic
rules.
-
Install:
npm i -D eslint-config-zoro eslint @stylistic/eslint-plugin
-
In your
.eslintrc.json
file, add:{ "extends": "eslint-config-zoro/stylistic" }