-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.yml
157 lines (157 loc) · 4.52 KB
/
.eslintrc.yml
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
root: true
parserOptions:
ecmaVersion: 2021
sourceType: module
project:
- ./tsconfig.json
- ./shared/tsconfig.json
- ./backend/tsconfig.json
- ./frontend/tsconfig.json
- ./mobile/tsconfig.json
settings:
typescript: true
node: true
extends:
- 'eslint:recommended'
- 'plugin:import/recommended'
- 'plugin:import/typescript'
- 'plugin:@typescript-eslint/recommended'
- 'plugin:@typescript-eslint/recommended-requiring-type-checking'
- 'plugin:@typescript-eslint/strict'
- 'plugin:@typescript-eslint/strict-type-checked'
- 'plugin:@typescript-eslint/stylistic'
- 'plugin:@typescript-eslint/stylistic-type-checked'
- 'plugin:unicorn/recommended'
- 'plugin:sonarjs/recommended'
plugins:
- simple-import-sort
rules:
no-restricted-syntax:
- error
- selector: 'SwitchCase > *.consequent[type!="BlockStatement"]'
message: Switch cases without blocks are forbidden.
- selector: 'ExportAllDeclaration,ImportAllDeclaration'
message: Export/Import all (*) is forbidden.
- selector: 'ExportNamedDeclaration[declaration!=null]'
message: Exports should be at the end of the file.
- selector: >-
ImportDeclaration[importKind=type],ExportNamedDeclaration[exportKind=type]
message: >-
Avoid import/export type { Type } from './module'. Prefer import/export
{ type Type } from './module'.
- selector: 'TSEnumDeclaration,ClassDeclaration[abstract=true]'
message: TS enum are forbidden use js object instead
no-console:
- error
max-params:
- error
- 3
no-multiple-empty-lines:
- error
- max: 1
curly:
- error
- all
unicorn/no-null:
- 'off'
unicorn/prevent-abbreviations:
- error
- allowList:
props: true
'@typescript-eslint/padding-line-between-statements':
- error
- blankLine: never
prev: export
next: export
- blankLine: always
prev:
- const
- class
next: export
simple-import-sort/imports:
- error
simple-import-sort/exports:
- error
import/no-unresolved:
- 'off'
import/extensions:
- error
- always
- ignorePackages: true
import/newline-after-import:
- error
- count: 1
import/no-default-export:
- error
'@typescript-eslint/consistent-type-definitions':
- error
- type
'@typescript-eslint/non-nullable-type-assertion-style':
- 'off'
'@typescript-eslint/return-await':
- 'off'
'@typescript-eslint/quotes':
- error
- single
'@typescript-eslint/consistent-type-imports':
- error
'@typescript-eslint/consistent-type-exports':
- error
'@typescript-eslint/explicit-function-return-type':
- error
- allowTypedFunctionExpressions: true
'@typescript-eslint/no-empty-interface':
- error
- allowSingleExtends: true
'@typescript-eslint/explicit-member-accessibility':
- error
'@typescript-eslint/object-curly-spacing':
- error
- always
'@typescript-eslint/semi':
- error
- always
'@typescript-eslint/no-magic-numbers':
- error
- ignoreEnums: true
ignoreNumericLiteralTypes: true
ignoreReadonlyClassProperties: true
ignoreTypeIndexes: true
ignore:
- 0
- 1
'@typescript-eslint/no-unsafe-member-access':
- 'off'
'@typescript-eslint/no-unsafe-assignment':
- 'off'
'@typescript-eslint/no-unsafe-call':
- 'off'
'@typescript-eslint/no-unsafe-return':
- 'off'
'@typescript-eslint/no-unsafe-argument':
- 'off'
'@typescript-eslint/restrict-template-expressions':
- 'off'
'@typescript-eslint/no-redundant-type-constituents':
- 'off'
'@typescript-eslint/prefer-nullish-coalescing':
- 'off'
overrides:
- files:
- commitlint.config.ts
rules:
import/no-default-export:
- 'off'
- files:
- commitlint.config.ts
- dangerfile.ts
rules:
import/extensions:
- 'off'
'@typescript-eslint/no-magic-numbers':
- 'off'
- files:
- '*.validation-schema.ts'
rules:
unicorn/no-thenable:
- 'off'