Skip to content

Commit 87f1198

Browse files
committed
refactor: update instrumentation shutdown handling and tsconfig settings
- Added comments to disable floating promises warnings for sdk.shutdown() in instrumentation.ts. - Simplified tsconfig.json by consolidating the include array. - Updated tsconfig.node.json to change types from "@types/bun" to "@types/node" and streamlined the include array. - Removed extensive linting rules and configurations from vite.config.ts for cleaner setup, while updating the Nitro server preset to "node-server". - Cleared the exclude array in optimize-deps.ts to allow all dependencies for pre-bundling.
1 parent ee2a0da commit 87f1198

12 files changed

Lines changed: 9781 additions & 2356 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# dependencies (bun install)
1+
# dependencies
22
node_modules
33

44
# output

.oxfmtrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignorePatterns": ["src/components/ui/"]
3+
}

.oxlintrc.json

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"plugins": [
3+
"unicorn",
4+
"import",
5+
"jsdoc",
6+
"jsx-a11y",
7+
"promise",
8+
"oxc",
9+
"typescript",
10+
"react",
11+
"react-perf"
12+
],
13+
"categories": {},
14+
"rules": {
15+
"for-direction": "warn",
16+
"no-async-promise-executor": "warn",
17+
"no-caller": "warn",
18+
"no-class-assign": "warn",
19+
"no-compare-neg-zero": "warn",
20+
"no-cond-assign": "warn",
21+
"no-const-assign": "warn",
22+
"no-constant-binary-expression": "warn",
23+
"no-constant-condition": "warn",
24+
"no-control-regex": "warn",
25+
"no-debugger": "warn",
26+
"no-delete-var": "warn",
27+
"no-dupe-class-members": "warn",
28+
"no-dupe-else-if": "warn",
29+
"no-dupe-keys": "warn",
30+
"no-duplicate-case": "warn",
31+
"no-empty-character-class": "warn",
32+
"no-empty-pattern": "warn",
33+
"no-empty-static-block": "warn",
34+
"no-eval": "warn",
35+
"no-ex-assign": "warn",
36+
"no-extra-boolean-cast": "warn",
37+
"no-func-assign": "warn",
38+
"no-global-assign": "warn",
39+
"no-import-assign": "warn",
40+
"no-invalid-regexp": "warn",
41+
"no-irregular-whitespace": "warn",
42+
"no-loss-of-precision": "warn",
43+
"no-new-native-nonconstructor": "warn",
44+
"no-nonoctal-decimal-escape": "warn",
45+
"no-obj-calls": "warn",
46+
"no-self-assign": "warn",
47+
"no-setter-return": "warn",
48+
"no-shadow-restricted-names": "warn",
49+
"no-sparse-arrays": "warn",
50+
"no-this-before-super": "warn",
51+
"no-unsafe-finally": "warn",
52+
"no-unsafe-negation": "warn",
53+
"no-unsafe-optional-chaining": "warn",
54+
"no-unused-labels": "warn",
55+
"no-unused-private-class-members": "warn",
56+
"no-unused-vars": "warn",
57+
"no-useless-backreference": "warn",
58+
"no-useless-catch": "warn",
59+
"no-useless-escape": "warn",
60+
"no-useless-rename": "warn",
61+
"no-with": "warn",
62+
"require-yield": "warn",
63+
"use-isnan": "warn",
64+
"valid-typeof": "warn",
65+
"oxc/bad-array-method-on-arguments": "warn",
66+
"oxc/bad-char-at-comparison": "warn",
67+
"oxc/bad-comparison-sequence": "warn",
68+
"oxc/bad-min-max-func": "warn",
69+
"oxc/bad-object-literal-comparison": "warn",
70+
"oxc/bad-replace-all-arg": "warn",
71+
"oxc/const-comparisons": "warn",
72+
"oxc/double-comparisons": "warn",
73+
"oxc/erasing-op": "warn",
74+
"oxc/missing-throw": "warn",
75+
"oxc/number-arg-out-of-range": "warn",
76+
"oxc/only-used-in-recursion": "warn",
77+
"oxc/uninvoked-array-callback": "warn",
78+
"typescript/no-duplicate-enum-values": "warn",
79+
"typescript/no-extra-non-null-assertion": "warn",
80+
"typescript/no-misused-new": "warn",
81+
"typescript/no-non-null-asserted-optional-chain": "warn",
82+
"typescript/no-this-alias": "warn",
83+
"typescript/no-unnecessary-parameter-property-assignment": "warn",
84+
"typescript/no-unsafe-declaration-merging": "warn",
85+
"typescript/no-useless-empty-export": "warn",
86+
"typescript/no-wrapper-object-types": "warn",
87+
"typescript/prefer-as-const": "warn",
88+
"typescript/triple-slash-reference": "warn",
89+
"unicorn/no-await-in-promise-methods": "warn",
90+
"unicorn/no-empty-file": "warn",
91+
"unicorn/no-invalid-fetch-options": "warn",
92+
"unicorn/no-invalid-remove-event-listener": "warn",
93+
"unicorn/no-new-array": "warn",
94+
"unicorn/no-single-promise-in-promise-methods": "warn",
95+
"unicorn/no-thenable": "warn",
96+
"unicorn/no-unnecessary-await": "warn",
97+
"unicorn/no-useless-fallback-in-spread": "warn",
98+
"unicorn/no-useless-length-check": "warn",
99+
"unicorn/no-useless-spread": "warn",
100+
"unicorn/prefer-set-size": "warn",
101+
"unicorn/prefer-string-starts-ends-with": "warn"
102+
},
103+
"env": {
104+
"builtin": true
105+
},
106+
"globals": {
107+
"Link": "readonly",
108+
"Button": "readonly",
109+
"Input": "readonly",
110+
"Label": "readonly",
111+
"Card": "readonly",
112+
"CardHeader": "readonly",
113+
"CardTitle": "readonly",
114+
"CardDescription": "readonly",
115+
"CardContent": "readonly",
116+
"CardFooter": "readonly",
117+
"CardAction": "readonly",
118+
"Spinner": "readonly",
119+
"toast": "readonly"
120+
},
121+
"ignorePatterns": [
122+
"node_modules",
123+
".output",
124+
".tanstack",
125+
".github",
126+
"pnpm-lock.yaml",
127+
"src/routeTree.gen.ts",
128+
"src/components/ui"
129+
],
130+
"options": {
131+
"typeAware": true,
132+
"typeCheck": true
133+
}
134+
}

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM oven/bun:latest AS base
1+
FROM node:22-slim AS base
2+
RUN corepack enable && corepack prepare pnpm@latest --activate
23
WORKDIR /usr/src/app
34
COPY . .
4-
RUN bun install --frozen-lockfile
5+
RUN pnpm install --frozen-lockfile
56
ENV NODE_ENV=production
6-
RUN bun -b run build
7-
USER bun
7+
RUN pnpm build
88
EXPOSE 3000/tcp
9-
ENTRYPOINT [ "bun", "run", ".output/server/index.mjs" ]
9+
ENTRYPOINT [ "node", ".output/server/index.mjs" ]

0 commit comments

Comments
 (0)