@visuallylab/tslint-config-frontend
v1.0.13
Published
Lint rules related to web frontend development using React
Downloads
22
Readme
tslint-config-frontend
Lint rules related to web frontend development using React
Prerequisite
- tslint
- typescript
- prettier
Usage
Follow these steps to use the rules in tslint, and enable the pre-commit hook.
- Install the package
npm install --save-dev @visuallylab/tslint-config-frontend lint-staged husky
or
yarn add --dev @visuallylab/tslint-config-frontend lint-staged husky
- Add config in tslint.json
{
"extends": "@visuallylab/tslint-config-frontend"
}
- Add configs to the package.json of your project
{
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,tsx,js,json,css,md}": ["prettier --write", "git add"]
},
"prettier": {
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "all"
}
}