eslint-config-angular-strict 2.3.56 → 2.3.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/index.js +41 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,10 +20,10 @@ A production-ready, opinionated ESLint configuration that enforces best practice
|
|
|
20
20
|
|
|
21
21
|
## Features
|
|
22
22
|
|
|
23
|
-
🅰️ **Angular**:
|
|
24
|
-
📘 **TypeScript**:
|
|
23
|
+
🅰️ **Angular**: 40+ rules for standalone, lifecycle, components/directives standards, metadata, signals, pipes,...<br>
|
|
24
|
+
📘 **TypeScript**: Promise-async, type imports, strict typing, type safety, extraneous classes,...<br>
|
|
25
25
|
✨ **Code Quality**: Complexity max, file length control, import cycles detection, 100+ Unicorn best practices,...<br>
|
|
26
|
-
🎨 **Style**: Airbnb extended, max line length, object/class newlines, sorted
|
|
26
|
+
🎨 **Style**: Airbnb extended, max line length, object/class newlines, sorted classes/imports/objects/types,...<br>
|
|
27
27
|
🔍 **Templates**: 30+ rules with alphabetical attrs, complexity max, control flow, trackBy, a11y, no-any,...
|
|
28
28
|
|
|
29
29
|
## What's Included
|
|
@@ -34,7 +34,8 @@ A production-ready, opinionated ESLint configuration that enforces best practice
|
|
|
34
34
|
- <img src="https://avatars.githubusercontent.com/u/53234240?s=48&" width="16" height="16"> [**Angular ESLint**](https://github.com/angular-eslint/angular-eslint) - Angular-specific rules
|
|
35
35
|
- <img src="https://eslint.org/icon-512.png" width="16" height="16"> [**ESLint**](https://github.com/eslint/eslint) - Core linting engine
|
|
36
36
|
- 📦 [**Import-X**](https://github.com/un-ts/eslint-plugin-import-x) - Import/export validation
|
|
37
|
-
- 🔤 [**NgModule Sort**](https://github.com/ducktordanny/eslint-plugin-ng-module-sort) -
|
|
37
|
+
- 🔤 [**NgModule Sort**](https://github.com/ducktordanny/eslint-plugin-ng-module-sort) - Angular sorting
|
|
38
|
+
- <img src="https://raw.githubusercontent.com/azat-io/eslint-plugin-perfectionist/main/docs/public/logo.svg" width="16" height="16"> [**Perfectionist**](https://github.com/azat-io/eslint-plugin-perfectionist) - Take Your Code to a Beauty Salon
|
|
38
39
|
- <img src="https://avatars.githubusercontent.com/u/144717797?s=48&" width="16" height="16"> [**Stylistic**](https://github.com/eslint-stylistic/eslint-stylistic) - Code formatting rules
|
|
39
40
|
- <img src="https://avatars.githubusercontent.com/u/46634674?s=48&" width="16" height="16"> [**TypeScript ESLint**](https://github.com/typescript-eslint/typescript-eslint) - TypeScript linting
|
|
40
41
|
- 🦄 [**Unicorn**](https://github.com/sindresorhus/eslint-plugin-unicorn) - More than 100 powerful ESLint rules
|
package/index.js
CHANGED
|
@@ -68,7 +68,7 @@ export default [
|
|
|
68
68
|
// Stylistic rules
|
|
69
69
|
'@stylistic/array-element-newline': ['error', { consistent: true, multiline: true }],
|
|
70
70
|
'@stylistic/arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
|
|
71
|
-
'@stylistic/lines-between-class-members':
|
|
71
|
+
'@stylistic/lines-between-class-members': 'off',
|
|
72
72
|
'@stylistic/max-len': ['error', { code: 165, tabWidth: 2 }],
|
|
73
73
|
'@stylistic/newline-per-chained-call': ['error', { ignoreChainWithDepth: 5 }],
|
|
74
74
|
'@stylistic/no-confusing-arrow': 'off',
|
|
@@ -94,8 +94,14 @@ export default [
|
|
|
94
94
|
{
|
|
95
95
|
accessibility: 'explicit',
|
|
96
96
|
ignoredMethodNames: [
|
|
97
|
-
'ngAfterContentChecked',
|
|
98
|
-
'
|
|
97
|
+
'ngAfterContentChecked',
|
|
98
|
+
'ngAfterContentInit',
|
|
99
|
+
'ngAfterViewChecked',
|
|
100
|
+
'ngAfterViewInit',
|
|
101
|
+
'ngDoCheck',
|
|
102
|
+
'ngOnChanges',
|
|
103
|
+
'ngOnDestroy',
|
|
104
|
+
'ngOnInit',
|
|
99
105
|
],
|
|
100
106
|
overrides: { accessors: 'explicit', constructors: 'no-public', methods: 'explicit', properties: 'explicit', parameterProperties: 'explicit' },
|
|
101
107
|
},
|
|
@@ -131,24 +137,45 @@ export default [
|
|
|
131
137
|
'error',
|
|
132
138
|
{
|
|
133
139
|
customGroups: [
|
|
134
|
-
{ groupName: 'decorated-public', modifiers: ['decorated', 'public']
|
|
135
|
-
{ groupName: 'decorated-private', modifiers: ['decorated', 'private']
|
|
136
|
-
{
|
|
140
|
+
{ groupName: 'decorated-public', modifiers: ['decorated', 'public'] },
|
|
141
|
+
{ groupName: 'decorated-private', modifiers: ['decorated', 'private'] },
|
|
142
|
+
{
|
|
143
|
+
elementNamePattern: '^ng(OnChanges|OnInit|DoCheck|AfterContentInit|AfterContentChecked|AfterViewInit|AfterViewChecked|OnDestroy)$',
|
|
144
|
+
groupName: 'lifecycle',
|
|
145
|
+
},
|
|
146
|
+
{ anyOf: [{ selector: 'get-method' }, { selector: 'set-method' }], groupName: 'public-accessors' },
|
|
147
|
+
{ anyOf: [{ selector: 'method' }, { selector: 'function-property' }], groupName: 'public-methods' },
|
|
148
|
+
{
|
|
149
|
+
anyOf: [
|
|
150
|
+
{ modifiers: ['private'], selector: 'get-method' },
|
|
151
|
+
{ modifiers: ['private'], selector: 'set-method' },
|
|
152
|
+
],
|
|
153
|
+
groupName: 'private-accessors',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
anyOf: [
|
|
157
|
+
{ modifiers: ['private'], selector: 'method' },
|
|
158
|
+
{ modifiers: ['private'], selector: 'function-property' },
|
|
159
|
+
],
|
|
160
|
+
groupName: 'private-methods',
|
|
161
|
+
},
|
|
137
162
|
],
|
|
138
163
|
groups: [
|
|
139
164
|
'decorated-public',
|
|
140
165
|
'decorated-private',
|
|
141
|
-
['property', 'accessor-property'],
|
|
142
|
-
['private-property', 'private-accessor-property'],
|
|
166
|
+
['property', 'accessor-property', 'static-property', 'static-accessor-property'],
|
|
167
|
+
['private-property', 'private-accessor-property', 'private-static-property', 'private-static-accessor-property'],
|
|
143
168
|
'constructor',
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
169
|
+
'static-block',
|
|
170
|
+
{ group: 'lifecycle', newlinesInside: 1, type: 'unsorted' },
|
|
171
|
+
{ group: 'public-accessors', newlinesInside: 1 },
|
|
172
|
+
{ group: 'public-methods', newlinesInside: 1 },
|
|
173
|
+
{ group: 'private-accessors', newlinesInside: 1 },
|
|
174
|
+
{ group: 'private-methods', newlinesInside: 1 },
|
|
148
175
|
'unknown',
|
|
149
176
|
],
|
|
150
177
|
newlinesBetween: 1,
|
|
151
|
-
newlinesInside:
|
|
178
|
+
newlinesInside: 0,
|
|
152
179
|
},
|
|
153
180
|
],
|
|
154
181
|
'perfectionist/sort-imports': [
|
|
@@ -218,7 +245,7 @@ export default [
|
|
|
218
245
|
'@angular-eslint/template/i18n': 'off',
|
|
219
246
|
'@angular-eslint/template/interactive-supports-focus': 'off',
|
|
220
247
|
'@angular-eslint/template/label-has-associated-control': 'off',
|
|
221
|
-
'@angular-eslint/template/no-call-expression':'off',
|
|
248
|
+
'@angular-eslint/template/no-call-expression': 'off',
|
|
222
249
|
'@angular-eslint/template/no-inline-styles': 'off',
|
|
223
250
|
'@angular-eslint/template/prefer-ngsrc': 'off',
|
|
224
251
|
|