-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.yml
93 lines (93 loc) · 2.17 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
plugins:
- "@typescript-eslint"
- testing-library
- cypress
env:
browser: true
node: true
parserOptions:
ecmaVersion: 2020
sourceType: module
extends:
- eslint:recommended
- plugin:testing-library/dom
- "plugin:@next/next/recommended"
- "plugin:react/recommended"
- "plugin:react/jsx-runtime"
- "plugin:import/recommended"
- "plugin:import/typescript"
settings:
"react":
version: "detect"
"import/resolver":
"node":
"extensions": [".js", ".jsx", ".ts", ".tsx"]
rules:
'import/namespace': 'off'
'import/no-unresolved': 'off'
'import/order':
- warn
- groups:
- builtin
- external
- internal
- parent
- sibling
- index
- unknown
alphabetize: { order: 'asc', caseInsensitive: true }
comma-dangle:
- error
- always-multiline
consistent-return: error
indent:
- error
- 4
- SwitchCase: 1
quotes: error
semi: error
keyword-spacing: error
space-before-blocks: error
no-multiple-empty-lines:
- error
- max: 1
maxBOF: 0
maxEOF: 0
no-multi-spaces: error
overrides:
- files: ["*.ts", "*.tsx"]
excludedFiles: [ "*.cy.tsx"]
parserOptions:
project:
- ./tsconfig.json
extends:
- plugin:@typescript-eslint/recommended
- plugin:@typescript-eslint/recommended-requiring-type-checking
rules:
indent: "off"
no-return-await: "off"
"@typescript-eslint/indent":
- error
- 4
- SwitchCase: 1
"@typescript-eslint/member-delimiter-style": error
"@typescript-eslint/object-curly-spacing":
- error
- always
"@typescript-eslint/return-await":
- error
- always
# custom rules to fix code style
"@typescript-eslint/require-await": "off"
"@typescript-eslint/no-unsafe-assignment": "off"
- files: [src/**/*.test.*, test/**/*]
env:
jest: true
rules:
"@typescript-eslint/no-non-null-assertion": "off"
"@typescript-eslint/unbound-method": "off"
- files: [ "**/*.cy.tsx", "**/*.cy.ts" ]
extends:
- plugin:cypress/recommended
rules:
"testing-library/await-async-utils": "off"