-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
120 lines (111 loc) · 4.52 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
module.exports = {
root: true,
plugins: ['rxjs'],
env: {
browser: true,
es2020: true,
},
overrides: [
{
files: ['*.ts'],
parserOptions: {
createDefaultProgram: true,
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@angular-eslint/all',
'plugin:prettier/recommended',
],
rules: {
'@angular-eslint/no-host-metadata-property': 'off',
'@angular-eslint/use-injectable-provided-in': 'off',
'@angular-eslint/use-component-view-encapsulation': 'off',
'@angular-eslint/no-forward-ref': 'off',
'@angular-eslint/no-output-native': 'off',
'@angular-eslint/template/cyclomatic-complexity': 'off',
'@angular-eslint/prefer-on-push-component-change-detection': 'warn',
'@angular-eslint/sort-ngmodule-metadata-arrays': 'off',
'no-var': 'error',
'no-console': 'warn',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/array-type': [
'error',
{
default: 'array-simple',
},
],
quotes: [
'error',
'single',
{
avoidEscape: true,
},
],
'max-len': [
'error',
{
code: 160,
ignoreUrls: true,
ignoreComments: true,
ignorePattern: '^import |^export +(.*?)',
ignoreRegExpLiterals: true,
},
],
'grouped-accessor-pairs': ['error', 'setBeforeGet'],
'@typescript-eslint/member-ordering': [
'error',
{
default: [
// Index signature
'signature',
// Fields
'private-static-field',
'protected-static-field',
'public-static-field',
'private-instance-field',
'protected-instance-field',
'public-instance-field',
'private-decorated-field',
'protected-decorated-field',
'public-decorated-field',
'protected-abstract-field',
'public-abstract-field',
'private-constructor',
'protected-constructor',
'public-constructor',
'public-decorated-method',
'protected-decorated-method',
'private-decorated-method',
'public-instance-method',
'protected-instance-method',
'private-instance-method',
'public-static-method',
'protected-static-method',
'private-static-method',
'public-abstract-method',
'protected-abstract-method',
],
},
],
'rxjs/no-async-subscribe': 'error',
'rxjs/no-ignored-observable': 'error',
'rxjs/no-nested-subscribe': 'error',
'rxjs/no-unbound-methods': 'error',
'rxjs/throw-error': 'error',
'rxjs/no-subject-value': 'error',
'rxjs/suffix-subjects': ['error', {suffix: '$'}],
'rxjs/prefer-observer': 'error'
},
},
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {
'max-len': 'off',
},
},
],
};