Skip to content

Commit

Permalink
feat(lint-unicorn): add rule prefer set has (#7075)
Browse files Browse the repository at this point in the history
implementing the rule [prefer set
has](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-has.md)
from unicorn.

I put the fix as dangerous fix because they was no test for the fix on
the unicorn part. I did add some test for this but i'm not sure that i'm
covering everything.

---------

Co-authored-by: Boshen <[email protected]>
Co-authored-by: Cameron Clark <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2024
1 parent a68a217 commit 79ab8cc
Show file tree
Hide file tree
Showing 3 changed files with 1,183 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/oxc_linter/src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ mod unicorn {
pub mod prefer_query_selector;
pub mod prefer_reflect_apply;
pub mod prefer_regexp_test;
pub mod prefer_set_has;
pub mod prefer_set_size;
pub mod prefer_spread;
pub mod prefer_string_raw;
Expand Down Expand Up @@ -954,6 +955,7 @@ oxc_macros::declare_all_lint_rules! {
unicorn::prefer_query_selector,
unicorn::prefer_reflect_apply,
unicorn::prefer_regexp_test,
unicorn::prefer_set_has,
unicorn::prefer_set_size,
unicorn::prefer_spread,
unicorn::prefer_string_raw,
Expand Down
Loading

0 comments on commit 79ab8cc

Please sign in to comment.