forked from ShokoAnime/Shoko-WebUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
135 lines (135 loc) · 3.67 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
124
125
126
127
128
129
130
131
132
133
134
135
{
"extends": [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:tailwindcss/recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:@tanstack/eslint-plugin-query/recommended"
],
"ignorePatterns": [
"/*",
"!/src"
],
"env": {
"browser": true,
"es6": true
},
"plugins": ["import", "react", "react-hooks", "jsx-a11y", "sort-destructure-keys", "react-refresh"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"settings": {
"import/resolver": {
"typescript": {}
},
"tailwindcss": {
"callees": ["classnames"]
}
},
"rules": {
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-floating-promises": [
"warn",
{ "ignoreIIFE": true, "ignoreVoid": false }
],
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", "caughtErrorsIgnorePattern": "^_" }
],
"@typescript-eslint/no-use-before-define": [
"error",
{ "functions": false }
],
"@typescript-eslint/consistent-type-definitions": [
"error",
"type"
],
"@typescript-eslint/array-type": "error",
"arrow-parens": [
"error",
"as-needed",
{ "requireForBlockBody": true }
],
"@typescript-eslint/prefer-nullish-coalescing": [
"error",
{
"ignorePrimitives": { "boolean": true }
}
],
"implicit-arrow-linebreak": "off",
"import/order": [
"error",
{
"newlines-between": "always",
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type"
],
"pathGroups": [{ "pattern": "react*", "group": "external", "position": "before" }],
"pathGroupsExcludedImportTypes": ["builtin"],
"distinctGroup": false,
"alphabetize": { "order": "asc" }
}
],
"import/no-cycle": "off",
"import/prefer-default-export": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/no-static-element-interactions": "off",
"max-len": "off",
"no-console": [
"error",
{ "allow": ["warn", "error"] }
],
"no-param-reassign": [
"error",
{ "props": true, "ignorePropertyModificationsFor": ["sliceState", "immerState", "draftState"] }
],
"no-restricted-imports": [
"error",
{ "patterns": [{ "group": ["../*"], "message": "Please use @/ instead." }] }
],
"no-restricted-syntax": "off",
"object-curly-newline": [
"error",
{ "ImportDeclaration": { "consistent": true }}
],
"prefer-object-spread": "off",
"react/destructuring-assignment": "off",
"react/function-component-definition": "off",
"react/jsx-key": [
"error",
{ "checkFragmentShorthand": true, "checkKeyMustBeforeSpread": true }
],
"react/jsx-one-expression-per-line": [
"error",
{ "allow": "single-child" }
],
"react/jsx-props-no-spreading": "off",
"react/jsx-wrap-multilines": [
"error",
{ "prop": "ignore" }
],
"react/no-unstable-nested-components": [
"error",
{ "allowAsProps": true }
],
"react/prefer-stateless-function": "off",
"react/prop-types": "off",
"react/require-default-props": "off",
"react-refresh/only-export-components": "warn",
"sort-destructure-keys/sort-destructure-keys": 2,
"no-undef": "error"
}
}