eslint-config-angular-strict 2.3.55 → 2.3.57

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.
Files changed (3) hide show
  1. package/README.md +5 -4
  2. package/index.js +42 -12
  3. 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**: 30+ rules for standalone, lifecycle, components/directives standards, metadata, signals, pipes,...<br>
24
- 📘 **TypeScript**: Member ordering, promise-async, type imports, strict typing, type safety, extraneous classes,...<br>
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 keys/imports/decorators,...<br>
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) - Sorted decorator arrays
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,6 @@ 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': ['error', 'always', { exceptAfterSingleLine: true }],
72
71
  '@stylistic/max-len': ['error', { code: 165, tabWidth: 2 }],
73
72
  '@stylistic/newline-per-chained-call': ['error', { ignoreChainWithDepth: 5 }],
74
73
  '@stylistic/no-confusing-arrow': 'off',
@@ -93,6 +92,16 @@ export default [
93
92
  'error',
94
93
  {
95
94
  accessibility: 'explicit',
95
+ ignoredMethodNames: [
96
+ 'ngAfterContentChecked',
97
+ 'ngAfterContentInit',
98
+ 'ngAfterViewChecked',
99
+ 'ngAfterViewInit',
100
+ 'ngDoCheck',
101
+ 'ngOnChanges',
102
+ 'ngOnDestroy',
103
+ 'ngOnInit',
104
+ ],
96
105
  overrides: { accessors: 'explicit', constructors: 'no-public', methods: 'explicit', properties: 'explicit', parameterProperties: 'explicit' },
97
106
  },
98
107
  ],
@@ -127,24 +136,45 @@ export default [
127
136
  'error',
128
137
  {
129
138
  customGroups: [
130
- { groupName: 'decorated-public', modifiers: ['decorated', 'public'], selector: 'property' },
131
- { groupName: 'decorated-private', modifiers: ['decorated', 'private'], selector: 'property' },
132
- { elementNamePattern: '^ng(OnChanges|OnInit|DoCheck|AfterContentInit|AfterContentChecked|AfterViewInit|AfterViewChecked|OnDestroy)$', groupName: 'lifecycle', selector: 'method' },
139
+ { groupName: 'decorated-public', modifiers: ['decorated', 'public'] },
140
+ { groupName: 'decorated-private', modifiers: ['decorated', 'private'] },
141
+ {
142
+ elementNamePattern: '^ng(OnChanges|OnInit|DoCheck|AfterContentInit|AfterContentChecked|AfterViewInit|AfterViewChecked|OnDestroy)$',
143
+ groupName: 'lifecycle',
144
+ },
145
+ { anyOf: [{ selector: 'get-method' }, { selector: 'set-method' }], groupName: 'public-accessors' },
146
+ { anyOf: [{ selector: 'method' }, { selector: 'function-property' }], groupName: 'public-methods' },
147
+ {
148
+ anyOf: [
149
+ { modifiers: ['private'], selector: 'get-method' },
150
+ { modifiers: ['private'], selector: 'set-method' },
151
+ ],
152
+ groupName: 'private-accessors',
153
+ },
154
+ {
155
+ anyOf: [
156
+ { modifiers: ['private'], selector: 'method' },
157
+ { modifiers: ['private'], selector: 'function-property' },
158
+ ],
159
+ groupName: 'private-methods',
160
+ },
133
161
  ],
134
162
  groups: [
135
163
  'decorated-public',
136
164
  'decorated-private',
137
- ['property', 'accessor-property'],
138
- ['private-property', 'private-accessor-property'],
165
+ ['property', 'accessor-property', 'static-property', 'static-accessor-property'],
166
+ ['private-property', 'private-accessor-property', 'private-static-property', 'private-static-accessor-property'],
139
167
  'constructor',
140
- { group: 'lifecycle', type: 'unsorted' },
141
- ['get-method', 'set-method'],
142
- ['method', 'function-property'],
143
- ['private-method', 'private-function-property'],
168
+ 'static-block',
169
+ { group: 'lifecycle', newlinesInside: 1, type: 'unsorted' },
170
+ { group: 'public-accessors', newlinesInside: 1 },
171
+ { group: 'public-methods', newlinesInside: 1 },
172
+ { group: 'private-accessors', newlinesInside: 1 },
173
+ { group: 'private-methods', newlinesInside: 1 },
144
174
  'unknown',
145
175
  ],
146
176
  newlinesBetween: 1,
147
- newlinesInside: 'ignore',
177
+ newlinesInside: 0,
148
178
  },
149
179
  ],
150
180
  'perfectionist/sort-imports': [
@@ -214,7 +244,7 @@ export default [
214
244
  '@angular-eslint/template/i18n': 'off',
215
245
  '@angular-eslint/template/interactive-supports-focus': 'off',
216
246
  '@angular-eslint/template/label-has-associated-control': 'off',
217
- '@angular-eslint/template/no-call-expression':'off',
247
+ '@angular-eslint/template/no-call-expression': 'off',
218
248
  '@angular-eslint/template/no-inline-styles': 'off',
219
249
  '@angular-eslint/template/prefer-ngsrc': 'off',
220
250
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-angular-strict",
3
- "version": "2.3.55",
3
+ "version": "2.3.57",
4
4
  "description": "Modern ESLint configuration with strict rules for Angular development.",
5
5
  "keywords": [
6
6
  "angular",