|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "plugins": [ |
| 4 | + "@typescript-eslint", |
| 5 | + "@angular-eslint/eslint-plugin", |
| 6 | + "eslint-plugin-import", |
| 7 | + "eslint-plugin-jsdoc", |
| 8 | + "eslint-plugin-deprecation", |
| 9 | + "unused-imports", |
| 10 | + "eslint-plugin-lodash" |
| 11 | + ], |
| 12 | + "overrides": [ |
| 13 | + { |
| 14 | + "files": [ |
| 15 | + "*.ts" |
| 16 | + ], |
| 17 | + "parserOptions": { |
| 18 | + "project": [ |
| 19 | + "./tsconfig.json", |
| 20 | + "./cypress/tsconfig.json" |
| 21 | + ], |
| 22 | + "createDefaultProgram": true |
| 23 | + }, |
| 24 | + "extends": [ |
| 25 | + "eslint:recommended", |
| 26 | + "plugin:@typescript-eslint/recommended", |
| 27 | + "plugin:@typescript-eslint/recommended-requiring-type-checking", |
| 28 | + "plugin:@angular-eslint/recommended", |
| 29 | + "plugin:@angular-eslint/template/process-inline-templates" |
| 30 | + ], |
| 31 | + "rules": { |
| 32 | + "max-classes-per-file": [ |
| 33 | + "error", |
| 34 | + 1 |
| 35 | + ], |
| 36 | + "comma-dangle": [ |
| 37 | + "off", |
| 38 | + "always-multiline" |
| 39 | + ], |
| 40 | + "eol-last": [ |
| 41 | + "error", |
| 42 | + "always" |
| 43 | + ], |
| 44 | + "no-console": [ |
| 45 | + "error", |
| 46 | + { |
| 47 | + "allow": [ |
| 48 | + "log", |
| 49 | + "warn", |
| 50 | + "dir", |
| 51 | + "timeLog", |
| 52 | + "assert", |
| 53 | + "clear", |
| 54 | + "count", |
| 55 | + "countReset", |
| 56 | + "group", |
| 57 | + "groupEnd", |
| 58 | + "table", |
| 59 | + "debug", |
| 60 | + "info", |
| 61 | + "dirxml", |
| 62 | + "error", |
| 63 | + "groupCollapsed", |
| 64 | + "Console", |
| 65 | + "profile", |
| 66 | + "profileEnd", |
| 67 | + "timeStamp", |
| 68 | + "context" |
| 69 | + ] |
| 70 | + } |
| 71 | + ], |
| 72 | + "curly": "error", |
| 73 | + "brace-style": [ |
| 74 | + "error", |
| 75 | + "1tbs", |
| 76 | + { |
| 77 | + "allowSingleLine": true |
| 78 | + } |
| 79 | + ], |
| 80 | + "eqeqeq": [ |
| 81 | + "error", |
| 82 | + "always", |
| 83 | + { |
| 84 | + "null": "ignore" |
| 85 | + } |
| 86 | + ], |
| 87 | + "radix": "error", |
| 88 | + "guard-for-in": "error", |
| 89 | + "no-bitwise": "error", |
| 90 | + "no-restricted-imports": "error", |
| 91 | + "no-caller": "error", |
| 92 | + "no-debugger": "error", |
| 93 | + "no-redeclare": "error", |
| 94 | + "no-eval": "error", |
| 95 | + "no-fallthrough": "error", |
| 96 | + "no-trailing-spaces": "error", |
| 97 | + "space-infix-ops": "error", |
| 98 | + "keyword-spacing": "error", |
| 99 | + "no-var": "error", |
| 100 | + "no-unused-expressions": [ |
| 101 | + "error", |
| 102 | + { |
| 103 | + "allowTernary": true |
| 104 | + } |
| 105 | + ], |
| 106 | + "prefer-const": "off", // todo: re-enable & fix errors (more strict than it used to be in TSLint) |
| 107 | + "prefer-spread": "off", |
| 108 | + "no-underscore-dangle": "off", |
| 109 | + |
| 110 | + // todo: disabled rules from eslint:recommended, consider re-enabling & fixing |
| 111 | + "no-prototype-builtins": "off", |
| 112 | + "no-useless-escape": "off", |
| 113 | + "no-case-declarations": "off", |
| 114 | + "no-extra-boolean-cast": "off", |
| 115 | + |
| 116 | + "@angular-eslint/directive-selector": [ |
| 117 | + "error", |
| 118 | + { |
| 119 | + "type": "attribute", |
| 120 | + "prefix": "ds", |
| 121 | + "style": "camelCase" |
| 122 | + } |
| 123 | + ], |
| 124 | + "@angular-eslint/component-selector": [ |
| 125 | + "error", |
| 126 | + { |
| 127 | + "type": "element", |
| 128 | + "prefix": "ds", |
| 129 | + "style": "kebab-case" |
| 130 | + } |
| 131 | + ], |
| 132 | + "@angular-eslint/pipe-prefix": [ |
| 133 | + "error", |
| 134 | + { |
| 135 | + "prefixes": [ |
| 136 | + "ds" |
| 137 | + ] |
| 138 | + } |
| 139 | + ], |
| 140 | + "@angular-eslint/no-attribute-decorator": "error", |
| 141 | + "@angular-eslint/no-forward-ref": "error", |
| 142 | + "@angular-eslint/no-output-native": "warn", |
| 143 | + "@angular-eslint/no-output-on-prefix": "warn", |
| 144 | + "@angular-eslint/no-conflicting-lifecycle": "warn", |
| 145 | + |
| 146 | + "@typescript-eslint/no-inferrable-types":[ |
| 147 | + "error", |
| 148 | + { |
| 149 | + "ignoreParameters": true |
| 150 | + } |
| 151 | + ], |
| 152 | + "@typescript-eslint/quotes": [ |
| 153 | + "error", |
| 154 | + "single", |
| 155 | + { |
| 156 | + "avoidEscape": true, |
| 157 | + "allowTemplateLiterals": true |
| 158 | + } |
| 159 | + ], |
| 160 | + "@typescript-eslint/semi": "error", |
| 161 | + "@typescript-eslint/no-shadow": "error", |
| 162 | + "@typescript-eslint/dot-notation": "error", |
| 163 | + "@typescript-eslint/consistent-type-definitions": "error", |
| 164 | + "@typescript-eslint/prefer-function-type": "error", |
| 165 | + "@typescript-eslint/naming-convention": [ |
| 166 | + "error", |
| 167 | + { |
| 168 | + "selector": "property", |
| 169 | + "format": null |
| 170 | + } |
| 171 | + ], |
| 172 | + "@typescript-eslint/member-ordering": [ |
| 173 | + "error", |
| 174 | + { |
| 175 | + "default": [ |
| 176 | + "static-field", |
| 177 | + "instance-field", |
| 178 | + "static-method", |
| 179 | + "instance-method" |
| 180 | + ] |
| 181 | + } |
| 182 | + ], |
| 183 | + "@typescript-eslint/type-annotation-spacing": "error", |
| 184 | + "@typescript-eslint/unified-signatures": "error", |
| 185 | + "@typescript-eslint/ban-types": "warn", // todo: deal with {} type issues & re-enable |
| 186 | + "@typescript-eslint/no-floating-promises": "warn", |
| 187 | + "@typescript-eslint/no-misused-promises": "warn", |
| 188 | + "@typescript-eslint/restrict-plus-operands": "warn", |
| 189 | + "@typescript-eslint/unbound-method": "off", |
| 190 | + "@typescript-eslint/ban-ts-comment": "off", |
| 191 | + "@typescript-eslint/no-var-requires": "off", |
| 192 | + "@typescript-eslint/no-unused-vars": "off", |
| 193 | + "@typescript-eslint/no-unnecessary-type-assertion": "off", |
| 194 | + "@typescript-eslint/no-explicit-any": "off", |
| 195 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 196 | + "@typescript-eslint/no-unsafe-member-access": "off", |
| 197 | + "@typescript-eslint/no-unsafe-call": "off", |
| 198 | + "@typescript-eslint/no-unsafe-argument": "off", |
| 199 | + "@typescript-eslint/no-unsafe-return": "off", |
| 200 | + "@typescript-eslint/restrict-template-expressions": "off", |
| 201 | + "@typescript-eslint/require-await": "off", |
| 202 | + |
| 203 | + "deprecation/deprecation": "warn", |
| 204 | + |
| 205 | + "import/order": "off", |
| 206 | + "import/no-deprecated": "warn", |
| 207 | + "import/no-namespace": "error", |
| 208 | + "unused-imports/no-unused-imports": "error", |
| 209 | + "lodash/import-scope": [ |
| 210 | + "error", |
| 211 | + "method" |
| 212 | + ] |
| 213 | + } |
| 214 | + }, |
| 215 | + { |
| 216 | + "files": [ |
| 217 | + "*.html" |
| 218 | + ], |
| 219 | + "extends": [ |
| 220 | + "plugin:@angular-eslint/template/recommended" |
| 221 | + ], |
| 222 | + "rules": { |
| 223 | + // todo: re-enable & fix errors |
| 224 | + "@angular-eslint/template/no-negated-async": "off", |
| 225 | + "@angular-eslint/template/eqeqeq": "off" |
| 226 | + } |
| 227 | + } |
| 228 | + ] |
| 229 | +} |
0 commit comments