Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(tsconfig-utils): syncvitest config with latest setup#11239

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

Open
aryaemami59 wants to merge5 commits intotypescript-eslint:main
base:main
Choose a base branch
Loading
fromaryaemami59:chore/tsconfig-utils-vitest-migration
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
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
6 changes: 6 additions & 0 deletionspackages/project-service/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,6 +50,12 @@
"@typescript-eslint/types": "^8.33.0",
"debug": "^4.3.4"
},
"devDependencies": {
"@vitest/coverage-v8": "^3.1.3",
"rimraf": "*",
"typescript": "*",
"vitest": "^3.1.3"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
Expand Down
6 changes: 6 additions & 0 deletionspackages/tsconfig-utils/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,6 +47,12 @@
"peerDependencies": {
"typescript": ">=4.8.4 <5.9.0"
},
"devDependencies": {
"@vitest/coverage-v8": "^3.1.3",
"rimraf": "*",
"typescript": "*",
"vitest": "^3.1.3"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import path from 'node:path';
import* aspath from 'node:path';
import * as ts from 'typescript';

import { getParsedConfigFile } from '../../src/getParsedConfigFile';
import { getParsedConfigFile } from '../src/getParsedConfigFile.js';

const mockGetParsedCommandLineOfConfigFile = vi.fn();

Expand All@@ -22,9 +22,9 @@ describe(getParsedConfigFile, () => {
});

it('throws an error when tsserver.sys is undefined', () => {
expect(() =>
getParsedConfigFile({} as typeof ts, './tsconfig.json'),
).toThrow(
expect(() => {
getParsedConfigFile({} as typeof ts, './tsconfig.json');
}).toThrow(
'`getParsedConfigFile` is only supported in a Node-like environment.',
);
});
Expand DownExpand Up@@ -72,9 +72,9 @@ describe(getParsedConfigFile, () => {
},
] satisfies ts.Diagnostic[],
});
expect(() =>getParsedConfigFile(mockTsserver, './tsconfig.json')).toThrow(
/.+ error TS1234: Oh no!/,
);
expect(() =>{
getParsedConfigFile(mockTsserver, './tsconfig.json');
}).toThrow(/.+ error TS1234: Oh no!/);
});

it('throws a diagnostic error when getParsedCommandLineOfConfigFile throws an error', () => {
Expand All@@ -96,9 +96,9 @@ describe(getParsedConfigFile, () => {
} satisfies ts.Diagnostic);
},
);
expect(() =>getParsedConfigFile(mockTsserver, './tsconfig.json')).toThrow(
/.+ error TS1234: Oh no!/,
);
expect(() =>{
getParsedConfigFile(mockTsserver, './tsconfig.json');
}).toThrow(/.+ error TS1234: Oh no!/);
});

it('uses compiler options when parsing a config file succeeds', () => {
Expand Down
13 changes: 2 additions & 11 deletionspackages/tsconfig-utils/tsconfig.build.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
"emitDeclarationOnly": false,
"types": ["node"]
},
"include": ["src/**/*.ts", "typings"],
"exclude": ["vitest.config.mts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"extends": "../../tsconfig.build.json",
"compilerOptions": {},
"references": []
}
14 changes: 1 addition & 13 deletionspackages/tsconfig-utils/tsconfig.spec.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc/packages/tsconfig-utils",
"module": "NodeNext",
"resolveJsonModule": true,
"types": ["node", "vitest/globals", "vitest/importMeta"]
"outDir": "../../dist/packages/tsconfig-utils"
},
"include": [
"vitest.config.mts",
"package.json",
"src/**/*.test.ts",
"src/**/*.spec.ts",
"src/**/*.d.ts",
"tests"
],
"exclude": ["**/fixtures/**"],
"references": [
{
"path": "./tsconfig.build.json"
Expand Down
5 changes: 0 additions & 5 deletionspackages/tsconfig-utils/vitest.config.mts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,14 +11,9 @@ const vitestConfig = mergeConfig(
root: import.meta.dirname,

test: {
diff: {
maxDepth: 1,
},

dir: path.join(import.meta.dirname, 'tests'),
name: packageJson.name.replace('@typescript-eslint/', ''),
root: import.meta.dirname,
testTimeout: 10_000,
},
}),
);
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp