|
1 | 1 | { |
2 | 2 | "root": true, |
3 | | - "ignorePatterns": [ |
4 | | - "projects/**/*" |
5 | | - ], |
| 3 | + "ignorePatterns": ["projects/**/*"], |
6 | 4 | "overrides": [ |
7 | 5 | { |
8 | | - "files": [ |
9 | | - "*.ts" |
10 | | - ], |
| 6 | + "files": ["*.ts"], |
11 | 7 | "parserOptions": { |
12 | | - "project": [ |
13 | | - "tsconfig.json", |
14 | | - "e2e/tsconfig.json" |
15 | | - ], |
| 8 | + "project": ["tsconfig.json"], |
16 | 9 | "createDefaultProgram": true |
17 | 10 | }, |
18 | | - "extends": [ |
19 | | - "plugin:@angular-eslint/ng-cli-compat", |
20 | | - "plugin:@angular-eslint/ng-cli-compat--formatting-add-on", |
21 | | - "plugin:@angular-eslint/template/process-inline-templates" |
22 | | - ], |
23 | 11 | "plugins": [ |
24 | | - "sonarjs" |
| 12 | + "eslint-comments", |
| 13 | + "import", |
| 14 | + "optimize-regex", |
| 15 | + "promise", |
| 16 | + "security", |
| 17 | + "sonarjs", |
| 18 | + "rxjs-angular" |
| 19 | + ], |
| 20 | + "extends": [ |
| 21 | + "eslint:recommended", |
| 22 | + "plugin:@typescript-eslint/recommended", |
| 23 | + "plugin:eslint-comments/recommended", |
| 24 | + "plugin:import/warnings", |
| 25 | + "plugin:import/typescript", |
| 26 | + "plugin:optimize-regex/all", |
| 27 | + "plugin:sonarjs/recommended", |
| 28 | + "plugin:prettier/recommended", |
| 29 | + "plugin:promise/recommended", |
| 30 | + "plugin:regexp/recommended", |
| 31 | + "plugin:security/recommended", |
| 32 | + "plugin:@angular-eslint/recommended" |
25 | 33 | ], |
26 | 34 | "rules": { |
27 | | - "@angular-eslint/component-selector": [ |
28 | | - "error", |
29 | | - { |
30 | | - "type": "element", |
31 | | - "prefix": "app", |
32 | | - "style": "kebab-case" |
33 | | - } |
34 | | - ], |
35 | | - "@angular-eslint/directive-selector": [ |
36 | | - "error", |
37 | | - { |
38 | | - "type": "attribute", |
39 | | - "prefix": "app", |
40 | | - "style": "camelCase" |
41 | | - } |
42 | | - ], |
43 | 35 | "@typescript-eslint/await-thenable": "error", |
44 | 36 | "@typescript-eslint/ban-types": [ |
45 | 37 | "error", |
|
78 | 70 | "ignoreStringArrays": true |
79 | 71 | } |
80 | 72 | ], |
81 | | - "brace-style": [ |
82 | | - "error", |
83 | | - "1tbs", |
84 | | - { "allowSingleLine": true } |
85 | | - ], |
| 73 | + "@typescript-eslint/quotes": "off", |
| 74 | + "@typescript-eslint/naming-convention": "off", |
| 75 | + "@typescript-eslint/member-ordering": "off", |
| 76 | + "@typescript-eslint/no-shadow": ["error"], |
| 77 | + "@typescript-eslint/no-unused-expressions": "off", |
| 78 | + "brace-style": ["error", "1tbs", { "allowSingleLine": true }], |
86 | 79 | "default-case-last": "error", |
87 | 80 | "dot-notation": "off", |
88 | 81 | "id-denylist": "off", |
89 | 82 | "id-match": "off", |
90 | | - "complexity": ["error", { "max": 6 }], |
| 83 | + "complexity": ["error", { "max": 8 }], |
91 | 84 | "max-len": [ |
92 | 85 | "error", |
93 | 86 | { |
94 | | - "code": 180 |
| 87 | + "code": 600 |
95 | 88 | } |
96 | 89 | ], |
97 | 90 | "max-lines-per-function": [ |
98 | 91 | "error", |
99 | 92 | { |
100 | | - "max": 300 |
| 93 | + "max": 30 |
101 | 94 | } |
102 | 95 | ], |
103 | 96 | "max-params": [ |
104 | 97 | "error", |
105 | 98 | { |
106 | | - "max": 10 |
| 99 | + "max": 3 |
107 | 100 | } |
108 | 101 | ], |
109 | | - "no-empty-function": "off", |
110 | | - "no-empty-pattern": "error", |
111 | | - "no-extra-semi": "error", |
112 | | - "no-multi-str": "off", |
113 | | - "no-self-assign": "error", |
114 | | - "no-shadow": "off", |
115 | | - "no-underscore-dangle": "off", |
116 | | - "no-unused-expressions": ["error", { "allowTernary": true }], |
117 | | - "no-use-before-define": "off", |
118 | | - "semi": "off", |
119 | | - "sonarjs/cognitive-complexity": "error", |
120 | | - "sonarjs/max-switch-cases": "error", |
121 | | - "sonarjs/no-all-duplicated-branches": "error", |
122 | | - "sonarjs/no-collapsible-if": "error", |
123 | | - "sonarjs/no-collection-size-mischeck": "error", |
124 | | - "sonarjs/no-duplicate-string": "error", |
125 | | - "sonarjs/no-duplicated-branches": "error", |
126 | | - "sonarjs/no-element-overwrite": "error", |
127 | | - "sonarjs/no-identical-conditions": "error", |
128 | | - "sonarjs/no-identical-expressions": "error", |
129 | | - "sonarjs/no-identical-functions": "error", |
130 | | - "sonarjs/no-inverted-boolean-check": "error", |
131 | | - "sonarjs/no-one-iteration-loop": "error", |
132 | | - "sonarjs/no-redundant-boolean": "error", |
133 | | - "sonarjs/no-redundant-jump": "error", |
134 | | - "sonarjs/no-same-line-conditional": "error", |
135 | | - "sonarjs/no-small-switch": "error", |
136 | | - "sonarjs/no-unused-collection": "error", |
137 | | - "sonarjs/no-use-of-empty-return-value": "error", |
138 | | - "sonarjs/no-useless-catch": "error", |
139 | | - "sonarjs/prefer-immediate-return": "error", |
140 | | - "@typescript-eslint/quotes": "off", |
141 | | - "@typescript-eslint/naming-convention": "off", |
142 | | - "@typescript-eslint/member-ordering": "off", |
143 | | - "@typescript-eslint/no-shadow": ["error"], |
144 | | - "@typescript-eslint/no-unused-expressions": "off", |
145 | | - "id-blacklist": "off", |
146 | | - "quote-props": [ |
147 | | - "off", |
148 | | - "as-needed" |
| 102 | + "@angular-eslint/directive-selector": "error", |
| 103 | + "@angular-eslint/use-injectable-provided-in": "error", |
| 104 | + "@angular-eslint/use-lifecycle-interface": "error", |
| 105 | + "@angular-eslint/no-pipe-impure": "error", |
| 106 | + "@angular-eslint/prefer-on-push-component-change-detection": "error", |
| 107 | + "@angular-eslint/no-conflicting-lifecycle": "error", |
| 108 | + "@angular-eslint/no-forward-ref": "error", |
| 109 | + "@angular-eslint/no-input-prefix": "error", |
| 110 | + "@angular-eslint/no-input-rename": "error", |
| 111 | + "@angular-eslint/no-output-on-prefix": "error", |
| 112 | + "@angular-eslint/no-output-rename": "error", |
| 113 | + "@angular-eslint/prefer-output-readonly": "error", |
| 114 | + "@angular-eslint/relative-url-prefix": "error", |
| 115 | + "@angular-eslint/use-component-selector": "error", |
| 116 | + "@angular-eslint/use-component-view-encapsulation": "error", |
| 117 | + "@angular-eslint/use-pipe-transform-interface": "error", |
| 118 | + "@angular-eslint/component-class-suffix": "error", |
| 119 | + "@angular-eslint/directive-class-suffix": "error", |
| 120 | + "@angular-eslint/no-host-metadata-property": "error", |
| 121 | + "@angular-eslint/no-inputs-metadata-property": "error", |
| 122 | + "@angular-eslint/no-outputs-metadata-property": "error", |
| 123 | + "@angular-eslint/no-queries-metadata-property": "error", |
| 124 | + "@angular-eslint/pipe-prefix": "error", |
| 125 | + "@angular-eslint/component-selector": [ |
| 126 | + "error", |
| 127 | + { |
| 128 | + "type": "element", |
| 129 | + "prefix": "app", |
| 130 | + "style": "kebab-case" |
| 131 | + } |
149 | 132 | ], |
150 | | - "object-shorthand": "off", |
151 | | - "import/no-extraneous-dependencies": "off", |
152 | | - "no-extra-parens": "off", |
153 | | - "arrow-body-style": ["off", "as-needed"], |
154 | | - "prefer-arrow/prefer-arrow-functions": "off", |
155 | | - "one-var": "off" } |
| 133 | + "rxjs-angular/prefer-takeuntil": [ |
| 134 | + "error", |
| 135 | + { |
| 136 | + "alias": ["untilDestroyed"], |
| 137 | + "checkComplete": true, |
| 138 | + "checkDecorators": ["Component"], |
| 139 | + "checkDestroy": false |
| 140 | + } |
| 141 | + ] |
| 142 | + } |
156 | 143 | }, |
157 | 144 | { |
158 | | - "files": [ |
159 | | - "*.html" |
160 | | - ], |
161 | | - "extends": [ |
162 | | - "plugin:@angular-eslint/template/recommended" |
163 | | - ], |
164 | | - "rules": {} |
| 145 | + "files": ["*.html"], |
| 146 | + "extends": ["plugin:@angular-eslint/template/recommended"], |
| 147 | + "rules": { |
| 148 | + "@angular-eslint/template/no-call-expression": "error", |
| 149 | + "@angular-eslint/template/no-any": "error", |
| 150 | + "@angular-eslint/template/no-autofocus": "error", |
| 151 | + "@angular-eslint/template/no-distracting-elements": "error", |
| 152 | + "@angular-eslint/template/accessibility-alt-text": "error", |
| 153 | + "@angular-eslint/template/no-positive-tabindex": "error", |
| 154 | + "@angular-eslint/template/no-negated-async": "error", |
| 155 | + "@angular-eslint/template/accessibility-valid-aria": "error", |
| 156 | + "@angular-eslint/template/accessibility-elements-content": "error", |
| 157 | + "@angular-eslint/template/accessibility-label-for": "error", |
| 158 | + "@angular-eslint/template/click-events-have-key-events": "error", |
| 159 | + "@angular-eslint/template/mouse-events-have-key-events": "error", |
| 160 | + "@angular-eslint/template/accessibility-table-scope": "error", |
| 161 | + "@angular-eslint/template/conditional-complexity": "error", |
| 162 | + "@angular-eslint/template/use-track-by-function": "error", |
| 163 | + "@angular-eslint/template/i18n": "off" |
| 164 | + } |
165 | 165 | } |
166 | 166 | ] |
167 | 167 | } |
0 commit comments