Created
May 17, 2018 14:43
-
-
Save jameshmread/1c9ebed9ee0d9517e35d2ac430b9356a to your computer and use it in GitHub Desktop.
My standard Typescript Ts-Lint rule set.
This file contains 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
{ | |
"rulesDirectory": [ | |
"node_modules/tslint-eslint-rules/dist/rules" | |
], | |
"rules": { | |
"arrow-return-shorthand": true, | |
"callable-types": true, | |
"class-name": true, | |
"comment-format": [ | |
true, | |
"check-space" | |
], | |
"curly": true, | |
"eofline": true, | |
"forin": true, | |
"import-blacklist": [ | |
true, | |
"rxjs" | |
], | |
"import-spacing": true, | |
"indent": [ | |
true, | |
"spaces" | |
], | |
"no-unused-variable": true, | |
"interface-over-type-literal": true, | |
"label-position": true, | |
"member-ordering": [ | |
true, | |
{ | |
"order": [ | |
"public-static-field", | |
"public-instance-field", | |
"protected-static-field", | |
"protected-instance-field", | |
"private-static-field", | |
"private-instance-field", | |
"public-constructor", | |
"protected-constructor", | |
"private-constructor", | |
"public-static-method", | |
"public-instance-method", | |
"protected-static-method", | |
"protected-instance-method", | |
"private-static-method", | |
"private-instance-method" | |
] | |
}], | |
"member-access": true, | |
"no-magic-numbers": false, | |
"no-reference": true, | |
"no-var-requires": true, | |
"only-arrow-functions": [true, "allow-declarations", "allow-named-functions"], | |
"promise-function-async": true, | |
"unified-signatures": true, | |
"await-promise": true, | |
"no-conditional-assignment": true, | |
"no-duplicate-variable": true, | |
"no-debugger": true, | |
"no-empty": false, | |
"no-empty-interface": true, | |
"no-eval": true, | |
"no-for-in-array": true, | |
"no-inferrable-types": true, | |
"no-inferred-empty-object-type": true, | |
"no-internal-module": true, | |
"no-invalid-this": true, | |
"no-misused-new": true, | |
"no-shadowed-variable": true, | |
"no-string-literal": false, | |
"no-string-throw":true, | |
"no-switch-case-fall-through": true, | |
"no-unsafe-finally": true, | |
"no-unused-expression": true, | |
"no-use-before-declare": true, | |
"no-var-keyword": true, | |
"radix": true, | |
"restrict-plus-operands": true, | |
"strict-boolean-expressions": true, | |
"switch-default": true, | |
"triple-equals": true, | |
"cyclomatic-complexity": [true, 5], | |
"max-classes-per-file": [true, 1], | |
"max-file-line-count": [true, 200], | |
"max-line-length": [true, 120], | |
"no-trailing-whitespace": true, | |
"prefer-const": true, | |
"trailing-comma": [true, {"multiline": "never", "singleline": "never"}], | |
"align": [true, "parameters", "statements"], | |
"array-type": [true, "generic"], | |
"arrow-parens": true, | |
"interface-name": [true, "always-prefix"], | |
"new-parens": true, | |
"no-boolean-literal-compare": true, | |
"no-consecutive-blank-lines": [true, 2], | |
"no-unnecessary-initializer": true, | |
"object-literal-key-quotes": [true, "as-needed"], | |
"object-literal-shorthand": true, | |
"one-variable-per-declaration": [true, "ignore-for-loop"], | |
"quotemark": [true, "double", "avoid-escape"], | |
"semicolon": [true, "always"], | |
"space-before-function-paren": [true, "always"], | |
"variable-name": [ | |
true, | |
"ban-keywords" | |
], | |
"whitespace": [ | |
true, | |
"check-branch", | |
"check-decl", | |
"check-operator", | |
"check-separator", | |
"check-type" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment