@couds/eslint-config
v1.0.0
Published
Shared ESLint 10 flat config for React and Node.js projects with Prettier integration. These are the rules I use across my personal projects.
Readme
@couds/eslint-config
Shared ESLint 10 flat config for React and Node.js projects with Prettier integration. These are the rules I use across my personal projects.
Requirements
- ESLint 10+ (flat config format)
- ESM project — your
eslint.config.jsmust useimport/export
Installation
npm install --save-dev @couds/eslint-config eslint @eslint/jseslint and @eslint/js are peer dependencies that your project must provide. typescript is bundled automatically (required internally by
@eslint-react).
Usage
React
// eslint.config.js
import reactConfig from '@couds/eslint-config/react';
export default [
...reactConfig,
// project-specific overrides
];Node.js
// eslint.config.js
import nodeConfig from '@couds/eslint-config/node';
export default [
...nodeConfig,
// project-specific overrides
];The default export (@couds/eslint-config) is an alias for the React config.
What's included
Both configs
@eslint/jsrecommended — ESLint core rules baselineeslint-plugin-import-xrecommended — import/export correctness (ESLint 10-native fork ofeslint-plugin-import)eslint-plugin-prettier— runs Prettier as an ESLint rule (prettier/prettier: error)eslint-config-prettier— disables ESLint rules that conflict with Prettier formatting
React only
@eslint-react/eslint-pluginrecommended — React and hooks correctness rules built for ESLint 10eslint-plugin-jsx-a11yrecommended — accessibility rules for JSX- Browser + Node globals, JSX parsing enabled
Node only
- Node globals only, no JSX
Notable rule overrides shared by both: arrow-body-style is enforced (always); no-console, max-len, no-underscore-dangle,
class-methods-use-this, and several import-x style rules are disabled.
Notes
- Flat config only —
.eslintrc.*files are not supported - The Airbnb config base and
react/function-component-definitionstyle rule were removed during the ESLint 10 migration
