-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patheslint.config.js
55 lines (54 loc) · 1.84 KB
/
eslint.config.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
import antfu from "@antfu/eslint-config";
export default antfu(
{
formatters: true,
unocss: true,
react: true,
jsx: true,
stylistic: {
indent: 4,
quotes: "double",
semi: true,
overrides: {
"style/array-bracket-newline": ["error", { multiline: true }],
"style/function-call-argument-newline": ["error", "consistent"],
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
"style/max-statements-per-line": ["error", { max: 2 }],
"style/jsx-self-closing-comp": ["error", { component: true, html: true }],
"style/jsx-max-props-per-line": ["error", { maximum: 1, when: "multiline" }],
},
},
rules: {
"antfu/if-newline": "off",
"no-console": ["warn", { allow: ["warn", "error"] }],
"import/order": [
"error",
{
"newlines-between": "always",
"groups": [["external"], ["parent", "internal", "builtin", "sibling", "index"], "object", "type"],
"pathGroups": [
{
group: "unknown",
pattern: "~@/**",
position: "after",
},
],
"alphabetize": { order: "asc", caseInsensitive: true },
},
],
"import/newline-after-import": ["error", { count: 1 }],
},
},
{
files: [".generated/**/*"],
rules: {
"eslint-comments/no-unlimited-disable": "off",
},
},
{
files: ["index.html", "README.md"],
rules: {
"format/prettier": "off",
},
},
);