Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

vite.config.ts

104 lines3.0 KB

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