ns8-tslint
These are the NS8 company-wide tslint rules to be used across all projects that use TypeScript.
Install in your project
- Be sure you have
typescript
and tslint
installed locally - Run
yarn add ns8-tslint --dev
- Add a file called
tslint.json
to the root of your project with the following JSON
{
"extends": "ns8-tslint"
}
- Running
tslint
in your project should now utilize these rules
A Note on Overrides
A rule-set listed later in the extends
array will override any common rules from
the sets that preceded it.
{
"extends": ["tslint-react", "ns8-tslint"]
}
In the example shown above:
If the rule "jsx-no-multiline-js": false,"
exists in tslint-react
and the competing rule "jsx-no-multiline-js": true,
exists in ns8-tslint
,
the rule from ns8-tslint
would be enforced because it was declared later in the
extends
array.