oxc icon indicating copy to clipboard operation
oxc copied to clipboard

VSCode extension: default `oxc_language_server.configPath` seems wrong

Open greeeg opened this issue 1 year ago • 3 comments

Hi 👋

While trying to move part of my linting config from eslint to oxlint, I did not understand why removing the no-console rule from .eslintrc & adding it to .oxlintrc.json did not trigger an error in my VSCode editor while it was triggering it properly running the oxlint CLI.

After a short investigating, I discovered that the default config path used by the OXC VSCode language server was .eslintrc.

It means that the oxlint language server was using my legacy eslint config instead of the new appropriate one. Should we change the default config path to be the filename documented here or at least explain that the configuration file used can be changed using VSCode settings.json file? Many thanks!

greeeg avatar Sep 16 '24 13:09 greeeg

@DonIsaac I can change default value to .oxlintrc.json, because documentation tells about .oxlintrc.json not about .eslintrc.

Looks like good first issue for me)

How do you think about it?

pumano avatar Oct 09 '24 06:10 pumano

No-work-required eslint migration is a large goal for us. I'm down with checking for an .oxlintrc.json file and falling back to .eslintrc.

As a note: a lot of our users use oxlint.json as their config file name.

DonIsaac avatar Oct 09 '24 22:10 DonIsaac

@DonIsaac OK would be good to have checking for .oxlintrc.json too. So I close my pull request

pumano avatar Oct 10 '24 07:10 pumano

https://github.com/oxc-project/oxc/pull/7442

Boshen avatar Nov 25 '24 05:11 Boshen