Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
chore(utils): migrate fromjest
tovitest
#10777
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
JoshuaKGoldberg merged 36 commits intotypescript-eslint:mainfromaryaemami59:chore/utils-vitest-migrationApr 11, 2025
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
36 commits Select commitHold shift + click to select a range
9cfcdb5
Install `vitest`
aryaemami59990b10c
Rename `jest.config.js` to `vitest.config.mts`
aryaemami5933e770f
chore(utils): migrate to `vitest`
aryaemami595fe6661
Update `vitest` to version 3.0.8
aryaemami59ff4ea78
Fix Vitest config
aryaemami59aa690ea
Include `vitest.config.mts` in `tsconfig.spec.json`
aryaemami59e94d799
Add `vitest.config.mts` files to ESLint configuration
aryaemami590bc3421
Use `defineProject` instead of `defineConfig`
aryaemami59f740b13
Explicitly enable `resolveJsonModule`
aryaemami59b88f326
Use `.replace` instead of `.split`
aryaemami59dbff826
Type check `vitest.config.mts` files using project references.
aryaemami59dd0a0ad
Update `@vitest/eslint-plugin` to version 1.1.37
aryaemami595712fcf
Fix type tests
aryaemami59809e644
Fix Vitest config
aryaemami59d0bda83
Fix `typecheck` task
aryaemami59c07978f
Update `vitest` to version 3.0.9
aryaemami59b61cdb9
Update `@vitest/eslint-plugin` to version 1.1.38
aryaemami592f4ac90
Include type-tests in ESLint config
aryaemami598704850
Update `vitest` to version 3.1.1
aryaemami598b4fc64
Update `@vitest/eslint-plugin` to version 1.1.39
aryaemami591a2e35b
Switch to `test.for`
aryaemami59811cc57
Fix `knip` config
aryaemami598f1a911
Update `vite` to version 6.2.5
aryaemami59d37cd19
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami5932c8f53
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami595c0204c
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami599e24c92
Update `vite` to version 6.2.6
aryaemami598b3dfb8
Update `@vitest/eslint-plugin` to version 1.1.40
aryaemami59ce8d947
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59f250393
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59911c77c
Update `@vitest/eslint-plugin` to version 1.1.42
aryaemami59978ac7a
Enable the new `vitest/prefer-describe-function-title` rule
aryaemami59a7db8f5
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami593f6d31a
Use `vitestPlugin.configs.env`
aryaemami591492a81
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59005e0f2
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -99,3 +99,6 @@ packages/**/.yarn | ||
.nx/cache | ||
.nx/workspace-data | ||
# Vitest type tests | ||
tsconfig*.vitest-temp.json |
1 change: 1 addition & 0 deletionseslint.config.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletionknip.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletionspackages/utils/jest.config.js
This file was deleted.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
9 changes: 5 additions & 4 deletionspackages/utils/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletionspackages/utils/project.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
{ | ||
"name": "utils", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "library", | ||
"root": "packages/utils", | ||
"sourceRoot": "packages/utils/src", | ||
"targets": { | ||
"lint": { | ||
"executor": "@nx/eslint:lint", | ||
"outputs": ["{options.outputFile}"] | ||
}, | ||
"test": { | ||
"executor": "@nx/vite:test", | ||
"dependsOn": ["^build", "typecheck"] | ||
} | ||
} | ||
} |
4 changes: 2 additions & 2 deletionspackages/utils/tests/eslint-utils/RuleCreator.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionpackages/utils/tests/eslint-utils/applyDefault.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionpackages/utils/tests/eslint-utils/deepMerge.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletionspackages/utils/tests/eslint-utils/getParserServices.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionpackages/utils/tests/eslint-utils/nullThrows.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletionspackages/utils/tests/eslint-utils/parserSeemsToBeTSESLint.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
16 changes: 6 additions & 10 deletions...s/utils/tests/ts-eslint/Rule.type-test.ts → ...ages/utils/tests/ts-eslint/Rule.test-d.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionpackages/utils/tsconfig.build.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletionspackages/utils/tsconfig.spec.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletionspackages/utils/vitest.config.mts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as path from 'node:path'; | ||
import { defineProject, mergeConfig } from 'vitest/config'; | ||
import { vitestBaseConfig } from '../../vitest.config.base.mjs'; | ||
import packageJson from './package.json' with { type: 'json' }; | ||
const vitestConfig = mergeConfig( | ||
vitestBaseConfig, | ||
defineProject({ | ||
root: import.meta.dirname, | ||
test: { | ||
dir: path.join(import.meta.dirname, 'tests'), | ||
name: packageJson.name.replace('@typescript-eslint/', ''), | ||
root: import.meta.dirname, | ||
typecheck: { | ||
enabled: true, | ||
tsconfig: path.join(import.meta.dirname, 'tsconfig.spec.json'), | ||
}, | ||
}, | ||
}), | ||
); | ||
export default vitestConfig; |
3 changes: 2 additions & 1 deletionyarn.lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.