1.0.0-alpha.1 • Published 7 years ago
@verticalstrategy/tslint-config v1.0.0-alpha.1
@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.jsonInstall
yarn add --dev @verticalstrategy/tslint-configThis 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.jsonincludesreact
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,
},
}1.0.0-alpha.1
7 years ago