Skip to content

Commit 3c04f4e

Browse files
committed
fix angular lint errors cause by update of Angular ESLint
Disable rule `@angular-eslint/prefer-standalone` because changing to standalone components is a major breaking change for adopters.
1 parent 6cda91b commit 3c04f4e

2 files changed

Lines changed: 19 additions & 11 deletions

File tree

packages/angular-material/.eslintrc.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ module.exports = {
2222
'@angular-eslint/component-class-suffix': 'off',
2323
'@angular-eslint/directive-class-suffix': 'off',
2424
'@angular-eslint/no-conflicting-lifecycle': 'warn',
25+
// Angular ESLint 19+ reports non-standalone components as errors
26+
// However, we want keep using non-standalone components in the library
27+
// as changing this is a major breaking change for adopters
28+
'@angular-eslint/prefer-standalone': 'off',
2529
'@typescript-eslint/no-explicit-any': 'off',
2630
// Base rule must be disabled to avoid incorrect errors
2731
'no-unused-vars': 'off',
@@ -35,19 +39,19 @@ module.exports = {
3539
],
3640
// workaround for
3741
// https://github.com/import-js/eslint-plugin-import/issues/1810:
38-
"import/no-unresolved": [
39-
"error",
42+
'import/no-unresolved': [
43+
'error',
4044
{
4145
ignore: [
42-
"@angular/cdk/.*",
43-
"@angular/core/.*",
44-
"@angular/material/.*",
45-
"@angular/platform-browser/.*",
46-
"@angular/platform-browser-dynamic/.*",
47-
"core-js/es7/.*",
48-
"zone.js/.*",
49-
]
50-
}
46+
'@angular/cdk/.*',
47+
'@angular/core/.*',
48+
'@angular/material/.*',
49+
'@angular/platform-browser/.*',
50+
'@angular/platform-browser-dynamic/.*',
51+
'core-js/es7/.*',
52+
'zone.js/.*',
53+
],
54+
},
5155
],
5256
},
5357
};

packages/angular/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ module.exports = {
2222
'@angular-eslint/component-class-suffix': 'off',
2323
'@angular-eslint/directive-class-suffix': 'off',
2424
'@angular-eslint/no-conflicting-lifecycle': 'warn',
25+
// Angular ESLint 19+ reports non-standalone components as errors
26+
// However, we want keep using non-standalone components in the library
27+
// as changing this is a major breaking change for adopters
28+
'@angular-eslint/prefer-standalone': 'off',
2529
'@typescript-eslint/no-explicit-any': 'off',
2630
// Base rule must be disabled to avoid incorrect errors
2731
'no-unused-vars': 'off',

0 commit comments

Comments
 (0)