Skip to content
Merged
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

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/node_modules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "create-oxlint-workspace",
"private": true,
"type": "module",
"packageManager": "pnpm@10.0.0"
}
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');
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"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
- packages/*
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"rules": { "no-debugger": "error" },
"options": { "typeAware": false, "typeCheck": false }
}
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" },
]
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.
```
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',
},
],
},
};
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
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
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
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"
]
}
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');
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
debugger;
export const bar = 1;
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;
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"
}
}
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"
}
}
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"
}
]
}
]
}
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.' });
}
},
};
},
},
},
};
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.' });
}
},
};
},
},
},
};
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
Loading