-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
138 lines (138 loc) · 4.2 KB
/
.eslintrc.json
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{
"root": true,
"ignorePatterns": ["projects/*/src/index.html"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.*?.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"@saritasa/eslint-config-saritasa"
],
"plugins": ["rxjs"],
"rules": {
"jsdoc/tag-lines": "off",
"no-tabs": "off",
"@typescript-eslint/indent": ["error", "tab"],
"no-void": "error",
"rxjs/finnish": [
"error",
{
"functions": false,
"methods": false,
"names": {
"^(canActivate|canActivateChild|canDeactivate|canMatch|intercept|resolve|validate|.*Subject)$": false
},
"parameters": true,
"properties": true,
"strict": true,
"types": {
"^EventEmitter$": false
},
"variables": true
}
],
"rxjs/no-ignored-replay-buffer": "error",
"rxjs/no-internal": "error",
"rxjs/no-nested-subscribe": "error",
"rxjs/no-unbound-methods": "error",
"rxjs/throw-error": "error",
"rxjs/no-async-subscribe": "error",
"rxjs/no-create": "error",
"rxjs/no-ignored-observable": "error",
"rxjs/no-implicit-any-catch": "error",
"rxjs/no-index": "error",
"rxjs/no-sharereplay": [
"error",
{
"allowConfig": true
}
],
"rxjs/no-subclass": "error",
"rxjs/no-unsafe-takeuntil": [
"error",
{
"alias": ["takeUntilDestroyed"]
}
],
"no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["@engom/*", "!@engom/common"],
"message": "You can not import from one application to another directly, please move the reusable/shared entities into common library. https://wiki.saritasa.rocks/frontend/frameworks/angular/project-structure#relationships-between-applications"
}
]
}
],
"@typescript-eslint/prefer-nullish-coalescing": [
"error",
{
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": true
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
"@angular-eslint/template/alt-text": "error",
"@angular-eslint/template/button-has-type": "error",
"@angular-eslint/template/conditional-complexity": [
"error",
{
"maxComplexity": 1
}
],
"@angular-eslint/template/no-duplicate-attributes": "error",
"@angular-eslint/template/no-inline-styles": [
"error",
{
"allowNgStyle": true,
"allowBindToStyle": true
}
],
"@angular-eslint/template/no-interpolation-in-attributes": "error",
"@angular-eslint/template/no-positive-tabindex": "error",
"@angular-eslint/template/use-track-by-function": "error"
}
},
{
"files": ["*.component.ts"],
"extends": ["plugin:@angular-eslint/template/process-inline-templates"],
"plugins": ["rxjs"]
},
{
"files": ["*.dto.ts", "*.mapper.ts"],
"rules": {
"no-restricted-syntax": [
"error",
{
"selector": "TSPropertySignature[readonly=undefined]",
"message": "Missing 'readonly' modifier for the DTO property."
},
{
"selector": "TSPropertySignature TSTypeAnnotation[typeAnnotation.type='TSArrayType']",
"message": "Missing 'readonly' type modifier for array."
}
],
"@typescript-eslint/naming-convention": "off"
}
},
{
"files": ["*.spec.ts"],
"rules": {
"max-lines-per-function": "off",
"@typescript-eslint/naming-convention": "off",
"@angular-eslint/use-component-selector": "off",
"jsdoc/require-jsdoc": "off",
"@typescript-eslint/explicit-function-return-type": "off"
}
}
]
}