Netvor's shareable collection of configs for ESLint - Modern ESLint 9 Flat Config
This package has been completely modernized for ESLint 9, removing all legacy ESLint 8 components and using the new flat config format throughout.
- ⚛️ React 19 Optimized: Full support for React 19 features and best practices
- 🚀 ESLint 9.39+: Full support for ESLint 9's flat config system
- 📦 Modern Plugins: All plugins updated to latest versions
- 🎯 TypeScript v8: @typescript-eslint v8.46+ with full compatibility
- 🔧 Zero Deprecated Rules: Removed all deprecated formatting and React rules
- ⚡ Zero Legacy: No more .eslintrc.js files - pure flat config
- 🎨 Optional Styling: Formatting rules available via @stylistic plugin
# NPM
npm install --save-dev @ntvr/eslint-config
# Yarn
yarn add --dev @ntvr/eslint-configCreate eslint.config.js in your project root:
// eslint.config.js
const config = require('@ntvr/eslint-config');
module.exports = config;// eslint.config.js
const config = require('@ntvr/eslint-config/react.js');
module.exports = config;// eslint.config.js
const config = require('@ntvr/eslint-config/typescript.js');
module.exports = config;// eslint.config.js
const config = require('@ntvr/eslint-config/next.js');
module.exports = config;// eslint.config.js
const config = require('@ntvr/eslint-config/javascript.js');
module.exports = config;ESLint 9 and @typescript-eslint v8+ removed formatting rules like indent, max-len, and member-delimiter-style. If you need them:
- Install the stylistic plugin:
yarn add --dev @stylistic/eslint-plugin- Add to your config:
// eslint.config.js
const baseConfig = require('@ntvr/eslint-config');
const stylisticConfig = require('@ntvr/eslint-config/stylistic.js');
module.exports = [
...baseConfig,
stylisticConfig,
];- ESLint 9 Required: Must upgrade to ESLint 9.39+
- Flat Config Only: No more .eslintrc.js support
- Updated Dependencies: All plugins updated to latest versions
- Removed Formatting Rules: Use @stylistic plugin if needed
- Update ESLint:
yarn add --dev eslint@^9.39.0 - Remove .eslintrc.js: Delete legacy config files
- Create eslint.config.js: Use flat config format
- Update Scripts: Ensure package.json uses ESLint 9 commands
| File | Purpose |
|---|---|
eslint.config.js |
Main flat config (React + TypeScript optional) |
javascript.js |
JavaScript-only projects |
react.js |
React projects |
typescript.js |
TypeScript projects |
next.js |
Next.js projects |
stylistic.js |
Optional formatting rules |
index.js |
Alias to main config |
- ESLint: ^9.39.0
- Node.js: ^18.18.0 || ^20.9.0 || >=21.1.0
- TypeScript: >=4.8.0 (optional)
@typescript-eslint/eslint-plugin@^8.46.0eslint-plugin-react@^7.37.0eslint-plugin-react-hooks@^5.0.0eslint-plugin-import@^2.32.0eslint-plugin-jsx-a11y@^6.10.0