-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc.yml
88 lines (88 loc) · 2.63 KB
/
.eslintrc.yml
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
env:
browser: true
es2024: true
node: true
extends:
- eslint:recommended
- plugin:react-hooks/recommended
- plugin:@typescript-eslint/recommended
- prettier
- plugin:@docusaurus/recommended
globals:
JSX: true
reportUnusedDisableDirectives: true
parser: "@typescript-eslint/parser"
parserOptions:
ecmaVersion: latest
sourceType: module
ecmaFeatures:
jsx: true
project:
- tsconfig.json
settings:
"import/resolver":
typescript:
alwaysTryTypes: true
node:
extensions: [".js", ".jsx", ".ts", ".tsx"]
"import/parsers":
"@typescript-eslint/parser": [".ts", ".tsx"]
plugins:
- import
- react-hooks
- "@typescript-eslint"
rules:
{
"semi": [2, "always"],
"prefer-const": "error",
"no-undef": 0,
"global-require": 0,
"no-await-in-loop": 0,
"no-case-declarations": 1,
"no-console": 0,
"no-constant-binary-expression": 2,
"no-continue": 0,
"no-control-regex": 1,
"no-else-return": [1, {allowElseIf: true}],
"no-empty": [1, {allowEmptyCatch: true}],
"no-lonely-if": 1,
"no-nested-ternary": 1,
"no-param-reassign": [1, {props: false}],
"no-prototype-builtins": 1,
"no-template-curly-in-string": 1,
"no-unused-expressions": [1, {allowTaggedTemplates: true}],
"no-useless-escape": 1,
"no-void": [2, {allowAsStatement: true}],
"prefer-destructuring": 1,
"prefer-named-capture-group": 1,
"prefer-template": 1,
"import/extensions": 0,
"import/no-unresolved": [2, {ignore: ["^@theme", "^@docusaurus", "^@generated", "^@site", "^@testing-utils"]}],
"import/order":
[
1,
{
groups: ["builtin", "external", "internal", ["parent", "sibling", "index"], "type"],
pathGroups:
[
{
pattern: "*.+(css|sass|less|scss|pcss|styl)",
group: "unknown",
patternOptions: {matchBase: true},
position: "after",
},
{pattern: "react", group: "builtin", position: "before"},
{pattern: "react-dom", group: "builtin", position: "before"},
{pattern: "react-dom/**", group: "builtin", position: "before"},
{pattern: "clsx", group: "external", position: "before"},
{pattern: "@theme/**", group: "internal"},
{pattern: "@site/**", group: "internal"},
{pattern: "@theme-init/**", group: "internal"},
{pattern: "@theme-original/**", group: "internal"},
],
pathGroupsExcludedImportTypes: [],
warnOnUnassignedImports: true,
},
],
"import/prefer-default-export": 0,
}