Skip to content

Commit ba8076d

Browse files
committed
chore: dependency upgrades, biome config update
1 parent a21a400 commit ba8076d

33 files changed

+778
-963
lines changed

biome.jsonc

Lines changed: 103 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
"indentWidth": 2,
1818
"lineWidth": 120
1919
},
20+
"css": {
21+
"parser": {
22+
"tailwindDirectives": true
23+
}
24+
},
2025
"javascript": {
2126
"formatter": {
2227
"quoteStyle": "double",
@@ -35,6 +40,26 @@
3540
"a11y": {
3641
"useKeyWithClickEvents": "warn"
3742
},
43+
"complexity": {
44+
"noUselessEscapeInRegex": "error",
45+
"noUselessStringConcat": "error",
46+
"noUselessUndefinedInitialization": "error",
47+
"useDateNow": "error",
48+
"useSimplifiedLogicExpression": "error",
49+
"useWhile": "error"
50+
},
51+
"correctness": {
52+
"noUnusedVariables": {
53+
"level": "warn",
54+
"fix": "none"
55+
},
56+
"noConstantMathMinMaxClamp": "error",
57+
"noUndeclaredVariables": "error",
58+
"noUnusedFunctionParameters": "error",
59+
"noUnusedImports": "error",
60+
"noUnusedPrivateClassMembers": "error",
61+
"useHookAtTopLevel": "error"
62+
},
3863
"nursery": {
3964
"useSortedClasses": {
4065
"level": "warn",
@@ -44,20 +69,89 @@
4469
}
4570
},
4671
"useConsistentArrowReturn": "error",
47-
"noUselessCatchBinding": "error"
72+
"noUselessCatchBinding": "error",
73+
"noShadow": "error" // should help you catch useless code/accidental drift
4874
},
49-
"style": {
50-
"noNonNullAssertion": "off"
75+
"performance": {
76+
"noDelete": "error", // it's a dangerous operator, use undefined instead
77+
"noDynamicNamespaceImportAccess": "error",
78+
"noReExportAll": "error",
79+
"useTopLevelRegex": "error"
5180
},
52-
"correctness": {
53-
"noUnusedVariables": {
54-
"level": "warn",
55-
"fix": "none"
56-
}
81+
"security": {
82+
"noDangerouslySetInnerHtmlWithChildren": "error" // forces you to explain why you have no alternative to using this property, and think about potential sanitization issues
83+
},
84+
"style": {
85+
"useNamingConvention": {
86+
"level": "error",
87+
"options": {
88+
"strictCase": false,
89+
"conventions": [
90+
{
91+
"selector": {
92+
"kind": "objectLiteralProperty"
93+
},
94+
"formats": ["CONSTANT_CASE", "camelCase"]
95+
}
96+
]
97+
}
98+
},
99+
"useFilenamingConvention": {
100+
"level": "error",
101+
"options": {
102+
"filenameCases": ["export", "kebab-case"] // personal preference
103+
}
104+
},
105+
"noDefaultExport": "error",
106+
"noEnum": "error",
107+
"noInferrableTypes": "error",
108+
"noNonNullAssertion": "off",
109+
"noParameterAssign": "error",
110+
"noShoutyConstants": "error",
111+
"noSubstr": "error",
112+
"noUnusedTemplateLiteral": "error",
113+
"noUselessElse": "error",
114+
"noYodaExpression": "error",
115+
"useArrayLiterals": "error",
116+
"useAsConstAssertion": "error",
117+
"useAtIndex": "error",
118+
"useCollapsedIf": "error",
119+
"useConsistentArrayType": "error",
120+
"useConsistentBuiltinInstantiation": "error",
121+
"useDefaultParameterLast": "error",
122+
"useDefaultSwitchClause": "error",
123+
"useDeprecatedReason": "error",
124+
"useEnumInitializers": "error",
125+
"useExplicitLengthCheck": "error",
126+
"useFragmentSyntax": "error",
127+
"useNumberNamespace": "error",
128+
"useSelfClosingElements": "error",
129+
"useShorthandAssign": "error",
130+
"useSingleVarDeclarator": "error",
131+
"useThrowNewError": "error",
132+
"useThrowOnlyError": "error",
133+
"useTrimStartEnd": "error"
57134
},
58135
"suspicious": {
59136
"noExplicitAny": "error",
60-
"noUnknownAtRules": "off"
137+
"useIterableCallbackReturn": "off",
138+
"noAlert": "error",
139+
// "noConsole": {
140+
// "level": "error", // helps you not forget to remove console logs. useful for debug, but dangerous for prod
141+
// "options": {
142+
// "allow": ["assert", "error", "info", "warn"] // alternatively, this forces you to be more intentional about your logging
143+
// }
144+
// },
145+
"noDocumentCookie": "error",
146+
"noDocumentImportInPage": "error",
147+
"noDuplicateCustomProperties": "error",
148+
"noDuplicateElseIf": "error",
149+
"noDuplicateProperties": "error",
150+
"noEvolvingTypes": "error",
151+
"noTemplateCurlyInString": "error",
152+
"useAwait": "error", // forces you to be intentional about your async code
153+
"useErrorMessage": "error",
154+
"useNumberToFixedDigitsArgument": "error" // forces you to be intentional about your async code
61155
}
62156
}
63157
},

next.config.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import createBundleAnalyzer from "@next/bundle-analyzer";
21
import { withPostHogConfig } from "@posthog/nextjs-config";
32
import type { NextConfig } from "next";
43
import { PHASE_DEVELOPMENT_SERVER, PHASE_PRODUCTION_BUILD } from "next/constants.js";
@@ -9,10 +8,6 @@ import { PHASE_DEVELOPMENT_SERVER, PHASE_PRODUCTION_BUILD } from "next/constants
98
*/
109
import { env } from "@/env.config";
1110

12-
const withBundleAnalyzer = createBundleAnalyzer({
13-
enabled: process.env.ANALYZE === "true",
14-
});
15-
1611
let nextConfig: NextConfig = {
1712
typedRoutes: true,
1813
reactCompiler: true,
@@ -32,7 +27,7 @@ let nextConfig: NextConfig = {
3227
},
3328
pageExtensions: ["js", "jsx", "ts", "tsx"],
3429
reactStrictMode: true,
35-
async rewrites() {
30+
rewrites() {
3631
return [
3732
{
3833
destination: "https://us-assets.i.posthog.com/static/:path*",
@@ -53,8 +48,6 @@ let nextConfig: NextConfig = {
5348
staticPageGenerationTimeout: 300,
5449
};
5550

56-
nextConfig = withBundleAnalyzer(nextConfig);
57-
5851
if (env.POSTHOG_API_KEY && env.POSTHOG_ENV_ID) {
5952
nextConfig = withPostHogConfig(nextConfig, {
6053
personalApiKey: env.POSTHOG_API_KEY, // Personal API Key
@@ -67,6 +60,7 @@ if (env.POSTHOG_API_KEY && env.POSTHOG_ENV_ID) {
6760
});
6861
}
6962

63+
// biome-ignore lint/style/noDefaultExport: Config file
7064
export default (phase: string) => {
7165
const isDev = phase === PHASE_DEVELOPMENT_SERVER;
7266
const isBuild = phase === PHASE_PRODUCTION_BUILD;

package.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,43 @@
66
"scripts": {
77
"start": "cross-env NODE_ENV=production next start",
88
"build": "cross-env NODE_ENV=production next build",
9-
"build:analyze": "cross-env ANALYZE=true next build",
9+
"analyze": "cross-env NODE_ENV=production next experimental-analyze --serve",
1010
"dev": "next dev -H 0.0.0.0",
1111
"lint": "biome check",
1212
"lint:fix": "biome check --write --unsafe",
1313
"typecheck": "tsc --noEmit"
1414
},
1515
"dependencies": {
16-
"@posthog/nextjs-config": "^1.3.2",
16+
"@posthog/nextjs-config": "^1.6.1",
1717
"class-variance-authority": "^0.7.1",
1818
"client-only": "^0.0.1",
1919
"clsx": "^2.1.1",
2020
"envin": "^1.1.10",
21-
"next": "16.0.0-beta.0",
21+
"next": "16.1.0-canary.9",
2222
"next-themes": "^0.4.6",
2323
"nextjs-toploader": "^3.9.17",
24-
"posthog-js": "^1.275.1",
25-
"posthog-node": "^5.9.5",
24+
"posthog-js": "^1.298.1",
25+
"posthog-node": "^5.14.1",
2626
"react": "19.2.0",
2727
"react-dom": "19.2.0",
2828
"react-icons": "^5.5.0",
2929
"remeda": "^2.32.0",
3030
"server-only": "^0.0.1",
3131
"sharp": "^0.33.5",
32-
"tailwind-merge": "^3.3.1",
33-
"zod": "^4.1.12"
32+
"tailwind-merge": "^3.4.0",
33+
"zod": "^4.1.13"
3434
},
3535
"devDependencies": {
36-
"@biomejs/biome": "^2.2.6",
37-
"@next/bundle-analyzer": "16.0.0-beta.0",
38-
"@tailwindcss/postcss": "^4.1.14",
36+
"@biomejs/biome": "^2.3.8",
37+
"@tailwindcss/postcss": "^4.1.17",
3938
"@tailwindcss/typography": "^0.5.19",
40-
"@types/node": "^20.19.21",
41-
"@types/react": "19.2.2",
42-
"@types/react-dom": "19.2.1",
39+
"@types/node": "^20.19.25",
40+
"@types/react": "19.2.7",
41+
"@types/react-dom": "19.2.3",
4342
"babel-plugin-react-compiler": "^1.0.0",
4443
"cross-env": "^7.0.3",
4544
"postcss": "^8.5.6",
46-
"tailwindcss": "^4.1.14",
45+
"tailwindcss": "^4.1.17",
4746
"tailwindcss-motion": "^1.1.1",
4847
"tw-animate-css": "^1.4.0",
4948
"typescript": "^5.9.3",
@@ -52,8 +51,8 @@
5251
"packageManager": "pnpm@10.15.0",
5352
"pnpm": {
5453
"overrides": {
55-
"@types/react": "19.2.2",
56-
"@types/react-dom": "19.2.1"
54+
"@types/react": "19.2.7",
55+
"@types/react-dom": "19.2.3"
5756
}
5857
}
5958
}

0 commit comments

Comments
 (0)