-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathvite.config.ts
More file actions
120 lines (119 loc) · 3.07 KB
/
vite.config.ts
File metadata and controls
120 lines (119 loc) · 3.07 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
117
118
119
120
import { defineConfig } from 'vite-plus';
export default defineConfig({
lint: {
options: {
typeAware: true,
typeCheck: true,
},
plugins: ['unicorn', 'typescript', 'oxc'],
categories: {
correctness: 'error',
perf: 'error',
suspicious: 'error',
},
rules: {
'eslint/no-await-in-loop': 'off',
'no-console': ['error', { allow: ['error'] }],
'no-shadow': 'off',
'typescript/no-unnecessary-boolean-literal-compare': 'off',
'typescript/no-unsafe-type-assertion': 'off',
curly: 'error',
},
overrides: [
{
files: [
'.github/**/*',
'bench/**/*.ts',
'ecosystem-ci/**/*',
'packages/*/build.ts',
'packages/core/rollupLicensePlugin.ts',
'packages/core/vite-rolldown.config.ts',
'packages/tools/**/*.ts',
],
rules: {
'no-console': 'off',
},
},
{
files: ['packages/cli/src/__tests__/index.spec.ts'],
rules: {
'typescript/await-thenable': 'off',
},
},
],
ignorePatterns: [
'**/snap-tests/**',
'**/snap-tests-global/**',
'**/snap-tests-todo/**',
'docs/**',
'packages/*/binding/**',
'packages/core/rollupLicensePlugin.ts',
'packages/core/vite-rolldown.config.ts',
],
},
test: {
exclude: [
'./ecosystem-ci/**',
'./rolldown-vite/**',
'./rolldown/**',
'**/node_modules/**',
'**/snap-tests/**',
// FIXME: Error: failed to prepare the command for injection: Invalid argument (os error 22)
'packages/*/binding/__tests__/',
],
},
fmt: {
ignorePatterns: [
'**/tmp/**',
'packages/cli/snap-tests/check-*/**',
'packages/cli/snap-tests/fmt-ignore-patterns/src/ignored',
'packages/cli/snap-tests-global/migration-lint-staged-ts-config',
'docs/**',
'ecosystem-ci/*/**',
'packages/test/**.cjs',
'packages/test/**.cts',
'packages/test/**.d.mjs',
'packages/test/**.d.ts',
'packages/test/**.mjs',
'packages/test/browser/',
'rolldown-vite',
'rolldown',
],
singleQuote: true,
semi: true,
sortPackageJson: true,
sortImports: {
groups: [
['type-import'],
['type-builtin', 'value-builtin'],
['type-external', 'value-external', 'type-internal', 'value-internal'],
[
'type-parent',
'type-sibling',
'type-index',
'value-parent',
'value-sibling',
'value-index',
],
['unknown'],
],
newlinesBetween: true,
order: 'asc',
},
},
run: {
tasks: {
'build:src': {
command: [
'vp run @rolldown/pluginutils#build',
'vp run rolldown#build-binding:release',
'vp run rolldown#build-node',
'vp run vite#build-types',
'vp run @voidzero-dev/vite-plus-core#build',
'vp run @voidzero-dev/vite-plus-test#build',
'vp run vite-plus#build',
].join(' && '),
},
},
},
});