Migration from v2 to v3
Stylistic ESLint which forms the core of this package, no longer supports legacy configurations starting from v4+. Additionally, ESLint v8.57.1 and below are now deprecated, making it unlikely for this package to receive further major updates.
🚨 Recommended Action: Upgrade to ESLint v9
To ensure compatibility, continued updates, and improved linting performance, it is strongly advised to upgrade your project to ESLint v9.
For migration steps, refer to: ESLint v9 Migration Guide.
What's Changed ?
Similar to the flat-config, this package has been modularized into independent components, allowing developers to apply framework-specific rules based on their project setup.
js: Eslint and stylistic rules for javascriptts: TypeScript-specific rules, including stylistic and typescript-eslintjsx: Rules for React, React Hooks, JSX A11y, and stylistic JSXnext: JSX rules designed for use alongside theeslint-plugin-nextpackagenext-ts: Typescript-eslint and Stylistic-ts rules tailored for Next.js apps.
Code Change
The react module import from v2 has been renamed to jsx, while the typescript rules from next module have been consolidated under the next-ts module.
Node.js
If you are using typescript in your project, add the ts module from this package.
{
"extends": [
"@nish1896/eslint-config/js",
+ "@nish1896/eslint-config/ts"
]
}
React & Vite
Add the ts module from this package, if your application uses typescript.
{
"extends": [
"@nish1896/eslint-config/js",
+ "@nish1896/eslint-config/ts"
- "@nish1896/eslint-config/react"
+ "@nish1896/eslint-config/jsx"
]
}
Next.js
Add the next-ts module from this package, if your application uses typescript.
module.exports = {
extends: [
"@nish1896/eslint-config/js",
+ "@nish1896/eslint-config/next-ts",
"@nish1896/eslint-config/next"
]
}