Skip to content

Commit 79ab8cc

Browse files
jordan-boyerBoshencamc314
authored
feat(lint-unicorn): add rule prefer set has (#7075)
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 <boshenc@gmail.com> Co-authored-by: Cameron Clark <cameron.clark@hey.com>
1 parent a68a217 commit 79ab8cc

3 files changed

Lines changed: 1183 additions & 0 deletions

File tree

crates/oxc_linter/src/rules.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ mod unicorn {
361361
pub mod prefer_query_selector;
362362
pub mod prefer_reflect_apply;
363363
pub mod prefer_regexp_test;
364+
pub mod prefer_set_has;
364365
pub mod prefer_set_size;
365366
pub mod prefer_spread;
366367
pub mod prefer_string_raw;
@@ -954,6 +955,7 @@ oxc_macros::declare_all_lint_rules! {
954955
unicorn::prefer_query_selector,
955956
unicorn::prefer_reflect_apply,
956957
unicorn::prefer_regexp_test,
958+
unicorn::prefer_set_has,
957959
unicorn::prefer_set_size,
958960
unicorn::prefer_spread,
959961
unicorn::prefer_string_raw,

0 commit comments

Comments
 (0)