-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
97 lines (95 loc) · 3.2 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
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
import antfu from "@antfu/eslint-config";
import format from "eslint-plugin-format";
import markdownlint from "eslint-plugin-markdownlint";
// @ts-check
import withNuxt from "./.nuxt/eslint.config.mjs";
const eslintConfig = antfu(
{
formatters: true,
stylistic: {
indent: 4,
quotes: "double",
semi: true,
},
rules: {
"eqeqeq": "off",
"curly": "error",
"indent": ["error", 4, { SwitchCase: 1 }],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"comma-dangle": ["error", "always-multiline"],
"prefer-const": "error",
"no-console": "warn",
"no-unused-vars": "off",
"no-prototype-builtins": "off",
"import/first": "off",
"import/order": "off",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"vue/no-export-in-script-setup": "off",
"vue/multi-word-component-names": "off",
"vue/require-default-prop": "off",
"vue/html-indent": ["error", 4],
"vue/attributes-order": ["error", {
order: [
"DEFINITION",
"LIST_RENDERING",
"CONDITIONALS",
"RENDER_MODIFIERS",
"GLOBAL",
"UNIQUE",
"SLOT",
"TWO_WAY_BINDING",
"OTHER_DIRECTIVES",
"ATTR_DYNAMIC",
"ATTR_STATIC",
"ATTR_SHORTHAND_BOOL",
"EVENTS",
"CONTENT",
],
alphabetical: true,
}],
"vue/max-attributes-per-line": ["error", {
singleline: 3,
multiline: 1,
}],
"ts/no-this-alias": "off",
"ts/no-empty-function": "off",
"ts/no-explicit-any": "off",
"ts/no-empty-interface": "off",
"ts/explicit-module-boundary-types": "off",
"ts/no-unused-vars": ["error", { vars: "all", args: "none", ignoreRestSiblings: true }],
"ts/consistent-type-definitions": "off",
"style/max-statements-per-line": ["error", { max: 3 }],
},
ignores: ["*.yaml", "**/*.md"],
},
{
files: ["**/*.spec.ts"],
rules: {
"test/prefer-lowercase-title": ["error", {
ignore: ["describe"],
}],
"test/consistent-test-it": "off",
},
},
// {
// files: ["**/*.md"],
// languageOptions: {
// parser: format.parserPlain,
// },
// plugins: {
// format,
// markdownlint,
// },
// rules: { // see: https://github.com/DavidAnson/markdownlint/tree/main?tab=readme-ov-file#rules--aliases
// ...markdownlint.configs.recommended.rules,
// "markdownlint/md013": "off",
// "markdownlint/md033": "off",
// "markdownlint/md041": "off",
// },
// },
);
export default withNuxt(eslintConfig, {
ignores: ["**/*.md"],
});