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 typescript alias rules with its native eslint rule, deactives both #7009

Closed
Sysix opened this issue Oct 29, 2024 · 0 comments · Fixed by #7014
Closed

linter: using typescript alias rules with its native eslint rule, deactives both #7009

Sysix opened this issue Oct 29, 2024 · 0 comments · Fixed by #7014
Assignees
Labels
A-linter Area - Linter C-bug Category - Bug

Comments

@Sysix
Copy link
Contributor

Sysix commented Oct 29, 2024

What version of Oxlint are you using?

0.10.3

What command did you run?

oxlint -c .oxlint.json

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

{
  "categories": {
    "correctness": "off"
  },
  "rules": {
    "no-magic-numbers": "warn",
    "@typescript-eslint/no-magic-numbers": "warn"
  }
}

and


{
  "categories": {
    "correctness": "off"
  },
  "rules": {
    "no-magic-numbers": "warn"
  }
}

What happened?

First config output:

Finished in 19ms on 21 files with 0 rules using 24 threads.
Found 0 warnings and 0 errors.

Second config output:


Finished in 15ms on 21 files with 1 rules using 24 threads.
Found 53 warnings and 0 errors.
@Sysix Sysix added A-linter Area - Linter C-bug Category - Bug labels Oct 29, 2024
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Oct 30, 2024
@camchenry camchenry removed the 0-merge Merge with Graphite Merge Queue label Oct 30, 2024
@camchenry camchenry self-assigned this Oct 30, 2024
Boshen pushed a commit that referenced this issue Oct 30, 2024
fixes #7009

allows rules to be replaced properly when the `rules_for_override` array is empty (e.g., if you initially disable all rules, then configure them) by checking the `all_rules` array if the first `find` call fails
@Boshen Boshen closed this as completed Oct 30, 2024
Boshen pushed a commit that referenced this issue Nov 1, 2024
- closes #6988

we now return an error exit code when there are unmatched rules. previously, we would print an error to stderr and continue running. however, this masked errors in some tests that actually had unmatched rules in them. these test cases now trigger a panic (in tests only, not at runtime), and help ensure that we are reporting an error message to the user for unknown rules, which we did not have any tests cases for before.

- fixes #7025

this also fixes #7025, where we were reporting rules as unmatched simply because they had been disabled prior to being configured. similar to #7009.
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

Successfully merging a pull request may close this issue.

4 participants