|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "env": { |
| 4 | + "browser": true, |
| 5 | + "es2021": true |
| 6 | + }, |
| 7 | + "parser": "@typescript-eslint/parser", |
| 8 | + "parserOptions": { |
| 9 | + "ecmaVersion": 12, |
| 10 | + "sourceType": "module" |
| 11 | + }, |
| 12 | + "plugins": ["@typescript-eslint", "max-params-no-constructor"], |
| 13 | + "overrides": [ |
| 14 | + { |
| 15 | + "files": ["*.ts"], |
| 16 | + "extends": [ |
| 17 | + "eslint:recommended", |
| 18 | + "plugin:@angular-eslint/recommended", |
| 19 | + "plugin:@typescript-eslint/recommended", |
| 20 | + "plugin:@angular-eslint/recommended--extra" |
| 21 | + ], |
| 22 | + "rules": { |
| 23 | + "max-len": [ |
| 24 | + "error", |
| 25 | + { |
| 26 | + "code": 100, |
| 27 | + "comments": 240, |
| 28 | + "ignorePattern": "import(.*).then(.*)" |
| 29 | + } |
| 30 | + ], |
| 31 | + "no-shadow": "off", |
| 32 | + "padded-blocks": [ |
| 33 | + "error", |
| 34 | + { |
| 35 | + "classes": "never" |
| 36 | + } |
| 37 | + ], |
| 38 | + "padding-line-between-statements": [ |
| 39 | + "error", |
| 40 | + { |
| 41 | + "blankLine": "always", |
| 42 | + "prev": "*", |
| 43 | + "next": ["block", "block-like"] |
| 44 | + } |
| 45 | + ], |
| 46 | + "computed-property-spacing": "error", |
| 47 | + "arrow-spacing": [ |
| 48 | + "error", |
| 49 | + { |
| 50 | + "before": true, |
| 51 | + "after": true |
| 52 | + } |
| 53 | + ], |
| 54 | + "space-infix-ops": "error", |
| 55 | + "no-multi-spaces": "error", |
| 56 | + "arrow-parens": "error", |
| 57 | + "eqeqeq": "error", |
| 58 | + "dot-location": ["error", "property"], |
| 59 | + "curly": "error", |
| 60 | + "no-trailing-spaces": "error", |
| 61 | + "space-before-function-paren": ["error", "never"], |
| 62 | + "no-mixed-spaces-and-tabs": "error", |
| 63 | + "array-callback-return": "error", |
| 64 | + "newline-before-return": "error", |
| 65 | + "object-curly-spacing": ["error", "always"], |
| 66 | + "comma-spacing": [ |
| 67 | + "error", |
| 68 | + { |
| 69 | + "before": false, |
| 70 | + "after": true |
| 71 | + } |
| 72 | + ], |
| 73 | + "indent": [ |
| 74 | + "error", |
| 75 | + 4, |
| 76 | + { |
| 77 | + "SwitchCase": 1, |
| 78 | + "MemberExpression": 1 |
| 79 | + } |
| 80 | + ], |
| 81 | + "max-lines-per-function": [ |
| 82 | + "error", |
| 83 | + { |
| 84 | + "max": 20, |
| 85 | + "skipComments": true |
| 86 | + } |
| 87 | + ], |
| 88 | + "spaced-comment": ["error", "always"], |
| 89 | + "space-before-blocks": "error", |
| 90 | + "keyword-spacing": "error", |
| 91 | + "max-params-no-constructor/max-params-no-constructor": ["error", 3], |
| 92 | + "no-eq-null": "error", |
| 93 | + "no-unreachable": "error", |
| 94 | + "quotes": [ |
| 95 | + "error", |
| 96 | + "single", |
| 97 | + { |
| 98 | + "allowTemplateLiterals": true |
| 99 | + } |
| 100 | + ], |
| 101 | + "no-extra-boolean-cast": "off", |
| 102 | + "brace-style": [ |
| 103 | + "error", |
| 104 | + "1tbs", |
| 105 | + { |
| 106 | + "allowSingleLine": false |
| 107 | + } |
| 108 | + ], |
| 109 | + "radix": ["error", "always"], |
| 110 | + "yoda": ["error", "never"], |
| 111 | + "no-useless-return": "error", |
| 112 | + "no-useless-concat": "error", |
| 113 | + "no-useless-call": "error", |
| 114 | + "no-unmodified-loop-condition": "error", |
| 115 | + "no-throw-literal": "error", |
| 116 | + "no-self-assign": "error", |
| 117 | + "no-self-compare": "error", |
| 118 | + "no-redeclare": "error", |
| 119 | + "no-proto": "error", |
| 120 | + "no-octal": "error", |
| 121 | + "no-param-reassign": "error", |
| 122 | + "no-new-wrappers": "error", |
| 123 | + "no-new-func": "error", |
| 124 | + "no-new": "error", |
| 125 | + "no-multi-str": "error", |
| 126 | + "no-implied-eval": "error", |
| 127 | + "no-global-assign": "error", |
| 128 | + "no-floating-decimal": "error", |
| 129 | + "no-extra-label": "error", |
| 130 | + "no-extend-native": "error", |
| 131 | + "no-eval": "error", |
| 132 | + "no-var": "error", |
| 133 | + "no-lone-blocks": "error", |
| 134 | + "prefer-const": "error", |
| 135 | + "semi": "error", |
| 136 | + "eol-last": ["error", "always"], |
| 137 | + "comma-dangle": "error", |
| 138 | + "lines-between-class-members": "off", |
| 139 | + "no-empty": ["error", { "allowEmptyCatch": true }], |
| 140 | + "no-empty-pattern": "error", |
| 141 | + "no-else-return": ["error"], |
| 142 | + "no-constructor-return": "error", |
| 143 | + "no-multiple-empty-lines": [ |
| 144 | + "error", |
| 145 | + { |
| 146 | + "max": 1, |
| 147 | + "maxEOF": 1 |
| 148 | + } |
| 149 | + ], |
| 150 | + "no-empty-function": [ |
| 151 | + "error", |
| 152 | + { |
| 153 | + "allow": ["constructors"] |
| 154 | + } |
| 155 | + ], |
| 156 | + "max-lines": [ |
| 157 | + "error", |
| 158 | + { |
| 159 | + "max": 400, |
| 160 | + "skipComments": true |
| 161 | + } |
| 162 | + ], |
| 163 | + "@typescript-eslint/ban-types": "off", |
| 164 | + "@typescript-eslint/lines-between-class-members": [ |
| 165 | + "error", |
| 166 | + "always", |
| 167 | + { |
| 168 | + "exceptAfterSingleLine": true |
| 169 | + } |
| 170 | + ], |
| 171 | + "@typescript-eslint/explicit-function-return-type": [ |
| 172 | + "error", |
| 173 | + { |
| 174 | + "allowTypedFunctionExpressions": true, |
| 175 | + "allowExpressions": true |
| 176 | + } |
| 177 | + ], |
| 178 | + "@typescript-eslint/explicit-member-accessibility": [ |
| 179 | + "error", |
| 180 | + { |
| 181 | + "overrides": { |
| 182 | + "constructors": "no-public" |
| 183 | + } |
| 184 | + } |
| 185 | + ], |
| 186 | + "@typescript-eslint/no-shadow": "error", |
| 187 | + "@typescript-eslint/type-annotation-spacing": [ |
| 188 | + "error", |
| 189 | + { |
| 190 | + "before": false, |
| 191 | + "after": true, |
| 192 | + "overrides": { |
| 193 | + "arrow": { |
| 194 | + "before": true, |
| 195 | + "after": true |
| 196 | + } |
| 197 | + } |
| 198 | + } |
| 199 | + ], |
| 200 | + "@typescript-eslint/member-ordering": [ |
| 201 | + "error", |
| 202 | + { |
| 203 | + "default": [ |
| 204 | + "signature", |
| 205 | + "public-static-field", |
| 206 | + "protected-static-field", |
| 207 | + "private-static-field", |
| 208 | + "public-instance-field", |
| 209 | + "protected-instance-field", |
| 210 | + "private-instance-field", |
| 211 | + "public-abstract-field", |
| 212 | + "protected-abstract-field", |
| 213 | + "public-constructor", |
| 214 | + "protected-constructor", |
| 215 | + "public-static-method", |
| 216 | + "protected-static-method", |
| 217 | + "private-static-method", |
| 218 | + "public-instance-method", |
| 219 | + "protected-instance-method", |
| 220 | + "private-instance-method", |
| 221 | + "public-abstract-method", |
| 222 | + "protected-abstract-method" |
| 223 | + ] |
| 224 | + } |
| 225 | + ], |
| 226 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 227 | + "@typescript-eslint/no-namespace": "off", |
| 228 | + "@typescript-eslint/no-inferrable-types": "off", |
| 229 | + "@typescript-eslint/no-explicit-any": "off", |
| 230 | + "@angular-eslint/no-host-metadata-property": "off", |
| 231 | + "@angular-eslint/no-input-rename": "off" |
| 232 | + } |
| 233 | + }, |
| 234 | + { |
| 235 | + "files": ["*.spec.ts"], |
| 236 | + "rules": { |
| 237 | + "max-lines-per-function": "off" |
| 238 | + } |
| 239 | + } |
| 240 | + ] |
| 241 | +} |
0 commit comments