Skip to content

Commit fea5e65

Browse files
committed
Set up Vitest workspace tooling
Replace Jest-specific package scripts, resolver config, and lint integration with a Vitest workspace setup. Refresh the lockfile and package metadata so the repo resolves source imports through Vitest/Vite instead of the old Jest ESM workaround.
1 parent f9c8483 commit fea5e65

File tree

14 files changed

+3369
-6852
lines changed

14 files changed

+3369
-6852
lines changed

eslint.config.mjs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import eslint from "@eslint/js";
22
import { defineConfig } from "eslint/config";
33
import eslintConfigPrettier from "eslint-config-prettier";
4-
import jest from "eslint-plugin-jest";
4+
import vitest from "@vitest/eslint-plugin";
55
import tseslint from "typescript-eslint";
66

77
export default defineConfig(
8-
{
9-
ignores: ["**/dist/", "**/node_modules/", ".agents/", "example/", "jest-resolver.cjs"]
10-
},
8+
{ ignores: ["**/dist/", "**/node_modules/", ".agents/", "example/"] },
119
eslint.configs.recommended,
1210
{
1311
extends: tseslint.configs.recommendedTypeChecked,
@@ -36,12 +34,12 @@ export default defineConfig(
3634
eslintConfigPrettier,
3735
{
3836
files: ["**/test/**/*.ts"],
39-
extends: [jest.configs["flat/recommended"]],
37+
plugins: vitest.configs.recommended.plugins,
4038
rules: {
41-
"jest/valid-title": "off",
42-
"jest/valid-describe-callback": "off",
43-
"jest/no-export": "off",
44-
"jest/no-done-callback": "warn"
39+
...vitest.configs.recommended.rules,
40+
"vitest/valid-title": "off",
41+
"vitest/valid-describe-callback": "off",
42+
"vitest/no-done-callback": "warn"
4543
}
4644
}
4745
);

example/react/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
},
1010
"eslintConfig": {
1111
"extends": [
12-
"react-app",
13-
"react-app/jest"
12+
"react-app"
1413
]
1514
},
1615
"browserslist": {
@@ -26,7 +25,6 @@
2625
]
2726
},
2827
"devDependencies": {
29-
"@testing-library/jest-dom": "^6.9.1",
3028
"@testing-library/react": "^16.3.2",
3129
"@testing-library/user-event": "^14.6.1",
3230
"@vitejs/plugin-react": "^6.0.1",

example/react/src/setupTests.js

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

jest-resolver.cjs

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

0 commit comments

Comments
 (0)