-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.ts
More file actions
116 lines (109 loc) · 2.65 KB
/
Copy patheslint.config.ts
File metadata and controls
116 lines (109 loc) · 2.65 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import stylistic from "@stylistic/eslint-plugin";
import pluginVitest from "@vitest/eslint-plugin";
import { defineConfigWithVueTs, vueTsConfigs } from "@vue/eslint-config-typescript";
import { globalIgnores } from "eslint/config";
import pluginPlaywright from "eslint-plugin-playwright";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import pluginVue from "eslint-plugin-vue";
/*
* To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
* import { configureVueProject } from '@vue/eslint-config-typescript'
* configureVueProject({ scriptLangs: ['ts', 'tsx'] })
* More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
*/
export default defineConfigWithVueTs(
{
name: "app/files-to-lint",
files: ["**/*.{ts,mts,tsx,vue}"]
},
globalIgnores([
"**/dist/**",
"**/dist-ssr/**",
"**/coverage/**"
]),
{
plugins: {
"@stylistic": stylistic
}
},
pluginVue.configs["flat/essential"],
vueTsConfigs.recommended,
{
...pluginVitest.configs.recommended,
files: ["src/**/__tests__/*"]
},
{
...pluginPlaywright.configs["flat/recommended"],
files: ["e2e/**/*.{test,spec}.{js,ts,jsx,tsx}"]
},
stylistic.configs["all"],
{
rules: {
"@stylistic/padded-blocks": [
"error",
"never"
],
"@stylistic/indent": [
"error",
2
],
"@stylistic/quote-props": [
"error",
"as-needed"
],
"@stylistic/block-spacing": [
"error",
"always"
],
"@stylistic/object-curly-spacing": [
"error",
"always"
],
"@stylistic/semi": [
"error",
"always"
],
"@stylistic/quotes": [
"error",
"double"
],
"@stylistic/comma-spacing": [
"error",
{ before: false,
after: true }
],
"no-unused-vars": "off",
"vue/block-lang": "off",
"vue/multi-word-component-names": "off",
"@typescript-eslint/no-unused-vars": [
"error", // or "error"
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_"
}
],
"max-lines": [
"warn",
{ max: 500,
skipBlankLines: true,
skipComments: true }
],
"max-lines-per-function": [
"warn",
{ max: 200,
skipBlankLines: true,
skipComments: true }
]
}
},
{
plugins: {
"simple-import-sort": simpleImportSort
},
rules: {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error"
}
}
);