|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "ignorePatterns": [ |
| 4 | + "projects/**/*" |
| 5 | + ], |
| 6 | + "overrides": [ |
| 7 | + { |
| 8 | + "files": [ |
| 9 | + "src/**/*.ts" |
| 10 | + ], |
| 11 | + "parserOptions": { |
| 12 | + "project": [ |
| 13 | + "tsconfig.json", |
| 14 | + "e2e/tsconfig.json" |
| 15 | + ], |
| 16 | + "createDefaultProgram": true |
| 17 | + }, |
| 18 | + "extends": [ |
| 19 | + "eslint:recommended", |
| 20 | + "plugin:import/recommended", |
| 21 | + "plugin:import/typescript", |
| 22 | + "plugin:rxjs/recommended", |
| 23 | + "plugin:@typescript-eslint/recommended", |
| 24 | + "plugin:@angular-eslint/recommended", |
| 25 | + "plugin:@angular-eslint/recommended--extra", |
| 26 | + "plugin:@angular-eslint/ng-cli-compat", |
| 27 | + "plugin:@angular-eslint/ng-cli-compat--formatting-add-on", |
| 28 | + "plugin:@angular-eslint/template/process-inline-templates", |
| 29 | + "prettier" |
| 30 | + ], |
| 31 | + "plugins": [ "jsdoc", "rxjs-angular", "unicorn" ], |
| 32 | + "rules": { |
| 33 | + // Excluded rules |
| 34 | + "@typescript-eslint/no-empty-interface": "off", |
| 35 | + "import/no-deprecated": "off", |
| 36 | + "import/no-unresolved": "off", |
| 37 | + "rxjs/no-async-subscribe": "off", |
| 38 | + "rxjs/no-sharereplay": "off", |
| 39 | + // Included rules |
| 40 | + "@angular-eslint/component-selector": [ |
| 41 | + "error", |
| 42 | + { |
| 43 | + "type": "element", |
| 44 | + "prefix": "ngx", |
| 45 | + "style": "kebab-case" |
| 46 | + } |
| 47 | + ], |
| 48 | + "@angular-eslint/directive-selector": [ |
| 49 | + "error", |
| 50 | + { |
| 51 | + "type": "attribute", |
| 52 | + "prefix": "ngx", |
| 53 | + "style": "camelCase" |
| 54 | + } |
| 55 | + ], |
| 56 | + "@angular-eslint/no-host-metadata-property": [ |
| 57 | + "error", |
| 58 | + { "allowStatic": true } |
| 59 | + ], |
| 60 | + "@angular-eslint/prefer-output-readonly": [ "error" ], |
| 61 | + "@angular-eslint/use-component-selector": [ "error" ], |
| 62 | + "@angular-eslint/use-component-view-encapsulation": [ "error" ], |
| 63 | + "@angular-eslint/use-lifecycle-interface": [ "error" ], |
| 64 | + "@typescript-eslint/array-type": [ |
| 65 | + "error", |
| 66 | + { |
| 67 | + "default": "array-simple" |
| 68 | + } |
| 69 | + ], |
| 70 | + "@typescript-eslint/consistent-type-assertions": [ |
| 71 | + "error", |
| 72 | + { |
| 73 | + "assertionStyle": "as", |
| 74 | + "objectLiteralTypeAssertions": "never" |
| 75 | + } |
| 76 | + ], |
| 77 | + "@typescript-eslint/consistent-type-definitions": [ "error" ], |
| 78 | + "@typescript-eslint/explicit-function-return-type": [ |
| 79 | + "error", |
| 80 | + { |
| 81 | + // Only functions which are part of a declaration will be checked. |
| 82 | + "allowExpressions": true |
| 83 | + } |
| 84 | + ], |
| 85 | + "@typescript-eslint/explicit-member-accessibility": [ |
| 86 | + "error", |
| 87 | + { "accessibility": "explicit" } |
| 88 | + ], |
| 89 | + "@typescript-eslint/explicit-module-boundary-types": [ "error" ], |
| 90 | + "@typescript-eslint/member-ordering": [ |
| 91 | + "error", |
| 92 | + { |
| 93 | + "default": [ |
| 94 | + "constructor", |
| 95 | + "static-field", |
| 96 | + "instance-field", |
| 97 | + "static-method", |
| 98 | + "instance-method" |
| 99 | + ] |
| 100 | + } |
| 101 | + ], |
| 102 | + "@typescript-eslint/naming-convention": [ |
| 103 | + "error", |
| 104 | + { |
| 105 | + "selector": "classProperty", |
| 106 | + "format": [ "PascalCase", "camelCase" ], |
| 107 | + "modifiers": [ "public" ] |
| 108 | + }, |
| 109 | + { |
| 110 | + "selector": "function", |
| 111 | + "format": [ "camelCase" ] |
| 112 | + }, |
| 113 | + { |
| 114 | + "selector": "interface", |
| 115 | + "format": [ "PascalCase" ], |
| 116 | + "custom": { |
| 117 | + "regex": "^I[A-Z]", |
| 118 | + "match": false |
| 119 | + } |
| 120 | + } |
| 121 | + ], |
| 122 | + "@typescript-eslint/no-empty-function": "error", |
| 123 | + "@typescript-eslint/no-explicit-any": "error", |
| 124 | + "@typescript-eslint/no-namespace": [ |
| 125 | + "error", |
| 126 | + { "allowDeclarations": true } |
| 127 | + ], |
| 128 | + "@typescript-eslint/no-unused-expressions": [ "error" ], |
| 129 | + "@typescript-eslint/no-unused-vars": [ |
| 130 | + "error", |
| 131 | + { |
| 132 | + "argsIgnorePattern": "^_", |
| 133 | + "ignoreRestSiblings": true, |
| 134 | + "varsIgnorePattern": "^_" |
| 135 | + } |
| 136 | + ], |
| 137 | + "@typescript-eslint/prefer-for-of": [ "warn" ], |
| 138 | + "@typescript-eslint/prefer-function-type": [ "warn" ], |
| 139 | + "@typescript-eslint/prefer-readonly": "error", |
| 140 | + "@typescript-eslint/unified-signatures": [ "warn" ], |
| 141 | + "eqeqeq": [ "error" ], |
| 142 | + "guard-for-in": [ "error" ], |
| 143 | + "import/no-default-export": [ "error" ], |
| 144 | + "jsdoc/check-alignment": [ "error" ], |
| 145 | + "jsdoc/check-indentation": [ "error" ], |
| 146 | + "no-bitwise": [ "error" ], |
| 147 | + "no-caller": [ "error" ], |
| 148 | + "no-console": [ "error" ], |
| 149 | + "no-duplicate-imports": [ "error" ], |
| 150 | + "no-empty": "error", |
| 151 | + "no-eval": [ "error" ], |
| 152 | + "no-new-wrappers": [ "error" ], |
| 153 | + "no-throw-literal": [ "error" ], |
| 154 | + "no-var": [ "error" ], |
| 155 | + "object-shorthand": [ "error" ], |
| 156 | + "one-var": [ "error", "never" ], |
| 157 | + "prefer-arrow/prefer-arrow-functions": "off", |
| 158 | + "prefer-const": [ "error" ], |
| 159 | + "radix": [ "error" ], |
| 160 | + "rxjs-angular/prefer-takeuntil": [ |
| 161 | + "error", |
| 162 | + { "alias": [ "untilDestroyed" ] } |
| 163 | + ], |
| 164 | + "rxjs/no-exposed-subjects": [ "error" ], |
| 165 | + "rxjs/no-finnish": [ "error" ], |
| 166 | + "rxjs/no-ignored-replay-buffer": [ "error" ], |
| 167 | + "rxjs/no-tap": [ "error" ], |
| 168 | + "rxjs/no-unsafe-takeuntil": [ |
| 169 | + "error", |
| 170 | + { "alias": [ "untilDestroyed" ] } |
| 171 | + ], |
| 172 | + "spaced-comment": [ |
| 173 | + "error", |
| 174 | + "always", |
| 175 | + { "block": { "balanced": true } } |
| 176 | + ], |
| 177 | + "unicorn/filename-case": [ |
| 178 | + "error", |
| 179 | + { "case": "kebabCase" } |
| 180 | + ] |
| 181 | + } |
| 182 | + }, |
| 183 | + { |
| 184 | + "files": [ |
| 185 | + "src/**/*.html" |
| 186 | + ], |
| 187 | + "parser": "@angular-eslint/template-parser", |
| 188 | + "extends": [ |
| 189 | + "plugin:@angular-eslint/template/recommended" |
| 190 | + ], |
| 191 | + "rules": {} |
| 192 | + } |
| 193 | + ] |
| 194 | +} |
0 commit comments