eslint-config-angular-strict 2.2.3 → 2.2.5
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 +0 -2
- package/package.json +1 -1
- package/tests/sample.component.ts +9 -25
package/index.js
CHANGED
|
@@ -138,8 +138,6 @@ export default [
|
|
|
138
138
|
'no-plusplus': 'off',
|
|
139
139
|
'no-restricted-globals': 'off',
|
|
140
140
|
'no-return-assign': 'off',
|
|
141
|
-
'no-underscore-dangle': 'off',
|
|
142
|
-
'prefer-destructuring': 'off',
|
|
143
141
|
'radix': ['error', 'as-needed'],
|
|
144
142
|
'sort-keys': ['error', 'asc', { allowLineSeparatedGroups: true, natural: true }]
|
|
145
143
|
},
|
package/package.json
CHANGED
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
|
|
3
|
-
// Test component with intentional violations to validate ESLint rules
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
4
2
|
|
|
5
3
|
@Component({
|
|
6
4
|
selector: 'app-sample',
|
|
7
5
|
templateUrl: './sample.component.html',
|
|
8
|
-
styleUrls: ['./sample.component.css'] // Should trigger consistent-component-styles
|
|
9
6
|
})
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
|
|
8
|
+
export class SampleComponent {
|
|
9
|
+
@Input() config: any;
|
|
12
10
|
private _items!: string[]; // Non-null assertion
|
|
13
11
|
public name = 'sample';
|
|
14
12
|
|
|
15
|
-
constructor(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
loadData() {
|
|
22
|
-
this._items = this.config?.items || [];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Method should be after getter based on member-ordering
|
|
26
|
-
processItems() {
|
|
27
|
-
return this._items.map(item => item.toUpperCase()); // Missing arrow function parens
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Getter should be before methods
|
|
31
|
-
get itemCount(): number {
|
|
32
|
-
return this._items?.length || 0;
|
|
13
|
+
constructor(
|
|
14
|
+
private _testt = 'test', // 'no-underscore-dangle'
|
|
15
|
+
) {
|
|
16
|
+
const _test = parseInt('42', 7); // 'as-needed' radix
|
|
33
17
|
}
|
|
34
|
-
}
|
|
18
|
+
}
|