-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
95 lines (91 loc) · 2.26 KB
/
.eslintrc.cjs
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
/* eslint-env node */
module.exports = {
root: true,
settings: {
react: {
version: "detect",
},
},
env: {
browser: true,
es2020: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:react-hooks/recommended",
"plugin:storybook/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: true,
tsconfigRootDir: __dirname,
},
plugins: ["react-refresh", "prettier", "@typescript-eslint", "react"],
rules: {
"react-refresh/only-export-components": [
"warn",
{
allowConstantExport: true,
},
],
"@typescript-eslint/no-non-null-assertion": "off",
"prettier/prettier": "error",
"no-extra-parens": ["off"],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
"react/prop-types": ["off"],
"react/no-multi-comp": ["error"],
"react/self-closing-comp": ["error"],
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/unbound-method": "off",
"storybook/prefer-pascal-case": "off",
"@typescript-eslint/naming-convention": [
"error",
{
selector: "default",
format: ["camelCase"],
leadingUnderscore: "allow",
trailingUnderscore: "allow",
},
{
selector: "variable",
types: ["function"],
format: ["camelCase", "PascalCase"],
},
{
selector: "variable",
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: "allow",
trailingUnderscore: "allow",
},
{
selector: "memberLike",
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: "allow",
trailingUnderscore: "allow",
},
{
selector: "typeLike",
format: ["PascalCase"],
},
{
selector: "enumMember",
format: ["UPPER_CASE"],
},
],
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: false,
},
],
},
}