Open History to see the last commit
1import "vite-plus/test/config";
2import { defineConfig } from "vite-plus";
3import * as NodeURL from "node:url";
4
5export default defineConfig({
6 resolve: {
7 alias: {
8 "~": NodeURL.fileURLToPath(new URL("./apps/web/src", import.meta.url)),
9 },
10 },
11 test: {
12 environment: "node",
13 exclude: [
14 "**/.repos/**",
15 "**/.t3/**",
16 "**/node_modules/**",
17 "**/dist/**",
18 "**/dist-electron/**",
19 "**/.{idea,git,cache,output,temp}/**",
20 ],
21 hookTimeout: 60_000,
22 testTimeout: 60_000,
23 },
24 fmt: {
25 ignorePatterns: [
26 ".reference",
27 ".repos/**",
28 ".plans",
29 ".alchemy",
30 "dist",
31 "dist-electron",
32 "node_modules",
33 "pnpm-lock.yaml",
34 "*.tsbuildinfo",
35 "**/routeTree.gen.ts",
36 "apps/mobile/android/**",
37 "apps/mobile/ios/**",
38 "apps/web/public/mockServiceWorker.js",
39 "apps/web/src/lib/vendor/qrcodegen.ts",
40 "apps/mobile/uniwind-types.d.ts",
41 "*.icon/**",
42 ],
43 sortPackageJson: {},
44 overrides: [
45 {
46 files: [".devcontainer/devcontainer.json"],
47 options: {
48 trailingComma: "none",
49 },
50 },
51 ],
52 },
53 lint: {
54 ignorePatterns: [
55 ".repos",
56 ".repos/**",
57 "dist",
58 "dist-electron",
59 "node_modules",
60 "pnpm-lock.yaml",
61 "*.tsbuildinfo",
62 "**/routeTree.gen.ts",
63 "apps/mobile/android/**",
64 "apps/mobile/ios/**",
65 "apps/mobile/uniwind-types.d.ts",
66 ],
67 plugins: ["eslint", "oxc", "react", "unicorn", "typescript"],
68 jsPlugins: ["./oxlint-plugin-t3code/index.ts"],
69 categories: {
70 correctness: "warn",
71 suspicious: "warn",
72 perf: "warn",
73 },
74 rules: {
75 "unicorn/no-array-sort": "off",
76 "unicorn/consistent-function-scoping": "off",
77 "oxc/no-map-spread": "off",
78 "react-in-jsx-scope": "off",
79 "react-hooks/exhaustive-deps": "off",
80 "eslint/no-shadow": "off",
81 "eslint/no-await-in-loop": "off",
82 "eslint/no-underscore-dangle": "off",
83 "typescript/consistent-return": "off",
84 "typescript/no-base-to-string": "off",
85 "typescript/no-duplicate-type-constituents": "off",
86 "typescript/no-floating-promises": "off",
87 "typescript/no-implied-eval": "off",
88 "typescript/no-meaningless-void-operator": "off",
89 "typescript/no-redundant-type-constituents": "off",
90 "typescript/no-unnecessary-boolean-literal-compare": "off",
91 "typescript/no-unnecessary-type-conversion": "off",
92 "typescript/no-unnecessary-type-arguments": "off",
93 "typescript/no-unnecessary-type-assertion": "off",
94 "typescript/no-unnecessary-type-parameters": "off",
95 "typescript/no-unsafe-type-assertion": "off",
96 "typescript/await-thenable": "off",
97 "typescript/require-array-sort-compare": "off",
98 "typescript/restrict-template-expressions": "off",
99 "typescript/unbound-method": "off",
100 "eslint/no-restricted-imports": [
101 "error",
102 {
103 paths: [
104 {
105 name: "@t3tools/client-runtime",
106 message:
107 "Import from an explicit @t3tools/client-runtime/* subpath. The package has no root export.",
108 },
109 ],
110 },
111 ],
112 "t3code/no-global-process-runtime": "error",
113 "t3code/no-inline-schema-compile": "warn",
114 "t3code/no-manual-effect-runtime-in-tests": "error",
115 "t3code/namespace-node-imports": "error",
116 },
117 options: {
118 // Revisit once Oxlint's tsgolint path can integrate with @effect/tsgo diagnostics.
119 typeAware: false,
120 typeCheck: false,
121 },
122 },
123});