-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.json
87 lines (87 loc) · 2.27 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
{
"root": true,
"globals": {
"React": "readonly",
"JSX": "readonly"
},
"extends": [
"next/core-web-vitals",
"prettier",
"eslint:recommended",
"plugin:tailwindcss/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["@typescript-eslint", "simple-import-sort"],
"parser": "@typescript-eslint/parser",
"settings": {
"tailwindcss": {
"callees": ["cn"],
"config": "tailwind.config.js"
}
},
"rules": {
"semi": ["error", "always"],
"quotes": ["error", "single", { "avoidEscape": true }],
"no-tabs": ["error", { "allowIndentationTabs": false }],
"jsx-quotes": ["error", "prefer-double"],
"linebreak-style": ["error", "unix"],
"eqeqeq": ["error", "always"],
"no-undef": "error",
"prefer-const": [
"error",
{
"destructuring": "all",
"ignoreReadBeforeAssign": false
}
],
"@typescript-eslint/no-unused-vars": [
"error",
{ "args": "all", "argsIgnorePattern": "_" }
],
"@typescript-eslint/no-empty-interface": [
"error",
{
"allowSingleExtends": true
}
],
"react/jsx-boolean-value": ["error", "never"],
"react/self-closing-comp": ["error", { "component": true, "html": true }],
"react/jsx-curly-spacing": ["error", "never", { "allowMultiline": true }],
"react/function-component-definition": [
"error",
{ "namedComponents": "function-declaration" }
],
"tailwindcss/no-custom-classname": "error",
"import/newline-after-import": ["error", { "count": 1 }],
"import/first": "error",
"import/no-duplicates": "error",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": [
"error",
{
"groups": [
// react & next imports
["^react(?!-)(/w+)?", "^react-dom", "^next(?!-)(/w+)?"],
// external library & side effect imports
["^@?\\w", "^\\u0000"],
// application imports
["^~/"],
// relative path 1 level imports
["^./"],
// {s}css files
["^.+\\.s?css$"],
// other imports
["^"]
]
}
]
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"no-undef": "off"
}
}
]
}