Skip to content

chore: migrate rule-schema-to-typescript-types from jest to vitest #10774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6af577d
Install `vitest`
aryaemami59 Feb 4, 2025
31af256
Rename `jest.config.js` to `vitest.config.mts`
aryaemami59 Feb 4, 2025
4cee02c
chore(rule-schema-to-typescript-types): migrate to `vitest`
aryaemami59 Feb 4, 2025
cdb2544
Fix Vitest config
aryaemami59 Mar 7, 2025
5715968
Include `vitest.config.mts` in `tsconfig.spec.json`
aryaemami59 Mar 8, 2025
a1dd956
Explicitly enable `resolveJsonModule`
aryaemami59 Mar 10, 2025
74a8011
Use `.replace` instead of `.split`
aryaemami59 Mar 10, 2025
c3d6426
Type check `vitest.config.mts` files using project references.
aryaemami59 Mar 10, 2025
f0f4aa5
Fix Vitest config
aryaemami59 Mar 12, 2025
d18a971
Update `vitest` to version 3.1.1
aryaemami59 Mar 31, 2025
5dae395
Update `@vitest/eslint-plugin` to version 1.1.39
aryaemami59 Apr 2, 2025
d0fcf37
Fix `knip`
aryaemami59 Apr 3, 2025
863b922
Update `vite` to version 6.2.5
aryaemami59 Apr 3, 2025
c836611
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 7, 2025
faf5deb
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 7, 2025
e729d7c
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 10, 2025
ea6f1d1
Update `vite` to version 6.2.6
aryaemami59 Apr 10, 2025
55bc4ef
Update `@vitest/eslint-plugin` to version 1.1.40
aryaemami59 Apr 10, 2025
db38e2f
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 10, 2025
1d37f46
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 11, 2025
c8716c9
Update `@vitest/eslint-plugin` to version 1.1.42
aryaemami59 Apr 11, 2025
b9d0ef2
Enable the new `vitest/prefer-describe-function-title` rule
aryaemami59 Apr 11, 2025
5f1ebe7
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 11, 2025
d9f6cef
Use `vitestPlugin.configs.env`
aryaemami59 Apr 11, 2025
5fa10a3
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 11, 2025
e5b77c5
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 11, 2025
fc7dd64
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 12, 2025
12b228f
Try disabling remote cache
aryaemami59 Apr 12, 2025
bbb2abc
Try disabling remote cache
aryaemami59 Apr 12, 2025
9ee2ef0
Update `typecheck` output path in `nx.json`
aryaemami59 Apr 12, 2025
24733e0
Fix `vitest` coverage output when run with `nx`
aryaemami59 Apr 12, 2025
9e0dc92
Merge branch 'main'
JoshuaKGoldberg Apr 14, 2025
49e0121
Merge branch 'main' into chore/rule-schema-to-typescript-types-vitest…
JoshuaKGoldberg Apr 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const vitestFiles = [
'packages/integration-tests/tools/pack-packages.ts',
'packages/parser/tests/lib/**/*.test.{ts,tsx,cts,mts}',
'packages/parser/tests/test-utils/**/*.{ts,tsx,cts,mts}',
'packages/rule-schema-to-typescript-types/tests/**/*.test.{ts,tsx,cts,mts}',
'packages/rule-tester/tests/**/*.test.{ts,tsx,cts,mts}',
'packages/scope-manager/tests/**/*.test.{ts,tsx,cts,mts}',
'packages/scope-manager/tests/test-utils/serializers/index.ts',
Expand Down Expand Up @@ -88,6 +89,7 @@ export default tseslint.config(
'.nx/',
'.yarn/',
'**/jest.config.js',
'**/vitest.config.mts',
'**/node_modules/**',
'**/dist/**',
'**/fixtures/**',
Expand Down
5 changes: 4 additions & 1 deletion packages/rule-schema-to-typescript-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"build": "tsc -b tsconfig.build.json",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "npx nx lint",
"test": "vitest --run --config=$INIT_CWD/vitest.config.mts",
"check-types": "npx nx typecheck"
},
"dependencies": {
Expand All @@ -36,7 +37,9 @@
"prettier": "^3.2.5"
},
"devDependencies": {
"typescript": "*"
"@vitest/coverage-v8": "^3.1.1",
"typescript": "*",
"vitest": "^3.1.1"
},
"funding": {
"type": "opencollective",
Expand Down
5 changes: 3 additions & 2 deletions packages/rule-schema-to-typescript-types/project.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "rule-schema-to-typescript-types",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"type": "library",
"implicitDependencies": [],
"projectType": "library",
"root": "packages/rule-schema-to-typescript-types",
"sourceRoot": "packages/rule-schema-to-typescript-types/src",
"targets": {
"lint": {
"executor": "@nx/eslint:lint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"resolveJsonModule": true
},
"include": ["src/**/*.ts", "typings"],
"exclude": ["jest.config.js", "src/**/*.spec.ts", "src/**/*.test.ts"],
"exclude": ["vitest.config.mts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"references": [
{
"path": "../utils/tsconfig.build.json"
Expand Down
20 changes: 20 additions & 0 deletions packages/rule-schema-to-typescript-types/vitest.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig, mergeConfig } from 'vitest/config';

import { vitestBaseConfig } from '../../vitest.config.base.mjs';
import packageJson from './package.json' with { type: 'json' };

const vitestConfig = mergeConfig(
vitestBaseConfig,

defineConfig({
root: import.meta.dirname,

test: {
name: packageJson.name.replace('@typescript-eslint/', ''),
root: import.meta.dirname,
passWithNoTests: true,
},
}),
);

export default vitestConfig;
2 changes: 2 additions & 0 deletions tsconfig.repo-config-files.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"tools/**/*.ts",
"tools/**/*.mts",
"eslint.config.mjs",
"vitest.config.base.mts",
"vitest.config.mts",
"jest.config.base.js",
"jest.config.js",
"jest.preset.js",
Expand Down
2 changes: 2 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6054,9 +6054,11 @@ __metadata:
dependencies:
"@typescript-eslint/type-utils": 8.30.1
"@typescript-eslint/utils": 8.30.1
"@vitest/coverage-v8": ^3.1.1
natural-compare: ^1.4.0
prettier: ^3.2.5
typescript: "*"
vitest: ^3.1.1
languageName: unknown
linkType: soft

Expand Down