File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ import path from "node:path" ;
2+ import { fileURLToPath } from "node:url" ;
3+ import js from "@eslint/js" ;
4+ import { FlatCompat } from "@eslint/eslintrc" ;
5+
6+ const __filename = fileURLToPath ( import . meta. url ) ;
7+ const __dirname = path . dirname ( __filename ) ;
8+ const compat = new FlatCompat ( {
9+ baseDirectory : __dirname ,
10+ recommendedConfig : js . configs . recommended ,
11+ allConfig : js . configs . all
12+ } ) ;
13+
14+ export default [ ...compat . extends (
15+ "eslint:recommended" ,
16+ "plugin:@typescript-eslint/recommended" ,
17+ "plugin:@angular-eslint/recommended" ,
18+ ) . map ( config => ( {
19+ ...config ,
20+ files : [ "**/*.ts" ] ,
21+ } ) ) , {
22+ files : [ "**/*.ts" ] ,
23+
24+ languageOptions : {
25+ ecmaVersion : 5 ,
26+ sourceType : "script" ,
27+
28+ parserOptions : {
29+ project : [ "tsconfig.app.json" , "tsconfig.spec.json" ] ,
30+ createDefaultProgram : true ,
31+ } ,
32+ } ,
33+
34+ rules : {
35+ "@angular-eslint/directive-selector" : [ "error" , {
36+ type : "attribute" ,
37+ prefix : "app" ,
38+ style : "camelCase" ,
39+ } ] ,
40+
41+ "@angular-eslint/component-selector" : [ "error" , {
42+ type : "element" ,
43+ prefix : "app" ,
44+ style : "kebab-case" ,
45+ } ] ,
46+ } ,
47+ } , ...compat . extends ( "plugin:@angular-eslint/template/recommended" ) . map ( config => ( {
48+ ...config ,
49+ files : [ "**/*.html" ] ,
50+ } ) ) , {
51+ files : [ "**/*.html" ] ,
52+ rules : { } ,
53+ } ] ;
You can’t perform that action at this time.
0 commit comments