-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
62 lines (61 loc) · 1.84 KB
/
eslint.config.mjs
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
import antfu from "@antfu/eslint-config";
export default antfu(
{
ignores: ["src/env.d.ts"],
stylistic: {
quotes: "double",
semi: true,
overrides: {
"comma-dangle": ["error", "always-multiline"],
"jsonc/comma-dangle": ["error", "always-multiline"],
"style/jsx-sort-props": "warn",
"arrow-body-style": ["error", "as-needed"],
"no-restricted-imports": ["error", { patterns: ["../*"] }],
"unused-imports/no-unused-imports": "warn",
"style/arrow-parens": ["error", "always"],
"style/brace-style": ["error", "1tbs"],
},
},
typescript: {
parserOptions: {
project: ["./tsconfig.json"],
},
overrides: {
"ts/consistent-type-definitions": ["error", "type"],
"ts/explicit-function-return-type": ["error"],
"ts/explicit-member-accessibility": ["error"],
"ts/naming-convention": [
"error",
{
selector: "variable",
format: ["camelCase", "UPPER_CASE", "PascalCase"],
leadingUnderscore: "allowSingleOrDouble",
},
],
"ts/no-floating-promises": ["error"],
"ts/no-misused-promises": ["error"],
"ts/no-confusing-void-expression": ["error"],
"ts/strict-boolean-expressions": ["error"],
"ts/switch-exhaustiveness-check": ["error"],
"ts/array-type": ["error", { default: "array-simple" }],
"ts/no-restricted-types": [
"error",
{ types: { Omit: "Use `OmitStrict`." } },
],
"ts/no-unsafe-argument": "error",
},
},
rules: {
"antfu/no-top-level-await": "off",
},
react: {
overrides: {
"react-refresh/only-export-components": "off",
},
},
astro: true,
markdown: true,
formatters: true,
isInEditor: true,
},
);