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

refactor(linter): add LintFilter #5329

Conversation

DonIsaac
Copy link
Contributor

Formalizes (AllowWarnDeny, String) into LintFilter and LintFilterKind.

Filters can be one of three variants:

  • category: for enabling/disabling an entire category. Corresponds to strings
    that are parseable into RuleCategory
  • rule: for enabling/disabling an single rule. This variant also stores the
    plugin name. Corresponds to the string <plugin>/<rule>
  • generic: everything else. "all" falls under this one.

Note that if users use <plugin>/<rule> filters that are malformed, oxlint
will now error. Missing plugins (e.g. for vue/foobar will have their plugins
parsed as "eslint" and fail silently. This is consistent with current behavior.

Copy link

codspeed-hq bot commented Aug 29, 2024

CodSpeed Performance Report

Merging #5329 will degrade performances by 4.72%

Comparing don/08-29-refactor_linter_add_lintfilter_ (a512edc) with don/08-23-refactor_linter_make_fields_of_lintserviceoptions_private (eb7c9b9)

Summary

❌ 1 regressions
✅ 28 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark don/08-23-refactor_linter_make_fields_of_lintserviceoptions_private don/08-29-refactor_linter_add_lintfilter_ Change
transformer[cal.com.tsx] 11.6 ms 12.1 ms -4.72%

@DonIsaac DonIsaac force-pushed the don/08-29-refactor_linter_add_lintfilter_ branch from 54b11b5 to 1c556df Compare August 29, 2024 21:12
@DonIsaac DonIsaac force-pushed the don/08-23-refactor_linter_make_fields_of_lintserviceoptions_private branch from c2f27a0 to eb7c9b9 Compare August 29, 2024 21:13
@DonIsaac DonIsaac force-pushed the don/08-29-refactor_linter_add_lintfilter_ branch from 1c556df to f4881bd Compare August 29, 2024 21:13
@DonIsaac DonIsaac force-pushed the don/08-29-refactor_linter_add_lintfilter_ branch from f4881bd to a512edc Compare August 30, 2024 00:45
DonIsaac added a commit that referenced this pull request Sep 10, 2024
DonIsaac added a commit that referenced this pull request Sep 11, 2024
DonIsaac added a commit that referenced this pull request Sep 11, 2024
DonIsaac added a commit that referenced this pull request Sep 11, 2024
Boshen pushed a commit that referenced this pull request Sep 11, 2024
@DonIsaac DonIsaac closed this Oct 7, 2024
@Boshen Boshen deleted the don/08-29-refactor_linter_add_lintfilter_ branch December 13, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area - CLI A-linter Area - Linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant