GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(migrate): preserve Oxlint inheritance with shared TS configs by fengmk2 · Pull Request #3097 · voidzero-dev/vite-plus

fix(migrate): preserve Oxlint inheritance with shared TS configs #3097

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.

Sign up for GitHub

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
fengmk2 merged 24 commits into main from fix/migrate-oxlint-extends
Oct 20, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

fix(migrate): preserve Oxlint inheritance with shared TS configs #3097

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e107c18
fix(migrate): resolve Oxlint JSON extends
fengmk2 Oct 17, 2026
0f1cf02
test(migrate): snapshot lint output directly
fengmk2 Oct 17, 2026
ba6d2a2
fix(migrate): import shared Oxlint configs
fengmk2 Oct 17, 2026
ef985f5
fix(migrate): assume ESM for shared Oxlint configs
fengmk2 Oct 17, 2026
13456db
test(migrate): avoid platform-dependent lint ordering
fengmk2 Oct 18, 2026
b8c0296
fix(migrate): preserve workspace Oxlint consumers
fengmk2 Oct 18, 2026
9bf086d
fix(migrate): retain shared owner ignore patterns
fengmk2 Oct 18, 2026
c638865
fix(migrate): track completion per workspace config
fengmk2 Oct 18, 2026
e115cc2
refactor(migrate): simplify Oxlint config migration
fengmk2 Oct 18, 2026
b29c028
fix(migrate): preserve owner fields and resume partial migrations
fengmk2 Oct 19, 2026
5935519
fix(migrate): preserve configs with unsupported import paths
fengmk2 Oct 19, 2026
835b7a8
fix(migrate): clean up completed config aliases independently
fengmk2 Oct 19, 2026
1e32e5a
fix(migrate): resolve configs from their declared paths
fengmk2 Oct 19, 2026
a0ff2b1
fix(migrate): clean up completed owners on retry
fengmk2 Oct 19, 2026
b4b272d
fix(migrate): preserve Windows junction path resolution
fengmk2 Oct 19, 2026
9e33723
fix(migrate): retain configs with unsupported import paths
fengmk2 Oct 19, 2026
bfec065
refactor(migrate): share Oxlint graph traversal
fengmk2 Oct 19, 2026
11445f3
fix(migrate): preserve workspace Oxlint migration state
fengmk2 Oct 19, 2026
8443afe
fix(migrate): retry preserved Oxlint configs reliably
fengmk2 Oct 19, 2026
4c8158e
fix(migrate): retain config pragmas and retry lint conflicts
fengmk2 Oct 19, 2026
50d475c
fix(migrate): avoid an intermediate config path array
fengmk2 Oct 19, 2026
ff52cb4
refactor(migrate): simplify Oxlint module plan handling
fengmk2 Oct 20, 2026
ea09740
fix(migrate): sanitize inherited plugins and scope config retries
fengmk2 Oct 20, 2026
55cec99
fix(migrate): retain workspace JSON during full setup
fengmk2 Oct 20, 2026
File filter
Filter by extension


Clear filters
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

1 change: 1 addition & 0 deletions 1 ...s/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_monorepo_oxlint_extends/.gitignore
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/node_modules
6 changes: 6 additions & 0 deletions 6 ...vp_cli_snapshots/tests/cli_snapshots/fixtures/create_monorepo_oxlint_extends/package.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "create-oxlint-workspace",
"private": true,
"type": "module",
"packageManager": "[email protected]"
}
15 changes: 15 additions & 0 deletions 15 ...snapshots/fixtures/create_monorepo_oxlint_extends/packages/starter-template/bin/index.mjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { mkdirSync, writeFileSync } from 'node:fs';
import path from 'node:path';

const directoryFlag = process.argv.indexOf('--directory');
const directory = directoryFlag === -1 ? 'app' : process.argv[directoryFlag + 1];
mkdirSync(directory, { recursive: true });

function write(filename, content) {
writeFileSync(path.join(directory, filename), content);
}

