oxc-project / oxc

⚓ A collection of JavaScript tools written in Rust.
https://oxc.rs
MIT License
12.11k stars 438 forks source link

Oxlint is marked with the error color in `WSL` as the color of Warn #6489

Open mozhuanzuojing opened 2 weeks ago

mozhuanzuojing commented 2 weeks ago

image

This problem has been around for a long time

WSL2 env:

Version: 1.94.2 (system setup) Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427 Date: 2024-10-09T16:08:44.566Z Electron: 30.5.1 ElectronBuildId: 10262041 Chromium: 124.0.6367.243 Node.js: 20.16.0 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.19045

pumano commented 2 weeks ago

@mozhuanzuojing Looks like eslint config not applied, because default oxlint is warn

mozhuanzuojing commented 2 weeks ago

@mozhuanzuojing Looks like eslint config not applied, because default oxlint is warn

That being said, oxlint doesn't read the config file .eslintrc correctly under WSL

DonIsaac commented 2 weeks ago

It looks like your .eslintrc is not in your root directory. You should either move it to your project's root, or configure the extension to look for a config file at page/.eslintrc.

mozhuanzuojing commented 2 weeks ago

.eslintrc

image

mozhuanzuojing commented 2 weeks ago

It looks like your .eslintrc is not in your root directory. You should either move it to your project's root, or configure the extension to look for a config file at page/.eslintrc.

I see, the oxlint plugin doesn't support .eslintrc of front-end projects in vscode workspace

DonIsaac commented 2 weeks ago

It does, just not by default. Again, you'll need to edit the extension settings.

mozhuanzuojing commented 2 weeks ago

It does, just not by default. Again, you'll need to edit the extension settings.

image

Even if you configure "page/.eslintrc", it does not take effect.

DonIsaac commented 2 weeks ago

Hmmm ok, I'll take a look in to that

IWANABETHATGUY commented 1 week ago

Can you run oxlint and send the result?

mozhuanzuojing commented 1 week ago

Can you run oxlint and send the result?

image

IWANABETHATGUY commented 1 week ago

Yeah, you could see they are all warnings, also language server just uses page/.eslintrc as configuration file

mozhuanzuojing commented 1 week ago

Yeah, you could see they are all warnings, also language server just uses page/.eslintrc as configuration file

image

if page/.eslintrc effect , it output red color.

IWANABETHATGUY commented 1 week ago

Looks like related to workspace

pumano commented 1 week ago

reproduced that too, can't wait 0.10.0 release for test it against release

upd: still reproduced

pumano commented 5 days ago

0.10.2 - fixed and works correctly

Screenshot 2024-10-23 at 00 51 23

@DonIsaac cc

mozhuanzuojing commented 5 days ago

Version 0.10.2 has a small problem image

mozhuanzuojing commented 5 days ago

0.10.2 - fixed and works correctly Screenshot 2024-10-23 at 00 51 23

@DonIsaac cc

no, still not in effect

image