|
| 1 | +{ |
| 2 | + "defaultSeverity": "error", |
| 3 | + "rules": { |
| 4 | + "ban-ts-ignore": true, |
| 5 | + "no-any": [true, { "ignore-rest-args": true }], |
| 6 | + "no-empty-interface": true, |
| 7 | + "no-inferrable-types": true, |
| 8 | + "no-magic-numbers": false, |
| 9 | + "no-parameter-reassignment": true, |
| 10 | + "no-reference": true, |
| 11 | + "prefer-for-of": true, |
| 12 | + "promise-function-async": true, |
| 13 | + "typedef": [true, "call-signature", "property-declaration", "member-variable-declaration"], |
| 14 | + "unified-signatures": true, |
| 15 | + "await-promise": true, |
| 16 | + "ban": [ |
| 17 | + true, |
| 18 | + { "name": "isNaN", "message": "Avoid use of outdated global functions, use Number.isNaN() instead." }, |
| 19 | + { "name": "parseInt", "message": "Avoid use of outdated global functions, use Number.parseInt() instead." }, |
| 20 | + { "name": "parseFloat", "message": "Avoid use of outdated global functions, use Number.parseFloat() instead." } |
| 21 | + ], |
| 22 | + "ban-comma-operator": true, |
| 23 | + "curly": [true, "ignore-same-line"], |
| 24 | + "forin": true, |
| 25 | + "function-constructor": true, |
| 26 | + "no-arg": true, |
| 27 | + "no-async-without-await": true, |
| 28 | + "no-conditional-assignment": true, |
| 29 | + "no-console": true, |
| 30 | + "no-duplicate-super": true, |
| 31 | + "no-duplicate-switch-case": true, |
| 32 | + "no-duplicate-variable": [true, "check-parameters"], |
| 33 | + "no-dynamic-delete": true, |
| 34 | + "no-empty": true, |
| 35 | + "no-eval": true, |
| 36 | + "no-floating-promises": true, |
| 37 | + "no-for-in-array": true, |
| 38 | + "no-implicit-dependencies": [true, "dev"], |
| 39 | + "no-inferred-empty-object-type": true, |
| 40 | + "no-invalid-this": true, |
| 41 | + "no-misused-new": true, |
| 42 | + "no-null-keyword": true, |
| 43 | + "no-null-undefined-union": true, |
| 44 | + "no-promise-as-boolean": true, |
| 45 | + "no-return-await": true, |
| 46 | + "no-shadowed-variable": true, |
| 47 | + "no-sparse-arrays": true, |
| 48 | + "no-string-literal": true, |
| 49 | + "no-string-throw": true, |
| 50 | + "no-switch-case-fall-through": true, |
| 51 | + "no-this-assignment": true, |
| 52 | + "no-unbound-method": [true, "ignore-static"], |
| 53 | + "no-unsafe-finally": true, |
| 54 | + "no-unused-expression": [true, "allow-fast-null-checks"], |
| 55 | + "no-var-keyword": true, |
| 56 | + "prefer-conditional-expression": [true, "check-else-if"], |
| 57 | + "prefer-object-spread": true, |
| 58 | + "radix": true, |
| 59 | + "restrict-plus-operands": true, |
| 60 | + "static-this": true, |
| 61 | + "strict-type-predicates": true, |
| 62 | + "switch-default": true, |
| 63 | + "triple-equals": true, |
| 64 | + "unnecessary-constructor": true, |
| 65 | + "use-default-type-parameter": true, |
| 66 | + "use-isnan": true, |
| 67 | + "deprecation": true, |
| 68 | + "invalid-void": true, |
| 69 | + "max-classes-per-file": [true, 1], |
| 70 | + "max-file-line-count": [true, 300], |
| 71 | + "no-duplicate-imports": [true, { "allow-namespace-imports": true }], |
| 72 | + "no-mergeable-namespace": true, |
| 73 | + "no-require-imports": true, |
| 74 | + "prefer-const": [true, { "destructuring": "any" }], |
| 75 | + "prefer-readonly": true, |
| 76 | + "array-type": [true, "array"], |
| 77 | + "arrow-return-shorthand": [true, "multiline"], |
| 78 | + "binary-expression-operand-order": false, |
| 79 | + "callable-types": true, |
| 80 | + "class-name": true, |
| 81 | + "comment-format": [true, "check-space"], |
| 82 | + "comment-type": [true, "singleline", "doc", "directive"], |
| 83 | + "completed-docs": [true, "enums", "functions", "interfaces", "methods", "namespaces", "types"], |
| 84 | + "encoding": true, |
| 85 | + "file-header": [ |
| 86 | + true, |
| 87 | + { |
| 88 | + "match": "@file .+", |
| 89 | + "allow-single-line-comments": false, |
| 90 | + "default": "", |
| 91 | + "enforce-trailing-newline": true |
| 92 | + } |
| 93 | + ], |
| 94 | + "file-name-casing": [true, "camel-case", "pascal-case"], |
| 95 | + "interface-name": [true, "always-prefix"], |
| 96 | + "interface-over-type-literal": true, |
| 97 | + "match-default-export-name": true, |
| 98 | + "newline-per-chained-call": false, |
| 99 | + "no-angle-bracket-type-assertion": true, |
| 100 | + "no-boolean-literal-compare": true, |
| 101 | + "no-parameter-properties": true, |
| 102 | + "no-redundant-jsdoc": true, |
| 103 | + "no-reference-import": true, |
| 104 | + "no-unnecessary-callback-wrapper": true, |
| 105 | + "no-unnecessary-qualifier": true, |
| 106 | + "object-literal-key-quotes": [true, "consistent-as-needed"], |
| 107 | + "object-literal-shorthand": true, |
| 108 | + "one-line": [true, "check-catch", "check-finally", "check-else", "check-open-brace"], |
| 109 | + "one-variable-per-declaration": [true, "ignore-for-loop"], |
| 110 | + "ordered-imports": [ |
| 111 | + true, |
| 112 | + { |
| 113 | + "module-source-path": "basename", |
| 114 | + "import-sources-order": "case-insensitive", |
| 115 | + "named-imports-order": "any", |
| 116 | + "grouped-imports": true, |
| 117 | + "groups": [ |
| 118 | + { |
| 119 | + "name": "Package json", |
| 120 | + "match": "package.json$", |
| 121 | + "order": 10 |
| 122 | + }, |
| 123 | + { |
| 124 | + "name": "Voxis modules i.e. '@voxis/some-module", |
| 125 | + "match": "^@voxis/", |
| 126 | + "order": 20 |
| 127 | + }, |
| 128 | + { |
| 129 | + "name": "Node core or third party modules i.e. 'express'", |
| 130 | + "match": "^[^\\.]", |
| 131 | + "order": 30 |
| 132 | + }, |
| 133 | + { |
| 134 | + "name": "Files in same or sub directories i.e './something'", |
| 135 | + "match": "^\\.\\/", |
| 136 | + "order": 40 |
| 137 | + }, |
| 138 | + { |
| 139 | + "name": "Files in parent directories i.e '../something'", |
| 140 | + "match": "^\\.\\.\\/", |
| 141 | + "order": 50 |
| 142 | + } |
| 143 | + ] |
| 144 | + } |
| 145 | + ], |
| 146 | + "prefer-function-over-method": true, |
| 147 | + "prefer-method-signature": false, |
| 148 | + "prefer-switch": [true, { "min-cases": 3 }], |
| 149 | + "prefer-template": true, |
| 150 | + "return-undefined": true, |
| 151 | + "space-before-function-paren": [ |
| 152 | + true, |
| 153 | + { "anonymous": "always", "named": "never", "asyncArrow": "always", "method": "never", "constructor": "never" } |
| 154 | + ], |
| 155 | + "switch-final-break": [true, "always"], |
| 156 | + "type-literal-delimiter": [true, { "singleLine": "always" }], |
| 157 | + "unnecessary-bind": true, |
| 158 | + "unnecessary-else": [true, { "allow-else-if": true }], |
| 159 | + "variable-name": { |
| 160 | + "options": ["ban-keywords", "check-format", "allow-pascal-case", "require-const-for-all-caps"] |
| 161 | + }, |
| 162 | + "align": [true, "parameters", "statements", "members", "elements"], |
| 163 | + "arrow-parens": [true, "ban-single-arg-parens"], |
| 164 | + "eofline": true, |
| 165 | + "import-spacing": true, |
| 166 | + "indent": [true, "tabs", 2], |
| 167 | + "jsdoc-format": [true, "check-multiline-start"], |
| 168 | + "linebreak-style": [true, "LF"], |
| 169 | + "max-line-length": [ |
| 170 | + true, |
| 171 | + { |
| 172 | + "limit": 120, |
| 173 | + "ignore-pattern": "//" |
| 174 | + } |
| 175 | + ], |
| 176 | + "newline-before-return": false, |
| 177 | + "new-parens": true, |
| 178 | + "no-consecutive-blank-lines": [true, 1], |
| 179 | + "no-irregular-whitespace": true, |
| 180 | + "no-trailing-whitespace": true, |
| 181 | + "number-literal-format": true, |
| 182 | + "quotemark": [true, "backtick", "jsx-double", "avoid-escape"], |
| 183 | + "semicolon": [true, "always"], |
| 184 | + "trailing-comma": [true, { "multiline": "always", "singleline": "never" }], |
| 185 | + "typedef-whitespace": [ |
| 186 | + true, |
| 187 | + { |
| 188 | + "call-signature": "nospace", |
| 189 | + "index-signature": "nospace", |
| 190 | + "parameter": "nospace", |
| 191 | + "property-declaration": "nospace", |
| 192 | + "variable-declaration": "nospace" |
| 193 | + }, |
| 194 | + { |
| 195 | + "call-signature": "onespace", |
| 196 | + "index-signature": "onespace", |
| 197 | + "parameter": "onespace", |
| 198 | + "property-declaration": "onespace", |
| 199 | + "variable-declaration": "onespace" |
| 200 | + } |
| 201 | + ], |
| 202 | + "whitespace": [ |
| 203 | + true, |
| 204 | + "check-branch", |
| 205 | + "check-decl", |
| 206 | + "check-operator", |
| 207 | + "check-module", |
| 208 | + "check-separator", |
| 209 | + "check-rest-spread", |
| 210 | + "check-type", |
| 211 | + "check-typecast", |
| 212 | + "check-preblock" |
| 213 | + ], |
| 214 | + "no-internal-module": true, |
| 215 | + "no-var-requires": true, |
| 216 | + "label-position": true, |
| 217 | + "no-invalid-template-strings": true, |
| 218 | + "no-object-literal-type-assertion": true, |
| 219 | + "no-tautology-expression": true, |
| 220 | + "no-unsafe-any": true, |
| 221 | + "no-unnecessary-class": [true, "allow-constructor-only"], |
| 222 | + "cyclomatic-complexity": [true, 20], |
| 223 | + "member-access": [true, "check-accessor", "check-constructor"], |
| 224 | + "member-ordering": [ |
| 225 | + true, |
| 226 | + { |
| 227 | + "order": [ |
| 228 | + "private-static-field", |
| 229 | + "protected-static-field", |
| 230 | + "public-static-field", |
| 231 | + |
| 232 | + "private-instance-field", |
| 233 | + "protected-instance-field", |
| 234 | + "public-instance-field", |
| 235 | + |
| 236 | + "private-constructor", |
| 237 | + "protected-constructor", |
| 238 | + "public-constructor", |
| 239 | + |
| 240 | + "private-static-method", |
| 241 | + "protected-static-method", |
| 242 | + "public-static-method", |
| 243 | + |
| 244 | + "private-instance-method", |
| 245 | + "protected-instance-method", |
| 246 | + "public-instance-method" |
| 247 | + ] |
| 248 | + } |
| 249 | + ] |
| 250 | + } |
| 251 | +} |
0 commit comments