UNPKG

typescript-assistant

Version:

Combines and integrates professional Typescript tools into your project

120 lines (116 loc) 3.63 kB
{ // This file is published in the npm package, so projects using typescript-assistant can extend their rules from it. "extends": [ "tslint:latest", "./tslint-enabled-microsoft-rules.json", "./tslint-sonarts-rules.json" ], "rules": { // Disabled due to errors: "align": false, // Rule is fixed, fixer/formatter is broken. // Standard tslint rules adjustments to AFAS requirements: "no-unused-variable": true, "ban-types": { "options": [ [ "Object", "Avoid using the `Object` type. Did you mean `object`?" ], [ "Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?" ], [ "Number", "Avoid using the `Number` type. Did you mean `number`?" ], [ "String", "Avoid using the `String` type. Did you mean `string`?" ], [ "Symbol", "Avoid using the `Symbol` type. Did you mean `symbol`?" ] ] }, "max-line-length": [ true, { "limit": 160, "ignore-pattern": "^x?it\\(" } ], "object-literal-key-quotes": [ true, "as-needed" ], "only-arrow-functions": [ true, "allow-declarations", "allow-named-functions" ], "prefer-for-of": true, "trailing-comma": [ true, { "multiline": "never", "singleline": "never" } ], "triple-equals": true, "quotemark": [ true, "single", "avoid-escape" ], "whitespace": [ true, "check-branch", "check-decl", "check-operator", "check-module", "check-separator", "check-type" ], // No "check-typecast". "use-default-type-parameter": true, "one-variable-per-declaration": [true, "ignore-for-loop"], // Disabled standard rules. "array-type": false, "arrow-parens": false, "ban-comma-operator": false, "completed-docs": false, "cyclomatic-complexity": false, "file-header": false, "interface-name": false, "match-default-export-name": false, "max-file-line-count": false, "newline-before-return": false, "no-angle-bracket-type-assertion": false, "no-any": false, "no-duplicate-imports": false, // Problems when creating stubs and importing Interfaces "no-empty-interface": false, "no-floating-promises": true, "no-implicit-dependencies": false, // TSA holds several of the dependencies for dependent projects, conflicting with this rule. "no-magic-numbers": false, "no-non-null-assertion": false, "no-object-literal-type-assertion": false, "no-sparse-arrays": false, "no-string-literal": false, "no-submodule-imports": false, "no-unnecessary-callback-wrapper": false, // does not add value "no-unsafe-any": false, "no-unused-expression": false, "no-use-before-declare": false, "no-void-expression": [ true, "ignore-arrow-function-shorthand" ], "object-literal-shorthand": false, "object-literal-sort-keys": false, "ordered-imports": false, "prefer-conditional-expression": false, "prefer-const": false, "prefer-object-spread": false, "promise-function-async": false, "strict-boolean-expressions": false, "switch-default": false, "typedef": false, "unified-signatures": false, // Enabled non-standard rules. "linebreak-style": [true, "LF"], "no-default-export": true, "no-inferrable-types": true, "no-invalid-this": true, "no-mergeable-namespace": true, "no-null-keyword": true, "restrict-plus-operands": true, "prefer-template": true, "prefer-method-signature": true } }