1.2.0 • Published 3 years ago
@zaiusinc/tslint-presets v1.2.0
Zaius TSLint Presets
This NPM package includes Zaius's preferred TSLint rules for Node and React projects.
Installation
Install the package as a dev dependency using yarn or npm.
# yarn:
yarn add -D @zaiusinc/tslint-presets
# npm:
npm install -D @zaiusinc/tslint-presets
Usage
After adding the package to your project, create or update your tslint.json
file in the root of your project and extend the desired preset. For Node projects:
{
"extends": "@zaiusinc/tslint-presets/node.json",
"rules": {}
}
and for React projects:
{
"extends": "@zaiusinc/tslint-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:
// tslint:disable-next-line:rule-name
Start a discussion if you believe a change should be made to the preset for all projects.