Run the following command to install the ESLint configuration for React projects:
npm install --save-dev @geops/eslint-config-react
Then, create a eslint.config.mjs
file in the root of your project with the following content:
import geopsFlatConfig from "@geops/eslint-config-react/flat";
export default [...geopsFlatConfig];
Then, create a .eslintrc.json
file in the root of your project with the following content:
{
"extends": ["@geops/eslint-config-react"]
}
If you have to updatethe list of custom rules DO NOT FORGET to add them in ./rules.js
files and in the flat/rules.mjs
file.