Skip to main content
Version: 2.1

Migrate to eslint v9

To use eslint v9, make sure that the node version being used in your projection matches the criteria below as per eslint v9 migration docs.

  • Node.js v18.18.0 and above
  • Node.js v20.9.0 and above
  • Node.js v21 and above

Uninstall @nish1896/eslint-config.

npm uninstall @nish1896/eslint-config
OR
yarn remove @nish1896/eslint-config

Install @nish1896/eslint-flat-config.

npm i --save-dev @nish1896/eslint-flat-config
OR
yarn add -D @nish1896/eslint-flat-config

Delete the .eslintrc or .eslintrc.js or .eslintrc.json file and create eslint.config.mjs file.

touch eslint.config.mjs
note

The react folder import from @nish1896/eslint-config/react has been renamed in this package and will be imported as @nish1896/eslint-flat-config/jsx.

Add the following content to this file -

import jsEslintConfig from '@nish1896/eslint-flat-config/js';
import jsxEslintConfig from '@nish1896/eslint-flat-config/jsx';

export default [
...jsEslintConfig,
...jsxEslintConfig,
{
rules: {}
}
];