Skip to content

In oxlint/migrate output a $schema accepted by VS Code #401

Open
@crystalfp

Description

@crystalfp

I have oxlint installed globally. Running npx @oxlint/migrate .\eslint.config.mjs generates a .oxlintrc.json file that elicit warnings when edited by VS Code.

There are two problems:

  1. Always the $schema line refers to "./node_modules/oxlint/configuration_schema.json" the local installation.
  2. After changing the line to refer to the global installation, VS Code complains that there is no file: protocol. So I modified the line to: "$schema": "file:///C:/Users/myself/AppData/Roaming/npm/node_modules/oxlint/configuration_schema.json" and now everything works perfectly.

Maybe changing the logic in the code is too much work, but at least a line in the documentation page could help. Something along the lines of:
"If oxlint is installed globally, the $schema line should changed to "$schema": "file:///C:/Users/{username}/AppData/Roaming/npm/node_modules/oxlint/configuration_schema.json""
Thanks!
mario

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions