Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linter: Using --fix changes the output #8115

Open
craigmiller160 opened this issue Dec 25, 2024 · 0 comments
Open

linter: Using --fix changes the output #8115

craigmiller160 opened this issue Dec 25, 2024 · 0 comments
Labels
A-linter Area - Linter C-bug Category - Bug

Comments

@craigmiller160
Copy link

What version of Oxlint are you using?

0.15.3

What command did you run?

oxlint --max-warnings=0 AND oxlint --max-warnings=0 --fix

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

I don't have one.

What happened?

I'm brand new to oxlint, testing it for the first time. I added it to an existing project and I ran it using the commands I specified above. What I'm seeing is that if I use --fix, one of the warnings just disappears from the output but no code is changed. ie, the problem is ignored entirely.

The specific issue that disappears is this:

  ⚠ eslint-plugin-unicorn(no-useless-spread): Using a spread operator here creates a new array unnecessarily.
    ╭─[test/msw-server/index.ts:26:5]
 25 │ const server: SetupServer = setupServer(
 26 │     ...[
    ·     ───
 27 │         ...importHandlers,
    ╰────
  help: This function accepts a rest parameter, it's unnecessary to create a new array and then spread it. Instead, supply the arguments directly.
        For example, replace `foo(...[1, 2, 3])` with `foo(1, 2, 3)`.

Again, that will appear when running oxlint --max-warnings=0 but not when running oxlint --max-warnings=0 --fix, but the file in question is not modified when using --fix.

Thanks in advance.

@craigmiller160 craigmiller160 added A-linter Area - Linter C-bug Category - Bug labels Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-bug Category - Bug
Projects
None yet
Development

No branches or pull requests

1 participant