-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy pathvite.config.ts
More file actions
56 lines (55 loc) · 1.32 KB
/
Copy pathvite.config.ts
File metadata and controls
56 lines (55 loc) · 1.32 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
import { defineConfig } from 'vite-plus';
export default defineConfig({
fmt: {
printWidth: 120,
singleQuote: true,
ignorePatterns: ['__snapshots__', 'test/fixtures', 'CHANGELOG.md'],
sortImports: {
groups: [['type-import'], ['builtin'], ['external', 'internal'], ['parent', 'sibling', 'index'], ['unknown']],
newlinesBetween: true,
order: 'asc',
},
},
lint: {
env: {
node: true,
vitest: true,
},
rules: {
'max-params': ['error', 6],
'no-console': 'warn',
'import/no-anonymous-default-export': 'error',
'no-unassigned-import': 'allow',
'new-cap': 'allow',
'class-methods-use-this': 'allow',
'import/no-named-export': 'allow',
'unicorn/no-array-sort': 'allow',
'no-param-reassign': 'allow',
'unicorn/prefer-at': 'allow',
'no-process-env': 'allow',
'vite-plus/prefer-vite-plus-imports': 'error',
},
ignorePatterns: ['index.d.ts'],
overrides: [
{
files: ['benchmark/**'],
rules: {
'no-console': 'allow',
},
},
],
options: {
typeAware: true,
typeCheck: true,
},
jsPlugins: [
{
name: 'vite-plus',
specifier: 'vite-plus/oxlint-plugin',
},
],
},
staged: {
'*': ['vp check --fix'],
},
});