Last active
June 3, 2019 13:49
-
-
Save WillSquire/514685caa134f6a8acce99dcafb36420 to your computer and use it in GitHub Desktop.
Setup linting for React Typescript projects. Install dependencies with `docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app node:alpine yarn add --dev tslint-config-airbnb tslint-react`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"hooks": { | |
"pre-commit": "yarn lint --fix && yarn test", | |
"pre-push": "yarn lint --fix && yarn test" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"extends": ["tslint-config-airbnb", "tslint-react"], | |
"rules": { | |
"eofline": true, | |
"indent": [true, "spaces", 2], | |
"no-trailing-whitespace": true, | |
"object-literal-sort-keys": false, | |
"ordered-imports": true, | |
"semicolon": [true, "never"], | |
"trailing-comma": [true, { | |
"multiline": "always", | |
"singleline": "never" | |
}], | |
"variable-name": [true, "ban-keywords", "check-format"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment