@zaiusinc/eslint-config-presets
v1.0.0
Published
Optimizely Data Platofrm preferred ESLint rules
Downloads
590
Keywords
Readme
Optimizely Data Platform ESLint Presets for TypeScript
This NPM package includes Optimizely Data Platform's preferred TypeScript ESLint rules for Node and React projects.
Installation
Install the package as a dev dependency using yarn or npm.
# yarn:
yarn add -D @zaiusinc/eslint-config-presets
# npm:
npm install -D @zaiusinc/eslint-config-presets
Usage
After adding the package to your project, create or update your .eslintrc.js
file in the root of your project and extend the desired preset. For Node projects:
module.exports = {
"extends": "@zaiusinc/eslint-config-presets/node.json",
"rules": {
}
}
and for React projects:
module.exports = {
"extends": "@zaiusinc/eslint-config-presets/react.json",
"rules": {
}
}
Best Practices and Overrides
Certain projects may need overrides to the presets. Overrides or additional rules can be added to the rules
object.
Please try to minimize overrides! For one-off situtations you can ignore a single line with:
// eslint-disable-next-line
Start a discussion if you believe a change should be made to the preset for all projects.