From b958745b01d720e487154d5094c480b04b169024 Mon Sep 17 00:00:00 2001 From: Tristan Hessell Date: Sun, 5 Sep 2021 22:25:09 +1000 Subject: [PATCH] `prefer-spread`: Mention `prefer-object-spread` rule in docs (#1504) Co-authored-by: Sindre Sorhus --- docs/rules/prefer-spread.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/rules/prefer-spread.md b/docs/rules/prefer-spread.md index f4cd059619..fffca42cbd 100644 --- a/docs/rules/prefer-spread.md +++ b/docs/rules/prefer-spread.md @@ -24,6 +24,8 @@ Enforces the use of [the spread operator (`...`)](https://developer.mozilla.org/ Note: [The suggestion fix may get different result](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402). +To enforce the spread operator over `Object#assign()`, use the built-in [`prefer-object-spread` rule](https://eslint.org/docs/rules/prefer-object-spread). + This rule is partly fixable. ## Fail