-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
103 lines (101 loc) · 2.23 KB
/
Copy pathvite.config.ts
File metadata and controls
103 lines (101 loc) · 2.23 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
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite-plus';
const rootDir = fileURLToPath(new URL('.', import.meta.url));
export default defineConfig({
base: './',
server: {
port: 17222,
host: 'localhost',
},
preview: {
port: 17222,
host: 'localhost',
},
plugins: [...react(), ...tailwindcss()] as never,
resolve: {
alias: {
'@': path.resolve(rootDir, '.'),
'motion/react': path.resolve(rootDir, 'lib/gsapMotion.tsx'),
},
},
fmt: {
semi: true,
singleQuote: true,
},
lint: {
plugins: ['oxc', 'typescript', 'react'],
categories: {
correctness: 'error',
},
env: {
builtin: true,
},
rules: {
'no-console': 'error',
'no-debugger': 'error',
'no-control-regex': 'off',
'no-unused-vars': 'off',
'no-useless-escape': 'off',
},
ignorePatterns: [
'dist/**',
'generated/**',
'logs/**',
'output/**',
'outputs/**',
'tmp/**',
'.tmp/**',
'.tmp-*',
],
overrides: [
{
files: ['**/*.{ts,tsx}'],
rules: {
'typescript/no-explicit-any': 'off',
'typescript/no-unused-vars': 'off',
'react/rules-of-hooks': 'error',
'react/exhaustive-deps': 'off',
'react/only-export-components': 'off',
},
env: {
es2022: true,
browser: true,
},
},
{
files: [
'apps/local-server/src/**/*.ts',
'scripts/**/*.ts',
'electron/**/*.cjs',
'utils/runtimeLogger.ts',
],
rules: {
'no-console': 'off',
},
env: {
es2022: true,
node: true,
},
},
],
options: {
typeAware: true,
typeCheck: true,
},
},
test: {
include: ['**/*.test.ts', '**/*.test.tsx'],
exclude: ['**/node_modules/**', '**/dist/**'],
coverage: {
provider: 'v8',
reporter: ['text', 'json-summary', 'html'],
reportsDirectory: './coverage',
},
},
staged: {
'*.{ts,tsx,js,jsx,css,md,json}': 'vp check --fix',
},
});