Skip to content

Commit 3b55463

Browse files
committed
chore: migrate to biome, vitest, and next.js 15
Replace ESLint/Prettier with Biome for faster linting and formatting. Replace Jest with Vitest for modern testing. Replace node-mocks-http with next-test-api-route-handler for better Next.js integration. Upgrade to Next.js 15 with backward compatibility for v12-15. - Node.js 16+ still required (no changes) - Consumers using Next.js 12-15 remain supported - Add: @biomejs/biome, vitest, @vitest/ui, next-test-api-route-handler - Add: react, react-dom, @types/react (dev/test dependencies) - Remove: eslint and plugins, prettier, jest, ts-jest, node-mocks-http - Update: next (12.3.0 -> 15.0.3), @types/node, commitlint, husky - Add: biome.json, vitest.config.ts, tsconfig.build.json - Remove: .eslintrc.js, .prettierrc.js, jest.config.js - Update: tsconfig.json (added vitest types, separate build config) - Convert: commitlint.config.js -> commitlint.config.ts - Add: typecheck, lint:fix, format, test:watch - Update: lint (biome), test (vitest), build (use tsconfig.build.json) - Update imports to use node: protocol (e.g., node:fs/promises) - Add explicit vitest imports to test file - Rewrite all tests to use testApiHandler with pagesHandler All tests passing: typecheck ✓, lint ✓, build ✓, tests 9/9 ✓
1 parent f9fda09 commit 3b55463

16 files changed

+3666
-5273
lines changed

.eslintrc.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
dist/
1+
dist/
2+
node_modules/
3+
.claude/

.prettierrc.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright © 2022 Bueno Systems
1+
Copyright © 2025 Bueno Systems
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

