Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Strict tslint.json for Angular
{
"rulesDirectory": [
"node_modules/codelyzer",
"node_modules/tslint-eslint-rules/dist/rules"
],
"rules": {
"no-forward-ref": true,
"no-input-rename": true,
"no-output-rename": true,
"use-life-cycle-interface": true,
"use-pipe-decorator": true,
"use-pipe-transform-interface": true,
"component-class-suffix": [
true,
"Component",
"Page"
],
"component-selector": [
true,
"element",
[
"app",
"ati"
],
"kebab-case"
],
"directive-class-suffix": [
true,
"Directive"
],
"directive-selector": [
true,
"attribute",
[
"app",
"ati",
"dir"
],
"camelCase"
],
"pipe-naming": [
"camelCase",
"pipe"
],
"adjacent-overload-signatures": true,
"member-access": [
true,
"check-accessor",
"check-constructor",
"check-parameter-property"
],
"member-ordering": [
true,
{
"order": [
"public-static-field",
"public-instance-field",
"protected-static-field",
"protected-instance-field",
"private-static-field",
"private-instance-field",
"constructor",
"public-instance-method",
"protected-instance-method",
"private-instance-method"
]
}
],
"no-var-requires": true,
"only-arrow-functions": [
true,
"allow-declarations",
"allow-named-functions"
],
"typedef": [
true,
"call-signature",
"parameter",
"arrow-parameter",
"property-declaration",
"variable-declaration",
"member-variable-declaration",
"object-destructuring",
"array-destructuring"
],
"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"
}
],
"unified-signatures": true,
"await-promise": true,
"curly": true,
"import-blacklist": [
true,
"rxjs/Rx",
"rxjs/internal/operators"
],
"no-conditional-assignment": true,
"no-console": [
true,
"debug",
"error",
"group",
"info",
"log"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-duplicate-variable": true,
"no-empty": [
true,
"allow-empty-catch"
],
"no-eval": true,
"no-invalid-this": true,
"no-object-literal-type-assertion": true,
"no-shadowed-variable": true,
"no-string-literal": true,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-this-assignment": true,
"no-unused-expression": [
true,
"allow-fast-null-checks"
],
"no-var-keyword": true,
"radix": true,
"switch-default": true,
"triple-equals": true,
"use-isnan": true,
"eofline": true,
"indent": [
true,
"spaces",
2
],
"max-classes-per-file": [
true,
1
],
"max-line-length": [
true,
120
],
"max-file-line-count": [
true,
400
],
"no-default-export": false,
"no-duplicate-imports": true,
"no-require-imports": true,
"object-literal-sort-keys": false,
"prefer-const": true,
"trailing-comma": [
true,
{
"multiline": "never",
"singleline": "never"
}
],
"arrow-parens": true,
"binary-expression-operand-order": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"encoding": true,
"import-spacing": true,
"jsdoc-format": true,
"newline-before-return": false,
"new-parens": true,
"no-consecutive-blank-lines": [
true,
2
],
"no-irregular-whitespace": true,
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"number-literal-format": true,
"object-literal-key-quotes": [
true,
"as-needed"
],
"one-line": [
true,
"check-catch",
"check-finally",
"check-else",
"check-open-brace"
],
"one-variable-per-declaration": [
true,
"ignore-for-loop"
],
"ordered-imports": [
true,
{
"import-sources-order": "case-insensitive",
"named-imports-order": "case-insensitive"
}
],
"prefer-method-signature": true,
"prefer-switch": true,
"prefer-template": true,
"quotemark": [
true,
"single",
"avoid-escape"
],
"semicolon": [
true,
"always"
],
"space-before-function-paren": [
true,
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always",
"method": "never",
"constructor": "never"
}
],
"space-in-parens": [
true,
"never"
],
"type-literal-delimiter": true,
"variable-name": [
true,
"ban-keywords",
"check-format",
"allow-leading-underscore"
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-rest-spread",
"check-type",
"check-type-operator",
"check-preblock"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment