@lego/tslint-config
Prerequisites
- don't use any of the configs as globally installed modules
Installation
Install this config package:
$ npm i -D @lego/tslint-config
Usage
Full Configurations
This package includes the following complete and ready to use configurations:
@lego/tslint-config
- Base config + Prettier@lego/tslint-config/lib/configurations/typescript
- Base Config + Prettier@lego/tslint-config/lib/configurations/typescript-react
- Base Config + React config + Prettier@lego/tslint-config/lib/configurations/typescript-react
- Base Config + Angular config + Prettier
add the above preferred configuration in your tslint.json file as f.ex:
{
"extends": "@lego/tslint-config"
}
Rules
This package currently implements rules from the following packages:
Overriding Rules
With the above tslint.json
configuration example, you can still use or override already defined
rules as such:
{
"extends": "@lego/tslint-config",
"rules": {
"no-submodule-imports": [true, "mobx", "mobx-react"]
}
}
It's recommended to inspect the defined rule's configuration where the reasoning for the
configuration lives. If a configuration could benefit more than just the project you're working on,
feel free to create a pull request.
Todo
- [] extract
typescript
config into @lego/tslint-config-typescript
- [] extract
typescript angular
config into @lego/tslint-config-angular
- [] add
rxjs
best practices - [] extract
typescript react
config into @lego/tslint-config-react