1- import path from " node:path" ;
2- import { fileURLToPath } from " node:url" ;
3- import js from " @eslint/js" ;
4- import { FlatCompat } from " @eslint/eslintrc" ;
1+ import path from ' node:path' ;
2+ import { fileURLToPath } from ' node:url' ;
3+ import js from ' @eslint/js' ;
4+ import { FlatCompat } from ' @eslint/eslintrc' ;
55
66const __filename = fileURLToPath ( import . meta. url ) ;
77const __dirname = path . dirname ( __filename ) ;
88const compat = new FlatCompat ( {
9- baseDirectory : __dirname ,
10- recommendedConfig : js . configs . recommended ,
11- allConfig : js . configs . all
9+ baseDirectory : __dirname ,
10+ recommendedConfig : js . configs . recommended ,
11+ allConfig : js . configs . all
1212} ) ;
1313
14- export default [ {
15- ignores : [ "projects/**/*" ] ,
16- } , ...compat . extends (
17- "eslint:recommended" ,
18- "plugin:@typescript-eslint/recommended" ,
19- "plugin:@angular-eslint/recommended" ,
20- "plugin:@angular-eslint/template/process-inline-templates" ,
21- ) . map ( config => ( {
22- ...config ,
23- files : [ "**/*.ts" ] ,
24- } ) ) , {
25- files : [ "**/*.ts" ] ,
26-
14+ export default [
15+ {
16+ ignores : [ 'projects/**/*' ]
17+ } ,
18+ ...compat
19+ . extends (
20+ 'eslint:recommended' ,
21+ 'plugin:@typescript-eslint/recommended' ,
22+ 'plugin:@angular-eslint/recommended' ,
23+ 'plugin:@angular-eslint/template/process-inline-templates'
24+ )
25+ . map ( ( config ) => ( {
26+ ...config ,
27+ files : [ '**/*.ts' ]
28+ } ) ) ,
29+ {
30+ files : [ '**/*.ts' ] ,
2731 rules : {
28- "@angular-eslint/directive-selector" : [ "error" , {
29- type : "attribute" ,
30- prefix : "app" ,
31- style : "camelCase" ,
32- } ] ,
33-
34- "@angular-eslint/component-selector" : [ "error" , {
35- type : "element" ,
36- prefix : "app" ,
37- style : "kebab-case" ,
38- } ] ,
39- } ,
40- } , ...compat . extends ( "plugin:@angular-eslint/template/recommended" ) . map ( config => ( {
32+ '@angular-eslint/directive-selector' : [
33+ 'error' ,
34+ {
35+ type : 'attribute' ,
36+ prefix : 'app' ,
37+ style : 'camelCase'
38+ }
39+ ] ,
40+ '@angular-eslint/component-class-suffix' : 'off' ,
41+ '@angular-eslint/component-selector' : [
42+ 'error' ,
43+ {
44+ type : 'element' ,
45+ prefix : 'app' ,
46+ style : 'kebab-case'
47+ }
48+ ]
49+ }
50+ } ,
51+ ...compat . extends ( 'plugin:@angular-eslint/template/recommended' ) . map ( ( config ) => ( {
4152 ...config ,
42- files : [ "**/*.html" ] ,
43- } ) ) , {
44- files : [ "**/*.html" ] ,
45- rules : { } ,
46- } ] ;
53+ files : [ '**/*.html' ]
54+ } ) ) ,
55+ {
56+ files : [ '**/*.html' ] ,
57+ rules : { }
58+ }
59+ ] ;
0 commit comments