File tree Expand file tree Collapse file tree 2 files changed +70
-42
lines changed Expand file tree Collapse file tree 2 files changed +70
-42
lines changed Load Diff This file was deleted.
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 [
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' ] ,
31
+
32
+ languageOptions : {
33
+ ecmaVersion : 5 ,
34
+ sourceType : 'script' ,
35
+
36
+ parserOptions : {
37
+ project : [ 'tsconfig.json' , 'e2e/tsconfig.json' ] ,
38
+ createDefaultProgram : true ,
39
+ } ,
40
+ } ,
41
+
42
+ rules : {
43
+ '@angular-eslint/component-selector' : [
44
+ 'error' ,
45
+ {
46
+ prefix : 'ngx' ,
47
+ style : 'kebab-case' ,
48
+ type : 'element' ,
49
+ } ,
50
+ ] ,
51
+
52
+ '@angular-eslint/directive-selector' : [
53
+ 'error' ,
54
+ {
55
+ prefix : 'ngx' ,
56
+ style : 'camelCase' ,
57
+ type : 'attribute' ,
58
+ } ,
59
+ ] ,
60
+ } ,
61
+ } ,
62
+ ...compat . extends ( 'plugin:@angular-eslint/template/recommended' ) . map ( ( config ) => ( {
63
+ ...config ,
64
+ files : [ '**/*.html' ] ,
65
+ } ) ) ,
66
+ {
67
+ files : [ '**/*.html' ] ,
68
+ rules : { } ,
69
+ } ,
70
+ ] ;
You can’t perform that action at this time.
0 commit comments