eslint-config-angular-strict 2.3.74 → 2.3.76

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 -1
  2. package/index.js +22 -0
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -90,9 +90,12 @@ Make sure your `tsconfig.json` is properly configured:
90
90
  "strict": true
91
91
  },
92
92
  "angularCompilerOptions": {
93
+ // ...
94
+ "extendedDiagnostics": { "defaultCategory": "error" },
93
95
  "strictInjectionParameters": true,
94
96
  "strictStandalone": true,
95
- "strictTemplates": true
97
+ "strictTemplates": true,
98
+ "typeCheckHostBindings": true
96
99
  }
97
100
  }
98
101
  ```
@@ -134,6 +137,7 @@ This config handles **TypeScript formatting via ESLint**. Prettier should only b
134
137
 
135
138
  ```jsonc
136
139
  {
140
+ // ...
137
141
  "[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
138
142
  "editor.defaultFormatter": "dbaeumer.vscode-eslint",
139
143
  "editor.formatOnSave": true,
package/index.js CHANGED
@@ -4,6 +4,7 @@ import angularTemplateParser from '@angular-eslint/template-parser';
4
4
  import angularTemplatePlugin from '@angular-eslint/eslint-plugin-template';
5
5
  import importXPlugin from 'eslint-plugin-import-x';
6
6
  import perfectionistPlugin from 'eslint-plugin-perfectionist';
7
+ import rdlaboRulesPlugin from '@rdlabo/eslint-plugin-rules';
7
8
  import stylistic from '@stylistic/eslint-plugin';
8
9
  import tsEslintParser from '@typescript-eslint/parser';
9
10
  import tsEslintPlugin from '@typescript-eslint/eslint-plugin';
@@ -14,6 +15,7 @@ export default [
14
15
  ignores: ['dist/**', 'node_modules/**'],
15
16
  plugins: {
16
17
  '@angular-eslint/template': angularTemplatePlugin,
18
+ '@rdlabo/rules': rdlaboRulesPlugin,
17
19
  '@stylistic': stylistic,
18
20
  '@typescript-eslint': tsEslintPlugin,
19
21
  'import-x': importXPlugin,
@@ -60,6 +62,9 @@ export default [
60
62
  'import-x/order': 'off',
61
63
  'import-x/prefer-default-export': 'off',
62
64
 
65
+ // Rdlabo rules
66
+ '@rdlabo/rules/component-property-use-readonly': ['error', { ignorePrivateProperties: true }],
67
+
63
68
  // Stylistic rules
64
69
  '@stylistic/array-element-newline': ['error', { consistent: true, multiline: true }],
65
70
  '@stylistic/arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
@@ -154,6 +159,20 @@ export default [
154
159
  ],
155
160
  groupName: 'private-methods',
156
161
  },
162
+ {
163
+ anyOf: [
164
+ { modifiers: ['protected'], selector: 'get-method' },
165
+ { modifiers: ['protected'], selector: 'set-method' },
166
+ ],
167
+ groupName: 'protected-accessors',
168
+ },
169
+ {
170
+ anyOf: [
171
+ { modifiers: ['protected'], selector: 'method' },
172
+ { modifiers: ['protected'], selector: 'function-property' },
173
+ ],
174
+ groupName: 'protected-methods',
175
+ },
157
176
  { anyOf: [{ selector: 'get-method' }, { selector: 'set-method' }], groupName: 'public-accessors' },
158
177
  { anyOf: [{ selector: 'method' }, { selector: 'function-property' }], groupName: 'public-methods' },
159
178
  ],
@@ -161,12 +180,15 @@ export default [
161
180
  'decorated-public',
162
181
  'decorated-private',
163
182
  ['property', 'accessor-property', 'static-property', 'static-accessor-property'],
183
+ ['protected-property', 'protected-accessor-property', 'protected-static-property', 'protected-static-accessor-property'],
164
184
  ['private-property', 'private-accessor-property', 'private-static-property', 'private-static-accessor-property'],
165
185
  'ctor',
166
186
  'static-block',
167
187
  { group: 'lifecycle', newlinesInside: 1, type: 'unsorted' },
168
188
  { group: 'public-accessors', newlinesInside: 1 },
169
189
  { group: 'public-methods', newlinesInside: 1 },
190
+ { group: 'protected-accessors', newlinesInside: 1 },
191
+ { group: 'protected-methods', newlinesInside: 1 },
170
192
  { group: 'private-accessors', newlinesInside: 1 },
171
193
  { group: 'private-methods', newlinesInside: 1 },
172
194
  'unknown',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-angular-strict",
3
- "version": "2.3.74",
3
+ "version": "2.3.76",
4
4
  "description": "Modern ESLint configuration with strict rules for Angular development.",
5
5
  "keywords": [
6
6
  "angular",
@@ -39,6 +39,7 @@
39
39
  "@angular-eslint/eslint-plugin": "21.3.1",
40
40
  "@angular-eslint/eslint-plugin-template": "21.3.1",
41
41
  "@angular-eslint/template-parser": "21.3.1",
42
+ "@rdlabo/eslint-plugin-rules": "21.0.0",
42
43
  "@stylistic/eslint-plugin": "5.10.0",
43
44
  "@typescript-eslint/eslint-plugin": "8.59.2",
44
45
  "@typescript-eslint/parser": "8.59.2",