You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, you don't really need to name the extension .jsonc for comments to work.
Yup that's right.
In my use case, I'm using VSCode.
The built in JSON LSP complains if the .json file contains comment:
To tell the LSP it should treat the JSON file as JSONC, I only know 2 ways:
Use .jsonc extension
Manually change the language mode for the file to JSONC instead of JSON
Since I'm not the only person working in the git repo, I prefer if the JSONC treatment is committed to the repo so others can use it without additional config.
After digging into VSCode config, turns out there is a setting for this!
I can tell VSCode to treat .oxlintrc.json as JSONC and commit it to the repo.
{// in .vscode/settings.json"files.associations": {".oxlintrc.json": "jsonc"},}
Sorry for the noises. We can close this instead of adding more magic behavior to oxlint config loading.
Oxlint already load
.oxlintrc.json
from current directory automatically.This PR #2121 added
.jsonc
extension support for config file.Current version (
Version: 0.15.7
) does not look for.oxlintrc.jsonc
.Since oxlint already support
.jsonc
extension, loading.oxlintrc.jsonc
automatically would be nice to have.For now
oxlint -c .oxlintrc.jsonc
works just fine.The text was updated successfully, but these errors were encountered: