-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.json
90 lines (90 loc) · 2.24 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
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"airbnb",
"airbnb-typescript",
"plugin:react/recommended",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
// Do not insert typescript rules into this property! it will be ignored.
// Instead, insert your typescript rules in *.ts override rules.
"rules": {
"prettier/prettier": "error",
// It resolves prettier plugin conflicts.
"semi": "off",
"quotes": "off",
"indent": "off",
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-no-useless-fragment": "off",
"react/require-default-props": "off",
"import/no-cycle": "off",
"react/no-unused-prop-types": "off",
"no-void": "off",
"no-console": "off",
"import/prefer-default-export": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/click-events-have-key-events": "off",
"react/prop-types": "off",
"no-restricted-syntax": "off",
"no-plusplus": "off"
},
"ignorePatterns": [
"static/maps.ts"
],
"overrides": [
{
"files": [
"**/*.test.js",
"**/*.test.ts"
],
"env": {
"jest/globals": true
},
"plugins": [
"jest"
],
"extends": [
"plugin:jest/recommended"
],
"rules": {
"jest/no-export": "off"
}
},
{
// Original code from https://stackoverflow.com/a/64488474/11853111
"files": [
"*.ts",
"*.tsx"
],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parserOptions": {
"project": [
"./tsconfig.json"
]
},
"rules": {
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/ban-ts-comment": "off"
}
}
]
}