eslint-config-angular-strict 2.3.53 → 2.3.55

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 (2) hide show
  1. package/index.js +19 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -20,6 +20,7 @@ export default [
20
20
  'import-x': importXPlugin,
21
21
  'ng-module-sort': ngModuleSortPlugin,
22
22
  },
23
+ settings: { perfectionist: { type: 'natural' } },
23
24
  },
24
25
 
25
26
  ...configs.base.all,
@@ -39,8 +40,6 @@ export default [
39
40
  '@angular-eslint/component-class-suffix': ['error', { suffixes: ['Component', 'Drawer', 'Modal', 'Page'] }],
40
41
  '@angular-eslint/component-selector': 'off',
41
42
  '@angular-eslint/prefer-on-push-component-change-detection': 'off',
42
- '@angular-eslint/sort-keys-in-type-decorator': 'off',
43
- '@angular-eslint/sort-lifecycle-methods': 'off',
44
43
  '@angular-eslint/use-component-selector': 'off',
45
44
 
46
45
  // ESLint rules
@@ -130,6 +129,7 @@ export default [
130
129
  customGroups: [
131
130
  { groupName: 'decorated-public', modifiers: ['decorated', 'public'], selector: 'property' },
132
131
  { groupName: 'decorated-private', modifiers: ['decorated', 'private'], selector: 'property' },
132
+ { elementNamePattern: '^ng(OnChanges|OnInit|DoCheck|AfterContentInit|AfterContentChecked|AfterViewInit|AfterViewChecked|OnDestroy)$', groupName: 'lifecycle', selector: 'method' },
133
133
  ],
134
134
  groups: [
135
135
  'decorated-public',
@@ -137,6 +137,7 @@ export default [
137
137
  ['property', 'accessor-property'],
138
138
  ['private-property', 'private-accessor-property'],
139
139
  'constructor',
140
+ { group: 'lifecycle', type: 'unsorted' },
140
141
  ['get-method', 'set-method'],
141
142
  ['method', 'function-property'],
142
143
  ['private-method', 'private-function-property'],
@@ -161,17 +162,30 @@ export default [
161
162
  'firebase',
162
163
  'ng-zorro',
163
164
  'type-import',
164
- ['value-builtin', 'value-external'],
165
+ 'value-builtin',
166
+ 'value-external',
165
167
  'type-internal',
166
168
  'value-internal',
167
- ['type-parent', 'type-sibling', 'type-index'],
168
- ['value-parent', 'value-sibling', 'value-index'],
169
+ 'type-parent',
170
+ 'type-sibling',
171
+ 'type-index',
172
+ 'value-parent',
173
+ 'value-sibling',
174
+ 'value-index',
169
175
  'ts-equals-import',
170
176
  'unknown',
171
177
  ],
172
178
  },
173
179
  ],
174
180
  'perfectionist/sort-intersection-types': ['error', { groups: ['unknown', 'nullish'] }],
181
+ 'perfectionist/sort-objects': [
182
+ 'error',
183
+ {
184
+ type: 'unsorted',
185
+ useConfigurationIf: { callingFunctionNamePattern: '^(Component|Directive|NgModule|Pipe)$' },
186
+ },
187
+ {},
188
+ ],
175
189
  'perfectionist/sort-union-types': ['error', { groups: ['unknown', 'nullish'] }],
176
190
 
177
191
  // Unicorn rules
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-angular-strict",
3
- "version": "2.3.53",
3
+ "version": "2.3.55",
4
4
  "description": "Modern ESLint configuration with strict rules for Angular development.",
5
5
  "keywords": [
6
6
  "angular",