eslint-config-angular-strict 2.3.54 → 2.3.56
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/index.js +15 -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
|
|
@@ -94,6 +93,10 @@ export default [
|
|
|
94
93
|
'error',
|
|
95
94
|
{
|
|
96
95
|
accessibility: 'explicit',
|
|
96
|
+
ignoredMethodNames: [
|
|
97
|
+
'ngAfterContentChecked', 'ngAfterContentInit', 'ngAfterViewChecked', 'ngAfterViewInit',
|
|
98
|
+
'ngDoCheck', 'ngOnChanges', 'ngOnDestroy', 'ngOnInit',
|
|
99
|
+
],
|
|
97
100
|
overrides: { accessors: 'explicit', constructors: 'no-public', methods: 'explicit', properties: 'explicit', parameterProperties: 'explicit' },
|
|
98
101
|
},
|
|
99
102
|
],
|
|
@@ -130,6 +133,7 @@ export default [
|
|
|
130
133
|
customGroups: [
|
|
131
134
|
{ groupName: 'decorated-public', modifiers: ['decorated', 'public'], selector: 'property' },
|
|
132
135
|
{ groupName: 'decorated-private', modifiers: ['decorated', 'private'], selector: 'property' },
|
|
136
|
+
{ elementNamePattern: '^ng(OnChanges|OnInit|DoCheck|AfterContentInit|AfterContentChecked|AfterViewInit|AfterViewChecked|OnDestroy)$', groupName: 'lifecycle', selector: 'method' },
|
|
133
137
|
],
|
|
134
138
|
groups: [
|
|
135
139
|
'decorated-public',
|
|
@@ -137,6 +141,7 @@ export default [
|
|
|
137
141
|
['property', 'accessor-property'],
|
|
138
142
|
['private-property', 'private-accessor-property'],
|
|
139
143
|
'constructor',
|
|
144
|
+
{ group: 'lifecycle', type: 'unsorted' },
|
|
140
145
|
['get-method', 'set-method'],
|
|
141
146
|
['method', 'function-property'],
|
|
142
147
|
['private-method', 'private-function-property'],
|
|
@@ -177,6 +182,14 @@ export default [
|
|
|
177
182
|
},
|
|
178
183
|
],
|
|
179
184
|
'perfectionist/sort-intersection-types': ['error', { groups: ['unknown', 'nullish'] }],
|
|
185
|
+
'perfectionist/sort-objects': [
|
|
186
|
+
'error',
|
|
187
|
+
{
|
|
188
|
+
type: 'unsorted',
|
|
189
|
+
useConfigurationIf: { callingFunctionNamePattern: '^(Component|Directive|NgModule|Pipe)$' },
|
|
190
|
+
},
|
|
191
|
+
{},
|
|
192
|
+
],
|
|
180
193
|
'perfectionist/sort-union-types': ['error', { groups: ['unknown', 'nullish'] }],
|
|
181
194
|
|
|
182
195
|
// Unicorn rules
|