2026-04-05 14:42:48.027 [info] [Error - 14:42:48] Server process exited with code 0.
2026-04-05 14:42:48.028 [info] [Trace - 14:42:48] Received request 'client/registerCapability - (0)'.
2026-04-05 14:42:48.028 [info] Params: {
"registrations": [
{
"id": "watcher-formatter-file:///Users/arsnl/Developer/oxlint-repro-file-level-disable",
"method": "workspace/didChangeWatchedFiles",
"registerOptions": {
"watchers": [
{
"globPattern": {
"baseUri": "file:///Users/arsnl/Developer/oxlint-repro-file-level-disable",
"pattern": ".oxfmtrc.json"
},
"kind": 7
},
{
"globPattern": {
"baseUri": "file:///Users/arsnl/Developer/oxlint-repro-file-level-disable",
"pattern": ".oxfmtrc.jsonc"
},
"kind": 7
},
{
"globPattern": {
"baseUri": "file:///Users/arsnl/Developer/oxlint-repro-file-level-disable",
"pattern": "oxfmt.config.ts"
},
"kind": 7
},
{
"globPattern": {
"baseUri": "file:///Users/arsnl/Developer/oxlint-repro-file-level-disable",
"pattern": "vite.config.ts"
},
"kind": 7
},
{
"globPattern": {
"baseUri": "file:///Users/arsnl/Developer/oxlint-repro-file-level-disable",
"pattern": ".editorconfig"
},
"kind": 7
}
]
}
}
]
}
2026-04-05 14:42:48.028 [info] [Trace - 14:42:48] Sending response 'client/registerCapability - (0)'. Processing request took 0ms
2026-04-05 14:42:48.028 [info] No result returned.
2026-04-05 14:43:18.904 [info] [Trace - 14:43:18] Sending notification 'textDocument/didChange'.
2026-04-05 14:43:18.904 [info] Params: {
"textDocument": {
"uri": "file:///Users/arsnl/Developer/oxlint-repro-file-level-disable/test.ts",
"version": 3
},
"contentChanges": [
{
"text": "/**/\n\n//\nvar x = \"y\";"
}
]
}
Confirm that this is a Bug for the editor extension, not the CLI
Versions used
What happened?
When Oxlint reports an unused disable directive (e.g. with
reportUnusedDisableDirectivesenabled in the Oxlint config), the CLI does not offer an auto-fix for that diagnostic. The VS Code extension does apply a fix (e.g. via Fix all /source.fixAll.oxcon save), but the fix is wrong: it strips the directive text and leaves an empty comment on the line (//or/**/) instead of removing the whole line, which matches what users expect from ESLint-style tooling and leaves noisy, useless lines in the file.Steps to reproduce
npm install..vscode/settings.json, set"source.fixAll.oxc"to"always"undereditor.codeActionsOnSave(or use Fix all from the lightbulb on an unused-disable diagnostic).test.ts(or trigger fix all).Actual behavior: Lines that contained only the disable comment become
//or/**/with nothing after it.Expected behavior: The entire line should be removed when nothing meaningful remains (same idea as removing a full
eslint-disableline), not replaced with an empty comment token.(Related upstream context: in that repro, file-level
oxlint-disablefor a file-scope rule may still leave the real rule violation plus an “unused directive” warning—that’s separate Oxlint engine behavior; this ticket is specifically about the editor fix leaving empty comments.)Reproduction repo
https://github.com/arsnl/oxlint-repro-file-level-disable
Minimal workspace:
test.ts,oxlint.config.ts(reportUnusedDisableDirectives: "warn"), and.vscode/recommendations foroxc.oxc-vscode. See the “Reproduction (VS Code extension)” section in the repoREADME.md.Output channel log
Click to expand