From ea8e8045ba0e6c1e1015104346af962f3e16fd81 Mon Sep 17 00:00:00 2001 From: Steven Thomas Date: Fri, 15 Feb 2019 14:36:13 -0500 Subject: [PATCH] Docs: Add note about support for object spread (fixes #11136) (#11395) --- docs/rules/prefer-object-spread.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/rules/prefer-object-spread.md b/docs/rules/prefer-object-spread.md index b50e39716b2..95a646068f8 100644 --- a/docs/rules/prefer-object-spread.md +++ b/docs/rules/prefer-object-spread.md @@ -2,7 +2,7 @@ When Object.assign is called using an object literal as the first argument, this rule requires using the object spread syntax instead. This rule also warns on cases where an `Object.assign` call is made using a single argument that is an object literal, in this case, the `Object.assign` call is not needed. -Object spread is a declarative alternative which may perform better than the more dynamic, imperative `Object.assign`. +Introduced in ES2018, object spread is a declarative alternative which may perform better than the more dynamic, imperative `Object.assign`. ## Rule Details @@ -46,4 +46,4 @@ Object.assign(foo, { ...baz }); ## When Not To Use It -When object spread is not available in your codebase. +This rule should not be used unless ES2018 is supported in your codebase.