|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "ignorePatterns": ["**/*"], |
| 4 | + "plugins": ["@nrwl/nx"], |
| 5 | + "overrides": [ |
| 6 | + { |
| 7 | + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], |
| 8 | + "rules": { |
| 9 | + "@nrwl/nx/enforce-module-boundaries": [ |
| 10 | + "error", |
| 11 | + { |
| 12 | + "enforceBuildableLibDependency": true, |
| 13 | + "allow": [], |
| 14 | + "depConstraints": [ |
| 15 | + { |
| 16 | + "sourceTag": "*", |
| 17 | + "onlyDependOnLibsWithTags": ["*"] |
| 18 | + } |
| 19 | + ] |
| 20 | + } |
| 21 | + ] |
| 22 | + } |
| 23 | + }, |
| 24 | + { |
| 25 | + "files": ["*.ts", "*.tsx"], |
| 26 | + "extends": ["plugin:@nrwl/nx/typescript"], |
| 27 | + "rules": {} |
| 28 | + }, |
| 29 | + { |
| 30 | + "files": ["*.js", "*.jsx"], |
| 31 | + "extends": ["plugin:@nrwl/nx/javascript"], |
| 32 | + "rules": {} |
| 33 | + }, |
| 34 | + { |
| 35 | + "files": ["*.ts"], |
| 36 | + "rules": { |
| 37 | + "@angular-eslint/component-class-suffix": "error", |
| 38 | + "@angular-eslint/component-max-inline-declarations": "error", |
| 39 | + "@angular-eslint/component-selector": [ |
| 40 | + "error", |
| 41 | + { |
| 42 | + "type": "element", |
| 43 | + "prefix": "mtb", |
| 44 | + "style": "kebab-case" |
| 45 | + } |
| 46 | + ], |
| 47 | + "@angular-eslint/contextual-lifecycle": "error", |
| 48 | + "@angular-eslint/directive-class-suffix": "error", |
| 49 | + "@angular-eslint/directive-selector": [ |
| 50 | + "error", |
| 51 | + { |
| 52 | + "type": "attribute", |
| 53 | + "prefix": "mtb", |
| 54 | + "style": "camelCase" |
| 55 | + } |
| 56 | + ], |
| 57 | + "@angular-eslint/no-attribute-decorator": "error", |
| 58 | + "@angular-eslint/no-conflicting-lifecycle": "error", |
| 59 | + "@angular-eslint/no-forward-ref": "error", |
| 60 | + "@angular-eslint/no-host-metadata-property": "error", |
| 61 | + "@angular-eslint/no-input-rename": "error", |
| 62 | + "@angular-eslint/no-inputs-metadata-property": "error", |
| 63 | + "@angular-eslint/no-lifecycle-call": "error", |
| 64 | + "@angular-eslint/no-output-native": "error", |
| 65 | + "@angular-eslint/no-output-on-prefix": "error", |
| 66 | + "@angular-eslint/no-output-rename": "error", |
| 67 | + "@angular-eslint/no-outputs-metadata-property": "error", |
| 68 | + "@angular-eslint/no-pipe-impure": "error", |
| 69 | + "@angular-eslint/no-queries-metadata-property": "error", |
| 70 | + "@angular-eslint/prefer-output-readonly": "error", |
| 71 | + "@angular-eslint/use-component-selector": "error", |
| 72 | + "@angular-eslint/use-component-view-encapsulation": "error", |
| 73 | + "@angular-eslint/use-lifecycle-interface": "error", |
| 74 | + "@angular-eslint/use-pipe-transform-interface": "error", |
| 75 | + "@typescript-eslint/adjacent-overload-signatures": "error", |
| 76 | + "@typescript-eslint/array-type": [ |
| 77 | + "error", |
| 78 | + { |
| 79 | + "default": "array" |
| 80 | + } |
| 81 | + ], |
| 82 | + "@typescript-eslint/ban-types": [ |
| 83 | + "error", |
| 84 | + { |
| 85 | + "types": { |
| 86 | + "Object": { |
| 87 | + "message": "Avoid using the `Object` type. Did you mean `object`?" |
| 88 | + }, |
| 89 | + "Function": { |
| 90 | + "message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`." |
| 91 | + }, |
| 92 | + "Boolean": { |
| 93 | + "message": "Avoid using the `Boolean` type. Did you mean `boolean`?" |
| 94 | + }, |
| 95 | + "Number": { |
| 96 | + "message": "Avoid using the `Number` type. Did you mean `number`?" |
| 97 | + }, |
| 98 | + "String": { |
| 99 | + "message": "Avoid using the `String` type. Did you mean `string`?" |
| 100 | + }, |
| 101 | + "Symbol": { |
| 102 | + "message": "Avoid using the `Symbol` type. Did you mean `symbol`?" |
| 103 | + } |
| 104 | + } |
| 105 | + } |
| 106 | + ], |
| 107 | + "@typescript-eslint/consistent-type-assertions": "error", |
| 108 | + "@typescript-eslint/consistent-type-definitions": "error", |
| 109 | + "@typescript-eslint/dot-notation": "off", |
| 110 | + "@typescript-eslint/explicit-member-accessibility": [ |
| 111 | + "off", |
| 112 | + { |
| 113 | + "accessibility": "explicit" |
| 114 | + } |
| 115 | + ], |
| 116 | + "@typescript-eslint/indent": "off", |
| 117 | + "@typescript-eslint/member-delimiter-style": [ |
| 118 | + "off", |
| 119 | + { |
| 120 | + "multiline": { |
| 121 | + "delimiter": "none", |
| 122 | + "requireLast": true |
| 123 | + }, |
| 124 | + "singleline": { |
| 125 | + "delimiter": "semi", |
| 126 | + "requireLast": false |
| 127 | + } |
| 128 | + } |
| 129 | + ], |
| 130 | + "@typescript-eslint/member-ordering": "error", |
| 131 | + "@typescript-eslint/naming-convention": "error", |
| 132 | + "@typescript-eslint/no-empty-function": "off", |
| 133 | + "@typescript-eslint/no-empty-interface": "error", |
| 134 | + "@typescript-eslint/no-explicit-any": "off", |
| 135 | + "@typescript-eslint/no-inferrable-types": [ |
| 136 | + "error", |
| 137 | + { |
| 138 | + "ignoreParameters": true |
| 139 | + } |
| 140 | + ], |
| 141 | + "@typescript-eslint/no-misused-new": "error", |
| 142 | + "@typescript-eslint/no-namespace": "error", |
| 143 | + "@typescript-eslint/no-non-null-assertion": "error", |
| 144 | + "@typescript-eslint/no-parameter-properties": "off", |
| 145 | + "@typescript-eslint/no-shadow": [ |
| 146 | + "error", |
| 147 | + { |
| 148 | + "hoist": "all" |
| 149 | + } |
| 150 | + ], |
| 151 | + "@typescript-eslint/no-unused-expressions": "error", |
| 152 | + "@typescript-eslint/no-use-before-define": "off", |
| 153 | + "@typescript-eslint/no-var-requires": "error", |
| 154 | + "@typescript-eslint/prefer-for-of": "error", |
| 155 | + "@typescript-eslint/prefer-function-type": "error", |
| 156 | + "@typescript-eslint/prefer-namespace-keyword": "error", |
| 157 | + "@typescript-eslint/quotes": "off", |
| 158 | + "@typescript-eslint/semi": ["off", null], |
| 159 | + "@typescript-eslint/triple-slash-reference": [ |
| 160 | + "error", |
| 161 | + { |
| 162 | + "path": "always", |
| 163 | + "types": "prefer-import", |
| 164 | + "lib": "always" |
| 165 | + } |
| 166 | + ], |
| 167 | + "@typescript-eslint/type-annotation-spacing": "off", |
| 168 | + "@typescript-eslint/unified-signatures": "error", |
| 169 | + "arrow-body-style": "error", |
| 170 | + "arrow-parens": ["off", "always"], |
| 171 | + "brace-style": ["off", "off"], |
| 172 | + "comma-dangle": "off", |
| 173 | + "complexity": "off", |
| 174 | + "constructor-super": "error", |
| 175 | + "eol-last": "off", |
| 176 | + "eqeqeq": ["error", "smart"], |
| 177 | + "guard-for-in": "error", |
| 178 | + "id-blacklist": "off", |
| 179 | + "id-match": "off", |
| 180 | + "import/no-deprecated": "warn", |
| 181 | + "jsdoc/check-alignment": "error", |
| 182 | + "jsdoc/check-indentation": "error", |
| 183 | + "jsdoc/newline-after-description": "error", |
| 184 | + "linebreak-style": "off", |
| 185 | + "max-classes-per-file": ["error", 1], |
| 186 | + "max-len": "off", |
| 187 | + "new-parens": "off", |
| 188 | + "newline-per-chained-call": "off", |
| 189 | + "no-bitwise": "error", |
| 190 | + "no-caller": "error", |
| 191 | + "no-cond-assign": "error", |
| 192 | + "no-console": [ |
| 193 | + "error", |
| 194 | + { |
| 195 | + "allow": [ |
| 196 | + "log", |
| 197 | + "warn", |
| 198 | + "dir", |
| 199 | + "timeLog", |
| 200 | + "assert", |
| 201 | + "clear", |
| 202 | + "count", |
| 203 | + "countReset", |
| 204 | + "group", |
| 205 | + "groupEnd", |
| 206 | + "table", |
| 207 | + "dirxml", |
| 208 | + "error", |
| 209 | + "groupCollapsed", |
| 210 | + "Console", |
| 211 | + "profile", |
| 212 | + "profileEnd", |
| 213 | + "timeStamp", |
| 214 | + "context" |
| 215 | + ] |
| 216 | + } |
| 217 | + ], |
| 218 | + "no-debugger": "error", |
| 219 | + "no-empty": "off", |
| 220 | + "no-eval": "error", |
| 221 | + "no-extra-semi": "off", |
| 222 | + "no-fallthrough": "error", |
| 223 | + "no-invalid-this": "off", |
| 224 | + "no-irregular-whitespace": "off", |
| 225 | + "no-multiple-empty-lines": "off", |
| 226 | + "no-new-wrappers": "error", |
| 227 | + "no-restricted-imports": ["error", "rxjs/Rx"], |
| 228 | + "no-throw-literal": "error", |
| 229 | + "no-trailing-spaces": "off", |
| 230 | + "no-undef-init": "error", |
| 231 | + "no-underscore-dangle": "off", |
| 232 | + "no-unsafe-finally": "error", |
| 233 | + "no-unused-labels": "error", |
| 234 | + "no-var": "error", |
| 235 | + "object-shorthand": "off", |
| 236 | + "one-var": ["error", "never"], |
| 237 | + "prefer-arrow/prefer-arrow-functions": "error", |
| 238 | + "prefer-const": "error", |
| 239 | + "quote-props": "off", |
| 240 | + "radix": "error", |
| 241 | + "react/jsx-curly-spacing": "off", |
| 242 | + "react/jsx-equals-spacing": "off", |
| 243 | + "react/jsx-tag-spacing": [ |
| 244 | + "off", |
| 245 | + { |
| 246 | + "afterOpening": "allow", |
| 247 | + "closingSlash": "allow" |
| 248 | + } |
| 249 | + ], |
| 250 | + "react/jsx-wrap-multilines": "off", |
| 251 | + "space-before-function-paren": "off", |
| 252 | + "space-in-parens": ["off", "never"], |
| 253 | + "spaced-comment": [ |
| 254 | + "error", |
| 255 | + "always", |
| 256 | + { |
| 257 | + "markers": ["/"] |
| 258 | + } |
| 259 | + ], |
| 260 | + "use-isnan": "error", |
| 261 | + "valid-typeof": "off" |
| 262 | + }, |
| 263 | + "plugins": [ |
| 264 | + "eslint-plugin-jsdoc", |
| 265 | + "eslint-plugin-prefer-arrow", |
| 266 | + "eslint-plugin-react", |
| 267 | + "eslint-plugin-import", |
| 268 | + "@angular-eslint/eslint-plugin", |
| 269 | + "@typescript-eslint" |
| 270 | + ] |
| 271 | + }, |
| 272 | + { |
| 273 | + "files": ["*.html"], |
| 274 | + "rules": { |
| 275 | + "@angular-eslint/template/banana-in-box": "error", |
| 276 | + "@angular-eslint/template/conditional-complexity": [ |
| 277 | + "error", |
| 278 | + { |
| 279 | + "maxComplexity": 4 |
| 280 | + } |
| 281 | + ], |
| 282 | + "@angular-eslint/template/cyclomatic-complexity": [ |
| 283 | + "error", |
| 284 | + { |
| 285 | + "maxComplexity": 5 |
| 286 | + } |
| 287 | + ], |
| 288 | + "@angular-eslint/template/eqeqeq": "error", |
| 289 | + "@angular-eslint/template/no-negated-async": "error", |
| 290 | + "@angular-eslint/template/use-track-by-function": "error" |
| 291 | + }, |
| 292 | + "plugins": ["@angular-eslint/eslint-plugin-template"] |
| 293 | + } |
| 294 | + ] |
| 295 | +} |
0 commit comments