Update tslint rules
This commit is contained in:
parent
c43bfb0ce7
commit
f914f50c87
121
ui/tslint.json
121
ui/tslint.json
|
|
@ -1,18 +1,119 @@
|
|||
{
|
||||
"extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"],
|
||||
"jsRules": {
|
||||
"object-literal-sort-keys": false,
|
||||
"no-console": false
|
||||
},
|
||||
"extends": "tslint-sonarts",
|
||||
"rules": {
|
||||
"object-literal-sort-keys": false,
|
||||
"jsx-boolean-value": false,
|
||||
"no-console": false,
|
||||
"jsx-no-lambda": false
|
||||
"array-type": [true, "array-simple"],
|
||||
"arrow-return-shorthand": true,
|
||||
"ban": [true,
|
||||
{"name": "Array", "message": "tsstyle#array-constructor"}
|
||||
],
|
||||
"ban-types": [true,
|
||||
["Object", "Use {} instead."],
|
||||
["String", "Use 'string' instead."],
|
||||
["Number", "Use 'number' instead."],
|
||||
["Boolean", "Use 'boolean' instead."],
|
||||
["Function", "Use (..) => .. instead."]
|
||||
],
|
||||
"class-name": true,
|
||||
"curly": [true],
|
||||
"forin": true,
|
||||
"label-position": true,
|
||||
"member-access": [true],
|
||||
"new-parens": true,
|
||||
"no-angle-bracket-type-assertion": true,
|
||||
"no-any": true,
|
||||
"no-arg": true,
|
||||
"no-conditional-assignment": true,
|
||||
"no-construct": true,
|
||||
"no-shadowed-variable": true,
|
||||
"prefer-object-spread": true,
|
||||
"no-debugger": true,
|
||||
"no-default-export": false,
|
||||
"no-duplicate-variable": true,
|
||||
"no-inferrable-types": true,
|
||||
"no-namespace": [true, "allow-declarations"],
|
||||
"cyclomatic-complexity": [true, 13],
|
||||
"no-duplicate-imports": true,
|
||||
"no-reference": true,
|
||||
"no-string-throw": true,
|
||||
"no-unused-expression": true,
|
||||
"no-var-keyword": true,
|
||||
"object-literal-shorthand": true,
|
||||
"only-arrow-functions": [true, "allow-declarations", "allow-named-functions"],
|
||||
"prefer-const": true,
|
||||
"radix": true,
|
||||
"semicolon": [true, "always", "ignore-bound-class-methods"],
|
||||
"switch-default": true,
|
||||
"triple-equals": [true, "allow-null-check"],
|
||||
"use-isnan": true,
|
||||
"variable-name": [
|
||||
true,
|
||||
"check-format",
|
||||
"ban-keywords",
|
||||
"allow-pascal-case",
|
||||
"allow-leading-underscore",
|
||||
"allow-trailing-underscore"
|
||||
],
|
||||
|
||||
"cognitive-complexity": true,
|
||||
"mccabe-complexity": true,
|
||||
"no-duplicate-string": true,
|
||||
"no-nested-incdec": false,
|
||||
"no-all-duplicated-branches": true,
|
||||
"consecutive-overloads": true,
|
||||
"max-union-size": false,
|
||||
"no-accessor-field-mismatch": true,
|
||||
"no-array-delete": true,
|
||||
"no-big-function": true,
|
||||
"no-case-with-or": true,
|
||||
"no-collection-size-mischeck": true,
|
||||
"no-commented-code": true,
|
||||
"no-dead-store": true,
|
||||
"no-duplicate-in-composite": true,
|
||||
"no-duplicated-branches": true,
|
||||
"no-element-overwrite": true,
|
||||
"no-empty-destructuring": true,
|
||||
"no-empty-nested-blocks": true,
|
||||
"no-extra-semicolon": true,
|
||||
"no-gratuitous-expressions": true,
|
||||
"no-hardcoded-credentials": true,
|
||||
"no-identical-conditions": true,
|
||||
"no-identical-expressions": true,
|
||||
"no-identical-functions": true,
|
||||
"no-ignored-initial-value": true,
|
||||
"no-ignored-return": true,
|
||||
"no-in-misuse": true,
|
||||
"no-inconsistent-return": true,
|
||||
"no-misleading-array-reverse": true,
|
||||
"no-misspelled-operator": true,
|
||||
"no-multiline-string-literals": true,
|
||||
"no-nested-template-literals": true,
|
||||
"no-redundant-boolean": true,
|
||||
"no-redundant-jump": true,
|
||||
"no-redundant-parentheses": true,
|
||||
"no-return-type-any": true,
|
||||
"no-same-line-conditional": true,
|
||||
"no-self-assignment": true,
|
||||
"no-small-switch": true,
|
||||
"no-statements-same-line": true,
|
||||
"no-unconditional-jump": true,
|
||||
"no-undefined-argument": true,
|
||||
"no-unenclosed-multiline-block": true,
|
||||
"no-unthrown-error": true,
|
||||
"no-unused-array": true,
|
||||
"no-use-of-empty-return-value": true,
|
||||
"no-useless-cast": true,
|
||||
"no-useless-increment": true,
|
||||
"no-useless-intersection": true,
|
||||
"no-variable-usage-before-declaration": true,
|
||||
"parameters-max-number": true,
|
||||
"prefer-default-last": true,
|
||||
"prefer-immediate-return": true,
|
||||
"prefer-promise-shorthand": true,
|
||||
"use-primitive-type": true,
|
||||
"use-type-alias": true
|
||||
},
|
||||
"linterOptions": {
|
||||
"exclude": [
|
||||
"config/**/*.js",
|
||||
"node_modules/**/*.ts"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue