A fully customized ESLint configuration based on ESLint, Stylistic, TypeScript, React and Node rules.
npm i -D eslint-config-zoroThis package exports 5 different configuration files, allowing you to combine them freely to meet your needs.
- ESLint Configs: Consists of the ESLintrules, based on ESLint rules.
- Stylistic Configs: Consists of the Stylisticrules, based on Stylistic rules.
- TypeScript Configs: Consists of the TypeScriptrules, based on TypeScript rules.
- React Configs: Consists of the Reactrules, based on React rules and React Hooks rules.
- Node Configs: Consists of the Noderules, based on Node rules.
Since the eslintrc format is deprecated from ESLint v9.0.0 and will be completely removed in v10.0.0, you should use eslint.config.js to configure ESLint.
After migration, you can easily import and configure settings in your eslint.config.js file:
// eslint.config.js
import { ESLINT_CONFIGS } from "eslint-config-zoro/eslint";
export default [
  ...ESLINT_CONFIGS,
  {
    rules: {
        // Add your custom configurations here.
      "@stylistic/brace-style": ["error", "1tbs", { "allowSingleLine": true }],
      "@stylistic/indent-binary-ops": ["error", 2],
      "@stylistic/indent": ["error", 2, { "SwitchCase": 1 }]
    }
  }
];You can also customize by combining configuration files as needed, such as:
import { ESLINT_CONFIGS } from "eslint-config-zoro/eslint";
import { STYLISTIC_CONFIGS } from "eslint-config-zoro/stylistic";
import { TYPESCRIPT_CONFIGS } from "eslint-config-zoro/typescript";
export default [
  ...ESLINT_CONFIGS,
  ...STYLISTIC_CONFIGS,
  ...TYPESCRIPT_CONFIGS
];This configuration only contains the ESLint rules.
- 
Install: npm i -D eslint-config-zoro eslint 
- 
Add to your eslint.config.jsfile:// eslint.config.js import { ESLINT_CONFIGS } from "eslint-config-zoro/eslint"; export default [...ESLINT_CONFIGS]; 
This configuration only contains the Stylistic rules.
- 
Install: npm i -D eslint-config-zoro eslint @stylistic/eslint-plugin 
- 
Add to your eslint.config.jsfile:// eslint.config.js import { STYLISTIC_CONFIGS } from "eslint-config-zoro/stylistic"; export default [...STYLISTIC_CONFIGS]; 
This configuration only contains the TypeScript rules.
- 
Install: npm i -D eslint-config-zoro eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin 
- 
Add to your eslint.config.jsfile:// eslint.config.js import { TYPESCRIPT_CONFIGS } from "eslint-config-zoro/typescript"; export default [...TYPESCRIPT_CONFIGS]; 
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 eslint.config.jsfile:// eslint.config.js import { REACT_CONFIGS } from "eslint-config-zoro/react"; export default [...REACT_CONFIGS]; 
This configuration only contains the Node rules.
- 
Install: npm i -D eslint-config-zoro eslint eslint-plugin-n 
- 
Add to your eslint.config.jsfile:// eslint.config.js import { NODE_CONFIGS } from "eslint-config-zoro/node"; export default [...NODE_CONFIGS];