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 add -D @zaiusinc/eslint-config-presets
npm install -D @zaiusinc/eslint-config-presets
Usage
After adding the package to your project, create or update your .eslintrc.mjs
file in the root of your project and extend the desired preset. For Node projects:
import node from '@zaiusinc/eslint-config-presets/node.mjs';
export default node;
and for React projects:
import node from '@zaiusinc/eslint-config-presets/react.mjs';
export default node;
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 situations you can ignore a single line with:
Start a discussion if you believe a change should be made to the preset for all projects.