-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
66 lines (61 loc) · 1.73 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
import pluginVue from "eslint-plugin-vue";
import vueTsEslintConfig from "@vue/eslint-config-typescript";
import pluginVitest from "@vitest/eslint-plugin";
import pluginPlaywright from "eslint-plugin-playwright";
import skipFormatting from "@vue/eslint-config-prettier/skip-formatting";
export default [
{
name: "app/files-to-lint",
files: ["**/*.{ts,mts,tsx,vue}"],
},
{
name: "app/files-to-ignore",
ignores: ["**/dist/**", "**/dist-ssr/**", "**/coverage/**"],
},
...pluginVue.configs["flat/recommended"],
...vueTsEslintConfig(),
{
...pluginVitest.configs.recommended,
files: ["src/**/__tests__/*"],
},
{
...pluginPlaywright.configs["flat/recommended"],
files: ["e2e/**/*.{test,spec}.{js,ts,jsx,tsx}"],
},
skipFormatting,
{
rules: {
"vue/no-console": ["error", { allow: ["warn", "error"] }],
"vue/eqeqeq": "error",
"vue/no-unused-emit-declarations": "error",
"vue/no-unused-properties": "error",
"vue/no-unused-refs": "error",
"vue/no-useless-mustaches": "error",
"vue/no-useless-v-bind": "error",
"vue/padding-line-between-blocks": "error",
"vue/script-indent": [
"error",
2,
{
baseIndent: 0,
switchCase: 1,
ignores: [],
},
],
"vue/array-bracket-spacing": ["error", "never"],
"vue/arrow-spacing": "error",
"vue/block-spacing": "error",
"vue/brace-style": "error",
"vue/comma-dangle": ["error", "always-multiline"],
"vue/dot-notation": "error",
"vue/max-attributes-per-line": [
"error",
{
singleline: 4,
multiline: 2,
},
],
"vue/first-attribute-linebreak": "error",
},
},
];