-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
103 lines (103 loc) · 2.28 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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"next",
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "unused-imports", "unicorn", "i18next"],
rules: {
"@typescript-eslint/no-var-requires": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
"react-hooks/exhaustive-deps": "error",
"react/jsx-boolean-value": "error",
"react/self-closing-comp": [
"error",
{
component: true,
html: true,
},
],
"react/react-in-jsx-scope": "off",
"react/jsx-curly-brace-presence": [
"error",
{
props: "never",
children: "ignore",
propElementValues: "always",
},
],
"react/no-unknown-property": [
"error",
{
ignore: ["css"],
},
],
"react/prop-types": "off",
"unicorn/filename-case": [
"warn",
{
cases: {
kebabCase: true,
camelCase: true,
},
},
],
// "i18next/no-literal-string": "warn",
"no-restricted-imports": [
"error",
{
paths: [
{
name: "react-hook-form",
importNames: [
"useFormContext",
"FormProvider",
"useWatch",
"useController",
"useField",
"useFieldArray",
],
message: 'Please use from "react-hook-form-mui" instead.',
},
{
name: "react-i18next",
importNames: ["useTranslation"],
message: 'Please use from "next-i18next" instead.',
},
],
},
],
},
overrides: [
{
files: [
"src/stories/**/*.ts",
"src/stories/**/*.tsx",
"src/**/*.stories.tsx",
],
rules: {
"i18next/no-literal-string": "off",
},
},
],
root: true,
};