Shared tslint config
reusable tslint config
Usage
npm i -D tslint @namics/tslint-config
tslint.json
{
"defaultSeverity": "error",
"extends": ["@namics/tslint-config"],
"jsRules": {},
"rules": {},
"rulesDirectory": []
}
package.json
...
"scripts": {
"lint:ts": "tslint 'src/**/*.{ts,tsx}'",
...
},
...
Usage with prettier
The tslint-config-prettier
npm package disables all conflicting rules that may cause such problems. Prettier takes care of the formatting whereas tslint takes care of all the other things.
npm i -D tslint tslint-config-prettier @namics/tslint-config
tslint.json
{
"defaultSeverity": "error",
"extends": ["@namics/tslint-config", "tslint-config-prettier"],
"jsRules": {},
"rules": {},
"rulesDirectory": []
}
package.json
...
"scripts": {
"lint:ts": "tslint 'src/**/*.{ts,tsx}'",
...
},
...
See @namics/tslint-config on unpkg