{ | |
"rulesDirectory": ["node_modules/codelyzer", "node_modules/rxjs-tslint"], | |
"rules": { | |
"align": [true, "parameters", "arguments", "statements", "members", "elements"], | |
"adjacent-overload-signatures": true, | |
"arrow-parens": [true, "ban-single-arg-parens"], | |
"arrow-return-shorthand": true, | |
"ban-comma-operator": true, | |
"ban": [ | |
true, | |
"eval", | |
["describe", "only"], | |
{ | |
"name": ["it", "only"], | |
"message": "don't focus tests" | |
}, | |
{ | |
"name": ["chai", "assert", "equal"], | |
"message": "Use 'strictEqual' instead." | |
} | |
], | |
"ban-types": { | |
"options": [["Object", "Avoid using the `Object` type. Did you mean `object`?"], ["Array", "Avoid using the `Array` type. Did you mean `array`?"]] | |
}, | |
"binary-expression-operand-order": true, | |
"callable-types": true, | |
"class-name": true, | |
"comment-format": [true, "check-space"], | |
"curly": true, | |
"encoding": true, | |
"eofline": true, | |
"forin": true, | |
"import-spacing": false, | |
"indent": [true, "spaces"], | |
"interface-name": [true, "never-prefix"], | |
"interface-over-type-literal": true, | |
"jsdoc-format": [true, "check-multiline-start"], | |
"label-position": true, | |
"linebreak-style": [true, "LF"], | |
"max-classes-per-file": [true, 1], | |
"max-line-length": [true, { "limit": 160, "ignore-pattern": "^import |^export {(.*?)}" }], | |
"max-file-line-count": [true, 500], | |
"completed-docs": true, | |
"member-access": [true, "check-parameter-property", "check-accessor", "check-constructor"], | |
"member-ordering": [ | |
true, | |
{ | |
"order": [ | |
"public-static-field", | |
"public-static-method", | |
"protected-static-field", | |
"protected-static-method", | |
"private-static-field", | |
"private-static-method", | |
"public-instance-field", | |
"protected-instance-field", | |
"private-instance-field", | |
"public-constructor", | |
"protected-constructor", | |
"private-constructor", | |
"public-instance-method", | |
"protected-instance-method", | |
"private-instance-method" | |
] | |
} | |
], | |
"newline-before-return": true, | |
"newline-per-chained-call": false, | |
"new-parens": true, | |
"no-angle-bracket-type-assertion": false, | |
"no-any": false, | |
"no-arg": true, | |
"no-bitwise": true, | |
"no-conditional-assignment": true, | |
"no-consecutive-blank-lines": true, | |
"no-irregular-whitespace": true, | |
"no-console": [true, "debug", "info", "time", "timeEnd", "trace"], | |
"no-construct": true, | |
"no-debugger": true, | |
"no-default-export": true, | |
"no-duplicate-imports": true, | |
"no-mergeable-namespace": true, | |
"no-duplicate-super": true, | |
"no-duplicate-switch-case": true, | |
"no-duplicate-variable": true, | |
"no-dynamic-delete": true, | |
"no-empty": false, | |
"no-empty-interface": true, | |
"no-eval": true, | |
"no-implicit-dependencies": false, | |
"no-import-side-effect": [ | |
true, | |
{ | |
"ignore-module": "(\\.html|\\.css)$" | |
} | |
], | |
"no-inferrable-types": false, | |
"no-internal-module": true, | |
"no-invalid-template-strings": true, | |
"no-invalid-this": true, | |
"no-magic-numbers": false, | |
"no-misused-new": true, | |
"no-namespace": [true, "allow-declarations"], | |
"no-non-null-assertion": true, | |
"no-null-keyword": false, | |
"no-object-literal-type-assertion": true, | |
"no-parameter-reassignment": true, | |
"no-parameter-properties": false, | |
"no-reference": true, | |
"no-reference-import": true, | |
"no-return-await": true, | |
"no-require-imports": true, | |
"no-shadowed-variable": true, | |
"no-sparse-arrays": true, | |
"no-submodule-imports": false, | |
"no-string-literal": false, | |
"no-string-throw": true, | |
"no-switch-case-fall-through": true, | |
"no-this-assignment": true, | |
"no-trailing-whitespace": true, | |
"no-unnecessary-callback-wrapper": true, | |
"no-unnecessary-class": false, | |
"no-unnecessary-initializer": true, | |
"no-unsafe-finally": true, | |
"no-unused-expression": [true, "allow-fast-null-checks", "allow-new"], | |
"no-use-before-declare": true, | |
"no-var-keyword": true, | |
"no-var-requires": true, | |
"number-literal-format": true, | |
"object-literal-key-quotes": [true, "consistent-as-needed"], | |
"object-literal-shorthand": true, | |
"object-literal-sort-keys": false, | |
"one-line": [true, "check-catch", "check-finally", "check-else", "check-open-brace", "check-whitespace"], | |
"one-variable-per-declaration": false, | |
"only-arrow-functions": [true, "allow-declarations", "allow-named-functions"], | |
"ordered-imports": [ | |
true, | |
{ | |
"named-imports-order": "lowercase-first" | |
} | |
], | |
"prefer-conditional-expression": [true, "check-else-if"], | |
"prefer-const": true, | |
"prefer-for-of": true, | |
"prefer-function-over-method": false, | |
"prefer-method-signature": true, | |
"prefer-object-spread": true, | |
"prefer-switch": true, | |
"prefer-template": true, | |
"quotemark": [true, "single"], | |
"radix": false, | |
"rxjs-collapse-imports": true, | |
"rxjs-proper-imports": true, | |
"rxjs-pipeable-operators-only": true, | |
"rxjs-no-static-observable-methods": true, | |
"semicolon": [true, "always"], | |
"space-before-function-paren": [true, "never"], | |
"space-within-parens": [true, 0], | |
"switch-default": true, | |
"switch-final-break": [true, "always"], | |
"trailing-comma": [ | |
true, | |
{ | |
"multiline": { | |
"objects": "always", | |
"arrays": "always", | |
"functions": "never", | |
"typeLiterals": "never" | |
}, | |
"esSpecCompliant": true | |
} | |
], | |
"triple-equals": true, | |
"typedef": [ | |
true, | |
"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" | |
} | |
], | |
"type-literal-delimiter": true, | |
"unified-signatures": true, | |
"use-isnan": true, | |
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore", "allow-pascal-case"], | |
"whitespace": [ | |
true, | |
"check-branch", | |
"check-decl", | |
"check-operator", | |
"check-module", | |
"check-separator", | |
"check-rest-spread", | |
"check-type", | |
"check-typecast", | |
"check-type-operator", | |
"check-preblock" | |
], | |
"directive-selector": [true, "attribute", "app", "camelCase"], | |
"component-selector": [true, "element", "app", "kebab-case"], | |
"use-input-property-decorator": true, | |
"use-output-property-decorator": true, | |
"use-host-property-decorator": true, | |
"no-input-rename": true, | |
"no-output-rename": true, | |
"use-life-cycle-interface": true, | |
"use-pipe-transform-interface": true, | |
"component-class-suffix": true, | |
"directive-class-suffix": true, | |
"rxjs-no-unsafe-catch": { "severity": "warn" }, | |
"rxjs-no-unsafe-first": { "severity": "warn" }, | |
"rxjs-no-nested-subscribe": { "severity": "warn" }, | |
"rxjs-no-unsafe-takeuntil": { "severity": "warn" } | |
}, | |
"linterOptions": { | |
"exclude": ["**/*.spec.ts", "**/testing/*.ts", "**/lib/**/*.ts"] | |
}, | |
"extends": ["tslint:latest", "rxjs-tslint-rules", "tslint-config-prettier"] | |
} | |