0.4.1 • Published 4 months ago
@topotal/eslint-config-react v0.4.1
@topotal/eslint-config-react
This is a common ESlint setting for React used within Topotal
Installation
yarn add -D @topotal/eslint-config-react
If your npm version is lower than v6, please also install the peerDependencies package.
yarn add -D eslint-plugin-react eslint-plugin-react-hooks
Usage
Legacy ESLint Configuration (ESLint v8 and below)
Add @topotal/eslint-config-react
to eslintrc
extends.
{
"extends": [
"@topotal/eslint-config-react"
]
}
Flat ESLint Configuration (ESLint v9 and above)
In your eslint.config.js
:
const topotalReactConfig = require('@topotal/eslint-config-react/flat');
// Or using the conditional exports (recommended)
// const { flat: topotalReactConfig } = require('@topotal/eslint-config-react');
module.exports = [
topotalReactConfig,
// other configs...
];