biome.json

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"ignore": ["node_modules", "dist", ".husky", ".claude"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space",
15+
"indentWidth": 2,
16+
"lineWidth": 80
17+
},
18+
"javascript": {
19+
"globals": [],
20+
"formatter": {
21+
"quoteStyle": "single",
22+
"semicolons": "asNeeded",
23+
"trailingCommas": "none",
24+
"arrowParentheses": "asNeeded"
25+
}
26+
},
27+
"linter": {
28+
"enabled": true,
29+
"rules": {
30+
"recommended": true,
31+
"complexity": {
32+
"noExtraBooleanCast": "error",
33+
"noMultipleSpacesInRegularExpressionLiterals": "error",
34+
"noUselessCatch": "error",
35+
"noUselessTypeConstraint": "error",
36+
"noWith": "error"
37+
},
38+
"correctness": {
39+
"noConstAssign": "error",
40+
"noConstantCondition": "error",
41+
"noEmptyCharacterClassInRegex": "error",
42+
"noEmptyPattern": "error",
43+
"noGlobalObjectCalls": "error",
44+
"noInnerDeclarations": "error",
45+
"noInvalidConstructorSuper": "error",
46+
"noNewSymbol": "error",
47+
"noNonoctalDecimalEscape": "error",
48+
"noPrecisionLoss": "error",
49+
"noSelfAssign": "error",
50+
"noSetterReturn": "error",
51+
"noSwitchDeclarations": "error",
52+
"noUndeclaredVariables": "error",
53+
"noUnreachable": "error",
54+
"noUnreachableSuper": "error",
55+
"noUnsafeFinally": "error",
56+
"noUnsafeOptionalChaining": "error",
57+
"noUnusedLabels": "error",
58+
"noUnusedVariables": "error",
59+
"useIsNan": "error",
60+
"useValidForDirection": "error",
61+
"useYield": "error"
62+
},
63+
"style": {
64+
"noArguments": "error",
65+
"noVar": "error",
66+
"useConst": "error"
67+
},
68+
"suspicious": {
69+
"noAsyncPromiseExecutor": "error",
70+
"noCatchAssign": "error",
71+
"noClassAssign": "error",
72+
"noCompareNegZero": "error",
73+
"noControlCharactersInRegex": "error",
74+
"noDebugger": "error",
75+
"noDoubleEquals": "error",
76+
"noDuplicateCase": "error",
77+
"noDuplicateClassMembers": "error",
78+
"noDuplicateObjectKeys": "error",
79+
"noDuplicateParameters": "error",
80+
"noEmptyBlockStatements": "error",
81+
"noExplicitAny": "off",
82+
"noExtraNonNullAssertion": "error",
83+
"noFallthroughSwitchClause": "error",
84+
"noFunctionAssign": "error",
85+
"noGlobalAssign": "error",
86+
"noImportAssign": "error",
87+
"noMisleadingCharacterClass": "error",
88+
"noMisleadingInstantiator": "error",
89+
"noPrototypeBuiltins": "error",
90+
"noRedeclare": "error",
91+
"noShadowRestrictedNames": "error",
92+
"noUnsafeDeclarationMerging": "error",
93+
"noUnsafeNegation": "error",
94+
"useGetterReturn": "error",
95+
"useValidTypeof": "error"
96+
}
97+
}
98+
},
99+
"organizeImports": {
100+
"enabled": true
101+
}
102+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
extends: ['@commitlint/config-conventional'],
33
rules: {
44
// To have appropriate formatting when viewed in source control UI

jest.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
node = "24.11.1"

package.json

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99
"license": "MIT",
1010
"private": false,
1111
"scripts": {
12-
"build": "tsc -b",
12+
"build": "tsc -p tsconfig.build.json",
1313
"prepublish": "yarn build",
14-
"lint": "eslint --ext .js,.ts,.tsx .",
15-
"test": "jest"
14+
"typecheck": "tsc --noEmit",
15+
"lint": "biome check .",
16+
"lint:fix": "biome check --write .",
17+
"format": "biome format --write .",
18+
"test": "vitest run",
19+
"test:watch": "vitest"
1620
},
17-
"files": [
18-
"dist"
19-
],
21+
"files": ["dist"],
2022
"engines": {
2123
"node": ">=16.0.0"
2224
},
@@ -36,39 +38,29 @@
3638
"url": "git+https://github.com/bueno-systems/next-actuator.git"
3739
},
3840
"release": {
39-
"branches": [
40-
"main",
41-
"next"
42-
]
41+
"branches": ["main", "next"]
4342
},
4443
"publishConfig": {
4544
"access": "public"
4645
},
4746
"homepage": "https://github.com/bueno-systems/next-actuator#readme",
4847
"devDependencies": {
49-
"@commitlint/cli": "^17.1.2",
50-
"@commitlint/config-conventional": "^17.1.0",
51-
"@types/jest": "^29.0.3",
52-
"@types/node": "^18.7.18",
53-
"@typescript-eslint/eslint-plugin": "^5.37.0",
54-
"eslint": "^8.23.1",
55-
"eslint-config-prettier": "^8.5.0",
56-
"eslint-config-standard-with-typescript": "^23.0.0",
57-
"eslint-plugin-import": "^2.26.0",
58-
"eslint-plugin-n": "^15.2.5",
59-
"eslint-plugin-node": "^11.1.0",
60-
"eslint-plugin-prettier": "^4.2.1",
61-
"eslint-plugin-promise": "^6.0.1",
62-
"husky": "^8.0.0",
63-
"jest": "^29.0.3",
64-
"next": "^12.3.0",
65-
"node-mocks-http": "^1.11.0",
66-
"prettier": "^2.7.1",
67-
"semantic-release": "^19.0.5",
68-
"ts-jest": "^29.0.1",
69-
"typescript": "^4.8.3"
48+
"@biomejs/biome": "^1.9.4",
49+
"@commitlint/cli": "^20.1.0",
50+
"@commitlint/config-conventional": "^20.0.0",
51+
"@types/node": "^22.10.1",
52+
"@types/react": "^19.0.1",
53+
"@vitest/ui": "^2.1.8",
54+
"husky": "^9.1.7",
55+
"next": "^15.0.3",
56+
"next-test-api-route-handler": "^4.0.10",
57+
"react": "^19.0.0",
58+
"react-dom": "^19.0.0",
59+
"semantic-release": "^25.0.2",
60+
"typescript": "^4.8.3",
61+
"vitest": "^2.1.8"
7062
},
7163
"peerDependencies": {
72-
"next": ">=12.0.0"
64+
"next": "^12 || ^13 || ^14 || ^15"
7365
}
7466
}

0 commit comments

Comments
 (0)