A rule set of RIDI's ESLint configurations based on Airbnb's.
Install @ridi/eslint-config
package:
- Install the correct versions of each package, which are listed by the command:
npm info "@ridi/eslint-config" peerDependencies
if using npm 5+, use this shortcut
npx install-peerdeps --dev @ridi/eslint-config
if using yarn, use this command
yarn add --peer --dev @ridi/eslint-config
- Install via package manager:
npm install --save-dev @ridi/eslint-config
or
yarn --dev @ridi/eslint-config
module.exports = {
extends: [
'@ridi/eslint-config'
]
}
- @typescript-eslint/eslint-plugin
- typescript
module.exports = {
extends: [
'@ridi/eslint-config',
'@ridi/eslint-config/typescript'
]
}
- eslint-plugin-import
- eslint-plugin-jsx-a11y
- eslint-plugin-react
- eslint-plugin-react-hooks
{
"extends": [
'@ridi/eslint-config',
'@ridi/eslint-config/react',
],
}
module.exports = {
extends: [
'@ridi/eslint-config',
'@ridi/eslint-config/typescript',
'@ridi/eslint-config/react'
]
}
- eslint-plugin-prettier
works fine with local configuration file (e.g. .prettierrc)
{
"extends": [
'@ridi/eslint-config',
'@ridi/eslint-config/prettier',
],
}