write('package.json', JSON.stringify({ name: path.basename(directory), type: 'module' }));
write('vite.config.mjs', 'export default {};\n');
write('.oxlintrc.json', JSON.stringify({ extends: ['../../shared/lint.json'] }));
write('index.js', 'debugger;\n');
7 changes: 7 additions & 0 deletions 7 ..._snapshots/fixtures/create_monorepo_oxlint_extends/packages/starter-template/package.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "starter-template",
"version": "0.0.0",
"private": true,
"type": "module",
"bin": "./bin/index.mjs"
}
2 changes: 2 additions & 0 deletions 2 ...snapshots/tests/cli_snapshots/fixtures/create_monorepo_oxlint_extends/pnpm-workspace.yaml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
- packages/*
4 changes: 4 additions & 0 deletions 4 ...li_snapshots/tests/cli_snapshots/fixtures/create_monorepo_oxlint_extends/shared/lint.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"rules": { "no-debugger": "error" },
"options": { "typeAware": false, "typeCheck": false }
}
17 changes: 17 additions & 0 deletions 17 ..._cli_snapshots/tests/cli_snapshots/fixtures/create_monorepo_oxlint_extends/snapshots.toml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[case]]
name = "create_monorepo_oxlint_extends"
vp = "local"
local-registry = true
unset-env = ["VP_SKIP_INSTALL"]
steps = [
{ argv = ["node", "packages/starter-template/bin/index.mjs", "--directory", "packages/before"], snapshot = false },
{ argv = ["vp", "lint", "--threads=1", "-c", ".oxlintrc.json", "index.js"], cwd = "packages/before", comment = "Original template rules inherit from the workspace", continue-on-failure = true },
{ argv = ["vpt", "rm", "-r", "packages/before"], snapshot = false },
{ argv = ["vp", "create", "starter", "--no-interactive", "--no-agent", "--no-editor", "--no-hooks", "--", "--directory", "app"] },
{ argv = ["vpt", "print-file", "packages/app/vite.config.mjs"] },
{ argv = ["vpt", "print-file", "shared/lint.ts"] },
{ argv = ["vpt", "stat-file", "packages/app/.oxlintrc.json", "--assert", "missing"] },
{ argv = ["vp", "lint", "--threads=1", "index.js"], cwd = "packages/app", comment = "The created package keeps the original diagnostic without a config flag", continue-on-failure = true },
{ argv = ["vpt", "replace-file-content", "shared/lint.ts", '"error"', '"warn"'] },
{ argv = ["vp", "lint", "--threads=1", "index.js"], cwd = "packages/app", comment = "The created package follows shared module edits" },
]
123 changes: 123 additions & 0 deletions 123 ...ures/create_monorepo_oxlint_extends/snapshots/create_monorepo_oxlint_extends.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# create_monorepo_oxlint_extends

## `node packages/starter-template/bin/index.mjs --directory packages/before`


## `cd packages/before && vp lint --threads=1 -c .oxlintrc.json index.js`

Original template rules inherit from the workspace

**Exit code:** 1

```

× eslint(no-debugger): `debugger` statement is not allowed
╭─[index.js:1:1]
1 │ debugger;
· ─────────
╰────
help: Remove the debugger statement

Found 0 warnings and 1 error.
Finished in <duration> on 1 file with <n> rules using <n> threads.
```

## `vpt rm -r packages/before`


## `vp create starter --no-interactive --no-agent --no-editor --no-hooks -- --directory app`

```
◇ Generating project…
● Running: node <workspace>/packages/starter-template/bin/index.mjs --directory app
◇ Monorepo integration...
◆ ✔ Merged packages/app/.oxlintrc.json into packages/app/vite.config.mjs
● Installing dependencies...
● Dependencies installed
● Formatting code...
● Code formatted
◇ Scaffolded packages/app
• Node <version> pnpm <version>
✓ Dependencies installed in <duration>
→ Next: cd packages/app && vp run
```

## `vpt print-file packages/app/vite.config.mjs`

```
import oxlintConfig1 from "../../shared/lint.js";
export default {
lint: {
extends: [oxlintConfig1],
options: {},
jsPlugins: [{ name: "vite-plus", specifier: "vite-plus/oxlint-plugin" }],
rules: {
"vite-plus/prefer-vite-plus-imports": "error",
},
},
};
```

## `vpt print-file shared/lint.ts`

```
// Generated by vp migrate from lint.json.
import type { OxlintConfig } from "vite-plus/lint";

export default {
"rules": {
"no-debugger": "error"
},
"options": {
"typeAware": false,
"typeCheck": false
}
} satisfies OxlintConfig;
```

## `vpt stat-file packages/app/.oxlintrc.json --assert missing`

```
packages/app/.oxlintrc.json: missing
```

## `cd packages/app && vp lint --threads=1 index.js`

The created package keeps the original diagnostic without a config flag

**Exit code:** 1

```

× eslint(no-debugger): `debugger` statement is not allowed
╭─[index.js:1:1]
1 │ debugger;
· ─────────
╰────
help: Remove the debugger statement

Found 0 warnings and 1 error.
Finished in <duration> on 1 file with <n> rules using <n> threads.
```

## `vpt replace-file-content shared/lint.ts '"error"' '"warn"'`

```
```

## `cd packages/app && vp lint --threads=1 index.js`

The created package follows shared module edits

```

⚠ eslint(no-debugger): `debugger` statement is not allowed
╭─[index.js:1:1]
1 │ debugger;
· ─────────
╰────
help: Remove the debugger statement

Found 1 warning and 0 errors.
Finished in <duration> on 1 file with <n> rules using <n> threads.
```
11 changes: 11 additions & 0 deletions 11 ...cli_snapshots/tests/cli_snapshots/fixtures/create_monorepo_oxlint_extends/vite.config.mjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
create: {
templates: [
{
name: 'starter',
description: 'A package that inherits workspace lint rules.',
template: './packages/starter-template',
},
],
},
};
1 change: 1 addition & 0 deletions 1 ...i_snapshots/fixtures/migration_monorepo_bun/snapshots/migration_monorepo_bun.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ VITE+ - The Unified Toolchain for the Web
check vite.config.ts

```
// vp migrate: merged .oxlintrc.json (aba19784a1d2c46ab69279abb5cab90f).
import react from '@vitejs/plugin-react';
import { defineConfig, lazyPlugins } from 'vite-plus';

Expand Down
2 changes: 2 additions & 0 deletions 2 ...snapshots/fixtures/migration_monorepo_pnpm/snapshots/migration_monorepo_pnpm.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ VITE+ - The Unified Toolchain for the Web
check vite.config.ts

```
// vp migrate: merged .oxlintrc.json (aba19784a1d2c46ab69279abb5cab90f).
import react from '@vitejs/plugin-react';
import { defineConfig, lazyPlugins } from 'vite-plus';

Expand Down Expand Up @@ -225,6 +226,7 @@ check only-oxlint package.json
check only-oxlint vite.config.ts

```
// vp migrate: merged packages%2Fonly-oxlint%2F.oxlintrc.json (b648b436b7a8c2627c4008844cff0e45).
import { defineConfig } from 'vite-plus';

export default defineConfig({
Expand Down
1 change: 1 addition & 0 deletions 1 ...apshots/fixtures/migration_monorepo_yarn4/snapshots/migration_monorepo_yarn4.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ VITE+ - The Unified Toolchain for the Web
check vite.config.ts

```
// vp migrate: merged .oxlintrc.json (aba19784a1d2c46ab69279abb5cab90f).
import react from '@vitejs/plugin-react';
import { defineConfig, lazyPlugins } from 'vite-plus';

Expand Down
1 change: 1 addition & 0 deletions 1 crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/.gitignore
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
14 changes: 14 additions & 0 deletions 14 crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/.oxlintrc.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": [
"./shared/nested/first.json",
"./shared/second.jsonc"
],
"rules": {
"no-alert": "off",
"local/no-foo": "error"
},
"ignorePatterns": [
"shared/**",
"vite.config.ts"
]
}
3 changes: 3 additions & 0 deletions 3 ...snapshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/create-directory-link.mjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { symlinkSync } from 'node:fs';

symlinkSync('./configs/nested', 'aliases', process.platform === 'win32' ? 'junction' : 'dir');
2 changes: 2 additions & 0 deletions 2 ...es/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/example.test.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
debugger;
export const bar = 1;
5 changes: 5 additions & 0 deletions 5 crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/index.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
debugger;
console.log("test");
alert("allowed");
export const foo = 1;
export const bar = 1;
10 changes: 10 additions & 0 deletions 10 crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/package.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "migration-oxlint-extends",
"private": true,
"type": "module",
"devDependencies": {
"oxlint": "1.88.0",
"typescript": "6.0.3",
"@types/node": "24.10.3"
}
}
11 changes: 11 additions & 0 deletions 11 ...s/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/shared/base.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"options": {
"typeAware": false,
"typeCheck": false
},
"rules": {
"no-debugger": "error",
"no-console": "error",
"no-alert": "error"
}
}
22 changes: 22 additions & 0 deletions 22 ..._snapshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/shared/nested/first.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": [
"../base.json"
],
"overrides": [
{
"files": [
"**/*.test.js"
],
"rules": {
"no-debugger": "warn",
"override/no-bar": "error"
},
"jsPlugins": [
{
"name": "override",
"specifier": "../override-plugin.mjs"
}
]
}
]
}
17 changes: 17 additions & 0 deletions 17 ...napshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/shared/override-plugin.mjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default {
meta: { name: 'override' },
rules: {
'no-bar': {
meta: { schema: [] },
create(context) {
return {
Identifier(node) {
if (node.name === 'bar') {
context.report({ node, message: 'Do not use bar.' });
}
},
};
},
},
},
};
17 changes: 17 additions & 0 deletions 17 .../vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/shared/plugin.mjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default {
meta: { name: 'local' },
rules: {
'no-foo': {
meta: { schema: [] },
create(context) {
return {
Identifier(node) {
if (node.name === 'foo') {
context.report({ node, message: 'Do not use foo.' });
}
},
};
},
},
},
};
5 changes: 5 additions & 0 deletions 5 ...p_cli_snapshots/tests/cli_snapshots/fixtures/migration_oxlint_extends/shared/second.jsonc
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
// Later entries take priority.
"rules": { "no-console": "warn" },
"jsPlugins": ["./plugin.mjs"]
}
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Loading
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.