Skip to content

Commit

Permalink
feat(linter): add eslint/prefer-spread (#7112)
Browse files Browse the repository at this point in the history
In this PR, 
- move existing `unicorn:prefer-spread` to `eslint:prefer-spread`.
- combine 2 rules from `eslint:prefer-spread` and
`unicorn:prefer-spread`

([This is already talked in
discord](https://discord.com/channels/1079625926024900739/1080712072012238858/1299981398064496652))

---------

Co-authored-by: Cameron Clark <[email protected]>
  • Loading branch information
tbashiyy and camc314 authored Nov 26, 2024
1 parent cd7f62b commit 8d89fdc
Show file tree
Hide file tree
Showing 3 changed files with 490 additions and 210 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_linter/src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ mod eslint {
pub mod prefer_exponentiation_operator;
pub mod prefer_numeric_literals;
pub mod prefer_object_has_own;
pub mod prefer_spread;
pub mod radix;
pub mod require_await;
pub mod require_yield;
Expand Down Expand Up @@ -364,7 +365,6 @@ mod unicorn {
pub mod prefer_regexp_test;
pub mod prefer_set_has;
pub mod prefer_set_size;
pub mod prefer_spread;
pub mod prefer_string_raw;
pub mod prefer_string_replace_all;
pub mod prefer_string_slice;
Expand Down Expand Up @@ -624,6 +624,7 @@ oxc_macros::declare_all_lint_rules! {
eslint::prefer_exponentiation_operator,
eslint::prefer_numeric_literals,
eslint::prefer_object_has_own,
eslint::prefer_spread,
eslint::radix,
eslint::require_await,
eslint::require_yield,
Expand Down Expand Up @@ -959,7 +960,6 @@ oxc_macros::declare_all_lint_rules! {
unicorn::prefer_regexp_test,
unicorn::prefer_set_has,
unicorn::prefer_set_size,
unicorn::prefer_spread,
unicorn::prefer_string_raw,
unicorn::prefer_string_replace_all,
unicorn::prefer_string_slice,
Expand Down
Loading

0 comments on commit 8d89fdc

Please sign in to comment.