eslint-config-angular-strict 2.3.54 → 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 +11 -2
  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'],
@@ -177,6 +178,14 @@ export default [
177
178
  },
178
179
  ],
179
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
+ ],
180
189
  'perfectionist/sort-union-types': ['error', { groups: ['unknown', 'nullish'] }],
181
190
 
182
191
  // Unicorn rules
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-angular-strict",
3
- "version": "2.3.54",
3
+ "version": "2.3.55",
4
4
  "description": "Modern ESLint configuration with strict rules for Angular development.",
5
5
  "keywords": [
6
6
  "angular",