Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
shamefully-hoist=true

# pkg.pr.new registry bridge (added by test-pkg-pr-new-migrate.sh)
registry=https://pkg-pr-registry-bridge.void.app/
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["VoidZero.vite-plus-extension-pack"]
}
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"editor.defaultFormatter": "oxc.oxc-vscode",
"[javascript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"oxc.fmt.configPath": "./vite.config.ts",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.codeActionsOnSave": {
"source.fixAll.oxc": "explicit"
}
}
19 changes: 4 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,12 @@
"ts-json-schema-generator": "^2.9.0",
"turbo": "^2.9.7",
"typescript": "^6.0.3",
"vite-plus": "^0.1.15"
"vite": "catalog:",
"vite-plus": "catalog:"
},
"engines": {
"node": "^20.19.0 || >=22.13.0",
"node": "^20.19.0 || >=22.18.0",
"pnpm": ">=8"
},
"packageManager": "pnpm@10.29.1",
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",
"@sentry/cli",
"esbuild",
"unrs-resolver"
],
"overrides": {
"oxlint": ">=1.66.0 <1.67.0",
"oxlint-tsgolint": "^0.23.0"
}
}
"packageManager": "pnpm@10.29.1"
}
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"effect": "4.0.0-beta.70",
"eslint-plugin-react-hooks": "^7.1.1",
"jiti": "^2.7.0",
"oxlint": ">=1.66.0 <1.67.0",
"oxlint-plugin-react-doctor": "workspace:*",
"picomatch": "^4.0.4",
"semver": "^7.7.4",
Expand All @@ -38,7 +37,8 @@
"@effect/vitest": "4.0.0-beta.70",
"@types/node": "^25.6.0",
"@types/picomatch": "^4.0.3",
"@types/semver": "^7.7.1"
"@types/semver": "^7.7.1",
"vitest": "catalog:"
},
"engines": {
"node": "^20.19.0 || >=22.13.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const MutableInDepsComponent = ({ token }: { token: string }) => {
void token;
useEffect(() => {
document.title = location.pathname;
}, [location.pathname]);
}, []);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The component MutableInDepsComponent in this test fixture seems specifically designed to test how the linter handles mutable values (like location.pathname) in the useEffect dependency array. Changing the dependency array to [] removes the mutable dependency, which likely defeats the purpose of this test fixture and reduces test coverage for this rule. If this was changed to suppress a lint error during migration, consider using a lint suppression comment instead of modifying the test fixture's behavior.

Suggested change
}, []);
}, [location.pathname]);

return <div />;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";
import { detectForeignDisableNearMiss } from "../../src/detect-foreign-disable-near-miss.js";

describe("regression: issue #920 - Object.prototype key collision in disable comments", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/tests/rule-key-aliases.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, it, expect } from "vitest";
import { describe, it, expect } from "vite-plus/test";
import {
isSameRuleKey,
getEquivalentRuleKeys,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from "vite";
import { defineConfig } from "vite-plus";
import { myPlugin } from "./src/vite-plugin";

export default defineConfig({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import { defineConfig } from "vitest/config";
import { defineConfig } from "vite-plus";
export default defineConfig({});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SettingsPanel from "./settings-panel";
import { describe, it } from "vitest";
import { describe, it } from "vite-plus/test";

describe("SettingsPanel", () => {
it("loads", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { vi, describe, it, expect } from "vitest";
import { vi, describe, it, expect } from "vite-plus/test";
vi.mock("../src/mocked-util");
import { helper } from "../src/index";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from "tsdown";
import { defineConfig } from "vite-plus/pack";

export default defineConfig([
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fileURLToPath, URL } from "node:url";
import path from "node:path";
import { defineConfig } from "vite";
import { defineConfig } from "vite-plus";

export default defineConfig({
resolve: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { vi, describe, it, expect } from "vitest";
import { vi, describe, it, expect } from "vite-plus/test";
import { fetchData } from "../src/server/api";

vi.mock("../src/server/api");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { vi, describe, it, expect } from "vitest";
import { vi, describe, it, expect } from "vite-plus/test";
import { formatDate } from "../src/utils/helper";

vi.mock("../src/utils/helper", () => ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from "vite";
import { defineConfig } from "vite-plus";

export default defineConfig({
test: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from "vitest/config";
import { defineConfig } from "vite-plus";

export default defineConfig({
test: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { defineConfig } from "vitest/config";
import { defineConfig } from "vite-plus";

export default defineConfig({});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from "vitest/config";
import { defineConfig } from "vite-plus";

export default defineConfig({
test: {
Expand Down
3 changes: 2 additions & 1 deletion packages/oxlint-plugin-react-doctor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"oxc-parser": "^0.135.0"
},
"devDependencies": {
"@types/node": "^25.6.0"
"@types/node": "^25.6.0",
"vitest": "catalog:"
},
"engines": {
"node": "^20.19.0 || >=22.13.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "@voidzero-dev/vite-plus-test";
import { describe, expect, it } from "vitest";
import { analyzeControlFlow } from "./control-flow-graph.js";
import { attachParentReferences } from "../../test-utils/attach-parent-references.js";
import { parseFixture } from "../../test-utils/parse-fixture.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "@voidzero-dev/vite-plus-test";
import { describe, expect, it } from "vitest";
import { analyzeScopes } from "./scope-analysis.js";
import { attachParentReferences } from "../../test-utils/attach-parent-references.js";
import { parseFixture } from "../../test-utils/parse-fixture.js";
Expand Down
4 changes: 2 additions & 2 deletions packages/react-doctor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"eslint-plugin-react-hooks": "^7.1.1",
"jiti": "^2.7.0",
"magicast": "^0.5.3",
"oxlint": ">=1.66.0 <1.67.0",
"oxlint-plugin-react-doctor": "workspace:*",
"prompts": "^2.4.2",
"typescript": ">=5.0.4 <6",
Expand All @@ -82,7 +81,8 @@
"@types/prompts": "^2.4.9",
"@xterm/headless": "^6.0.0",
"commander": "^14.0.3",
"ora": "^9.4.0"
"ora": "^9.4.0",
"vitest": "catalog:"
},
"engines": {
"node": "^20.19.0 || >=22.13.0"
Expand Down
Loading
Loading