-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Expand file tree
/
Copy pathvite.config.ts
More file actions
132 lines (131 loc) · 3.87 KB
/
Copy pathvite.config.ts
File metadata and controls
132 lines (131 loc) · 3.87 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
121
122
123
124
125
126
127
128
129
130
131
132
import "vite-plus/test/config";
import { defineConfig } from "vite-plus";
import * as NodeURL from "node:url";
export default defineConfig({
resolve: {
alias: {
"~": NodeURL.fileURLToPath(new URL("./apps/web/src", import.meta.url)),
},
},
test: {
environment: "node",
exclude: [
"**/.repos/**",
"**/node_modules/**",
"**/dist/**",
"**/dist-electron/**",
"**/.{idea,git,cache,output,temp}/**",
],
hookTimeout: 60_000,
testTimeout: 60_000,
},
staged: {
// Formatter only for now — no lint or typecheck on commit.
"*": "vp fmt",
},
fmt: {
ignorePatterns: [
".reference",
".repos/**",
".plans",
".alchemy",
"dist",
"dist-electron",
"node_modules",
"pnpm-lock.yaml",
"*.tsbuildinfo",
"**/routeTree.gen.ts",
"apps/mobile/android/**",
"apps/mobile/ios/**",
"apps/web/public/mockServiceWorker.js",
"apps/web/src/lib/vendor/qrcodegen.ts",
"apps/mobile/uniwind-types.d.ts",
"*.icon/**",
],
sortPackageJson: {},
overrides: [
{
files: [".devcontainer/devcontainer.json"],
options: {
trailingComma: "none",
},
},
],
},
lint: {
ignorePatterns: [
".repos",
".repos/**",
"dist",
"dist-electron",
"node_modules",
"pnpm-lock.yaml",
"*.tsbuildinfo",
"**/routeTree.gen.ts",
"apps/mobile/android/**",
"apps/mobile/ios/**",
"apps/mobile/uniwind-types.d.ts",
],
plugins: ["eslint", "oxc", "react", "unicorn", "typescript"],
jsPlugins: ["./oxlint-plugin-t3code/index.ts"],
categories: {
correctness: "warn",
suspicious: "warn",
perf: "warn",
},
rules: {
"unicorn/no-array-sort": "off",
"unicorn/consistent-function-scoping": "off",
"oxc/no-map-spread": "off",
"react-in-jsx-scope": "off",
"react-hooks/exhaustive-deps": "off",
"eslint/no-shadow": "off",
"eslint/no-await-in-loop": "off",
"eslint/no-underscore-dangle": "off",
"typescript/consistent-return": "off",
"typescript/no-base-to-string": "off",
"typescript/no-duplicate-type-constituents": "off",
"typescript/no-floating-promises": "off",
"typescript/no-implied-eval": "off",
"typescript/no-meaningless-void-operator": "off",
"typescript/no-redundant-type-constituents": "off",
"typescript/no-unnecessary-boolean-literal-compare": "off",
"typescript/no-unnecessary-type-conversion": "off",
"typescript/no-unnecessary-type-arguments": "off",
"typescript/no-unnecessary-type-assertion": "off",
"typescript/no-unnecessary-type-parameters": "off",
"typescript/no-unsafe-type-assertion": "off",
"typescript/await-thenable": "off",
"typescript/require-array-sort-compare": "off",
"typescript/restrict-template-expressions": "off",
"typescript/unbound-method": "off",
"eslint/no-restricted-imports": [
"error",
{
paths: [
{
name: "@t3tools/client-runtime",
message:
"Import from an explicit @t3tools/client-runtime/* subpath. The package has no root export.",
},
{
name: "@pierre/diffs/react",
importNames: ["CodeView"],
message:
"Use StyledDiffCodeView so web diff surfaces share styling and virtualized geometry.",
},
],
},
],
"t3code/no-global-process-runtime": "error",
"t3code/no-inline-schema-compile": "warn",
"t3code/no-manual-effect-runtime-in-tests": "error",
"t3code/namespace-node-imports": "error",
},
options: {
// Revisit once Oxlint's tsgolint path can integrate with @effect/tsgo diagnostics.
typeAware: false,
typeCheck: false,
},
},
});