-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.json
113 lines (113 loc) · 2.68 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
{
"env": {
"es2021": true,
"browser": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import", "react"],
"settings": {
"import/resolver": {
"node": {
"extensions": [".ts", ".tsx"]
}
}
},
"ignorePatterns": ["*.config.js", ".next/*", "scripts/", "models/*.ts", "public/swagger.json"],
"overrides": [
{
"files": ["pages/**"],
"rules": {
"import/no-default-export": "off",
"import/prefer-default-export": 2
}
}
],
"rules": {
"indent": "off",
"object-shorthand": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"func-style": [
"error",
"declaration",
{
"allowArrowFunctions": true
}
],
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"arrow-parens": "off",
"no-confusing-arrow": "off",
"import/no-default-export": "error",
"import/prefer-default-export": "off",
"object-curly-newline": "off",
"no-plusplus": "off",
"operator-linebreak": "off",
"no-mixed-operators": "off",
"max-len": "off",
"import/extensions": ["error", "never"],
"react/jsx-filename-extension": [
"error",
{
"extensions": [".tsx"]
}
],
"react/jsx-tag-spacing": "off",
"arrow-body-style": "off",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"semi": "off",
"@typescript-eslint/semi": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/type-annotation-spacing": [
"error",
{
"before": false,
"after": true,
"overrides": {
"arrow": {
"before": true,
"after": true
}
}
}
],
"@typescript-eslint/no-empty-function": "off",
"react/prop-types": "off",
"react/jsx-one-expression-per-line": "off",
"global-require": "off",
"no-nested-ternary": "off",
"no-console": 2,
"react/display-name": "off",
"@typescript-eslint/no-explicit-any": "error"
}
}
// "@typescript-eslint/indent": ["error", 2] <-- turned off because ternary operators had mismatching requirements with prettier