-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
104 lines (92 loc) · 2.7 KB
/
.eslintrc.js
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
module.exports = {
root: true,
env: {
es6: true,
node: true,
browser: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: { jsx: true },
jsx: true,
useJSXTextNode: true,
ecmaVersion: 2018,
sourceType: "module",
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"eslint-config-prettier",
"plugin:storybook/recommended",
"next",
"next/core-web-vitals",
],
plugins: ["@typescript-eslint", "import", "prettier", "react", "react-hooks"],
settings: {
"import/resolver": { typescript: {} },
},
rules: {
"prettier/prettier": [
"warn",
{
endOfLine: "auto",
},
],
"no-implicit-coercion": "error",
"no-undef": "off",
semi: ["error", "always"],
quotes: ["error", "double"],
indent: ["error", 2],
"no-var": "error",
"prefer-const": "error",
"object-curly-spacing": ["error", "always"],
"array-bracket-spacing": ["error", "never"],
"space-in-parens": ["error", "never"],
"keyword-spacing": ["error", { before: true, after: true }],
"no-multi-spaces": "error",
"space-before-blocks": ["error", "always"],
camelcase: ["error", { properties: "always" }],
"new-cap": ["error", { newIsCap: true }],
"no-unused-vars": ["error", { args: "none" }],
"no-use-before-define": ["error", { functions: false, classes: true }],
"comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "never",
},
],
"no-console": "off",
"no-debugger": "error",
"no-trailing-spaces": "error",
"eol-last": ["error", "always"],
"func-call-spacing": ["error", "never"],
"space-infix-ops": "error",
"space-before-function-paren": [
"error",
{
anonymous: "never",
named: "never",
asyncArrow: "always",
},
],
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-extra-boolean-cast": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/prop-types": "off",
"react/display-name": "off",
"react/react-in-jsx-scope": "off",
"react/no-unknown-property": "off",
"import/newline-after-import": ["error"],
},
};