Skip to content

Instantly share code, notes, and snippets.

@joshdcuneo
Last active February 13, 2019 10:51
Show Gist options
  • Save joshdcuneo/1eda323bb1282429389f5a26ab9d628b to your computer and use it in GitHub Desktop.
Save joshdcuneo/1eda323bb1282429389f5a26ab9d628b to your computer and use it in GitHub Desktop.
Typescript Linting Setup
{
"scripts": {
"tslint": "tslint -c tslint.json -p tsconfig.json"
},
"devDependencies": {
"tslint": "^5.12.1"
}
}
{
"rules": {
"class-name": true,
"comment-format": [true, "check-space"],
"indent": [true, "spaces"],
"one-line": [true, "check-open-brace", "check-whitespace"],
"no-var-keyword": true,
"quotemark": [true, "double", "avoid-escape"],
"semicolon": [true, "always", "ignore-bound-class-methods"],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-type"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
},
{
"call-signature": "onespace",
"index-signature": "onespace",
"parameter": "onespace",
"property-declaration": "onespace",
"variable-declaration": "onespace"
}
],
"no-internal-module": true,
"no-trailing-whitespace": true,
"no-null-keyword": true,
"prefer-const": true,
"jsdoc-format": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment