@verticalstrategy/tslint-config
v1.0.0-alpha.1
Published
TSLint configurations used by us in Rise, we thought you might love them too.
Downloads
3
Readme
@risedigital/tslint-config
TSLint configurations used by us in Rise, we thought you might love them too.
Setup
Quick one-liner (install & configuration)
Installs @verticalstrategy/tslint-config
plus dependencies, and sets up the default tslint.json
(Warning: this will overwrite an existing tslint.json
)
yarn add --dev @verticalstrategy/tslint-config && \
printf '%s\n %s\n%s' \
"{" \
"\"extends\": \"@verticalstrategy/tslint-config\"" \
"}" \
> tslint.json
Install
yarn add --dev @verticalstrategy/tslint-config
This installs the necessary packages: tslint
, prettier
etc...
Configuration
Any overwrting of rules, is done in the normal tslint way.
Current supported packages
By default standard
& prettier
is included in the config.
- Config is extended with React support (
tslint-react
), ifpackage.json
includesreact
Editor integration setup
Generally we want the editor to lint (run tslint
) while typing, and fix errors (e.g. run tslint --fix
) on save.
Here are some extensions/packages for various editors (please extend with you favorite editor):
Visual Studio Code
Use/add the following configuration in your User Settings
:
{
"tslint.autoFixOnSave": true,
"[typescript]": {
"editor.formatOnSave": false,
},
"[typescriptreact]": {
"editor.formatOnSave": false,
},
}