@lego/tslint-config-prettier
v3.0.0
Published
LEGO shareable tslint config for ts projects
Downloads
65
Readme
@lego/tslint-config-prettier
Purpose
This is a stand-alone all-round configuration that inherits prettier configurations from
@lego/prettier-config
and is tailored towards usage with tslint.
If you want to use your own tslint ruleset without the other packages like @lego/tslint-config
then you should install this package, otherwise refer to the aforementioned.
Installation
Install this config package:
npm i -D @lego/tslint-config-prettier
Usage
Extend your tslint.json
, and make sure @lego/tslint-config-prettier
is at the end:
{
"extends": ["tslint:latest", "@lego/tslint-config-prettier"]
}
Rules
This package currently implements rules from the following tslint extensions:
- https://github.com/prettier/tslint-config-prettier
Overriding Rules
With the above tslint.json
configuration example, you can still use or override already defined
rules as such:
{
"extends": ["tslint:latest", "@lego/tslint-config-prettier"],
"rules": {
"prettier": [true, {
"printWidth": 100,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always",
"proseWrap": "preserve"',
}],
}
}