/
.eslintrc.json
123 lines (120 loc) · 3.42 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
{
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"env": {
"browser": true,
"es6": true,
"node": true
},
"plugins": [
"react",
"import",
"@typescript-eslint"
],
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": ["next.config.js"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module",
"ecmaVersion": 2018,
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"no-array-constructor": "off",
"no-redeclare": "off",
"no-use-before-define": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/no-array-constructor": "warn",
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true
}
],
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"classes": false,
"variables": false,
"typedefs": false
}
],
"@typescript-eslint/no-unused-expressions": [
"warn",
{
"allowShortCircuit": true,
"allowTernary": true,
"allowTaggedTemplates": true
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "none",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "comma",
"requireLast": false
},
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}
],
"import/prefer-default-export": 0,
"import/no-useless-path-segments": 1,
"import/no-duplicates": 1,
"import/order": 1,
"import/newline-after-import": 1,
"import/no-unresolved": 0,
"react/jsx-uses-vars": 1,
"react/jsx-uses-react": 1,
"react/jsx-indent": 0,
"react/jsx-indent-props": [2, 2],
"react/no-deprecated": 1,
"react/button-has-type": 0,
"react/prefer-stateless-function": 1,
"react/jsx-filename-extension": 0,
"react/display-name": 0,
"react/require-default-props": 0,
"react/jsx-curly-spacing": [2, {
"when": "always",
"allowMultiline": true,
"children": true
}],
"semi": ["error", "always"],
"indent": [
"warn",
2
],
"comma-dangle": ["error", "never"],
"no-console": 1,
"eqeqeq": [1, "always"],
"quotes": [1, "single"],
"jsx-quotes": [2, "prefer-double"],
"arrow-parens": [2, "as-needed"]
}
}