diff --git a/eslint.config.mjs b/eslint.config.mjs index a2364a78f1b6..0e3e93148ab9 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -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', @@ -88,6 +89,7 @@ export default tseslint.config( '.nx/', '.yarn/', '**/jest.config.js', + '**/vitest.config.mts', '**/node_modules/**', '**/dist/**', '**/fixtures/**', diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index bee312126e72..601d13b742b0 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -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": { @@ -36,7 +37,9 @@ "prettier": "^3.2.5" }, "devDependencies": { - "typescript": "*" + "@vitest/coverage-v8": "^3.1.1", + "typescript": "*", + "vitest": "^3.1.1" }, "funding": { "type": "opencollective", diff --git a/packages/rule-schema-to-typescript-types/project.json b/packages/rule-schema-to-typescript-types/project.json index 266c06799b21..283f31ed4538 100644 --- a/packages/rule-schema-to-typescript-types/project.json +++ b/packages/rule-schema-to-typescript-types/project.json @@ -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", diff --git a/packages/rule-schema-to-typescript-types/tsconfig.build.json b/packages/rule-schema-to-typescript-types/tsconfig.build.json index c0deb4d6bd28..b632cd311a77 100644 --- a/packages/rule-schema-to-typescript-types/tsconfig.build.json +++ b/packages/rule-schema-to-typescript-types/tsconfig.build.json @@ -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" diff --git a/packages/rule-schema-to-typescript-types/vitest.config.mts b/packages/rule-schema-to-typescript-types/vitest.config.mts new file mode 100644 index 000000000000..190bac2c0ce1 --- /dev/null +++ b/packages/rule-schema-to-typescript-types/vitest.config.mts @@ -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; diff --git a/tsconfig.repo-config-files.json b/tsconfig.repo-config-files.json index d0c46503c208..b34e770c2746 100644 --- a/tsconfig.repo-config-files.json +++ b/tsconfig.repo-config-files.json @@ -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", diff --git a/yarn.lock b/yarn.lock index e9bf6b56de81..6a765eda8776 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: