Skip to content

linter: vscode doesn't re-lint on change/save on Windows in unknown circumstances #18514

@dwelle

Description

@dwelle

What version of Oxlint are you using?

vscode: 1.41.0
local: 1.41.0

What command did you run?

vscode

What does your .oxlintrc.json config file look like?

I don't believe it's related, but you can see it here https://github.com/excalidraw/excalidraw/blob/29ba7fe96d26127a51876e64cafa5b90432c365b/.oxlintrc.json (PR: excalidraw/excalidraw#10697)

What happened?

In our Excalidraw project on Windows 10 (MacOS seems to work fine), re-linting doesn't happen on file change (after typing) or file save. Meaning, vscode's oxlint server doesn't highlight the change.

It's happening only in certain files (albeit, it seems to be happening in all currently git-tracked files) and I couldn't figure out the pattern.

In the recording, you can see that I'm reproducing the issue in the ./setupTests.ts which isn't imported anywhere (I even removed from vitest config as the setupFiles), but is not reproducing in a new file ./test.ts which is for all intents and purposes identical (especially after I truncate the setupFiles.ts to make sure). I've also committed the test.ts file to make sure it's not git related. I assume it's a cache thing.

In test.ts, once oxlint is restarted to register the file (not sure if that requirement is intentional), (un)commenting the variable correctly triggers the re-lint. In setupFiles.ts it does not.

Code_k80xaButDs.mp4

EDIT:

From verbose output, it seems that the change is being detected in both cases, but textDocument/diagnostic request is not being sent for setupTests.ts for some reason.

This output is when both files were already committed to git, and vscode reloaded. prettier and eslint extensions disabled for the workspace.

test.ts (working fine):

2026-01-25 14:46:10.730 [info] [Trace - 2:46:10 PM] Sending notification 'textDocument/didChange'.
2026-01-25 14:46:10.730 [info] Params: {
    "textDocument": {
        "uri": "file:///c%3A/dev/repos/worktree-formatter/test.ts",
        "version": 6
    },
    "contentChanges": [
        {
            "text": "export const x = (a: number) => {\n  // console.log(a);\n};\n"
        }
    ]
}


2026-01-25 14:46:10.730 [info] [Trace - 2:46:10 PM] Sending request 'textDocument/diagnostic - (8)'.
2026-01-25 14:46:10.730 [info] Params: {
    "textDocument": {
        "uri": "file:///c%3A/dev/repos/worktree-formatter/test.ts"
    }
}


2026-01-25 14:46:10.731 [info] [Trace - 2:46:10 PM] Received response 'textDocument/diagnostic - (8)' in 1ms.
2026-01-25 14:46:10.731 [info] Result: {
    "kind": "full",
    "items": [
        {
            "range": {
                "start": {
                    "line": 0,
                    "character": 18
                },
                "end": {
                    "line": 0,
                    "character": 19
                }
            },
            "severity": 2,
            "code": "eslint(no-unused-vars)",
            "codeDescription": {
                "href": "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html"
            },
            "source": "oxc",
            "message": "Parameter 'a' is declared but never used.\nhelp: Consider removing this parameter.",
            "relatedInformation": [
                {
                    "location": {
                        "uri": "file:///c%3A/dev/repos/worktree-formatter/test.ts",
                        "range": {
                            "start": {
                                "line": 0,
                                "character": 18
                            },
                            "end": {
                                "line": 0,
                                "character": 19
                            }
                        }
                    },
                    "message": "'a' is declared here"
                }
            ]
        }
    ]
}

setupTests.ts (not working properly):

2026-01-25 15:02:46.949 [info] [Trace - 3:02:46 PM] Sending notification 'textDocument/didChange'.
2026-01-25 15:02:46.949 [info] Params: {
    "textDocument": {
        "uri": "file:///c%3A/dev/repos/worktree-formatter/setupTests.ts",
        "version": 6
    },
    "contentChanges": [
        {
            "text": "export const x = (a: number) => {\n  // console.log(a);\n};\n"
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-editorArea - Editor and Language Server

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions