Skip to content

Commit d5d2bf9

Browse files
L-X-Tclaude
andcommitted
build: migrate to ESLint 9 flat config
Replace legacy .eslintrc.json files with a flat eslint.config.js that preserves the existing ruleset (eslint:recommended, typescript-eslint recommended, angular-eslint recommended + inline templates, template recommended + accessibility, and the lib selector rules). - eslint ^8.57.0 -> ^9.39.4 - @typescript-eslint/* v7 packages -> typescript-eslint ^8.61.0 - individual @angular-eslint/* packages -> angular-eslint 21.4.0 meta package (resolves the previously unsupported combination of @angular-eslint 21 with ESLint 8) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a60556a commit d5d2bf9

5 files changed

Lines changed: 485 additions & 799 deletions

File tree

.eslintrc.json

Lines changed: 0 additions & 47 deletions
This file was deleted.

eslint.config.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// @ts-check
2+
const eslint = require('@eslint/js');
3+
const tseslint = require('typescript-eslint');
4+
const angular = require('angular-eslint');
5+
6+
module.exports = tseslint.config(
7+
{
8+
files: ['**/*.ts'],
9+
extends: [
10+
eslint.configs.recommended,
11+
...tseslint.configs.recommended,
12+
...angular.configs.tsRecommended,
13+
],
14+
processor: angular.processInlineTemplates,
15+
rules: {
16+
'@angular-eslint/directive-selector': [
17+
'error',
18+
{
19+
type: 'attribute',
20+
prefix: 'lib',
21+
style: 'camelCase',
22+
},
23+
],
24+
'@angular-eslint/component-selector': [
25+
'error',
26+
{
27+
type: 'element',
28+
prefix: 'lib',
29+
style: 'kebab-case',
30+
},
31+
],
32+
},
33+
},
34+
{
35+
files: ['**/*.html'],
36+
extends: [
37+
...angular.configs.templateRecommended,
38+
...angular.configs.templateAccessibility,
39+
],
40+
rules: {},
41+
}
42+
);

0 commit comments

Comments
 (0)