Hi Nigel,

Have you tried the ignoreRestSiblings option
(https://eslint.org/docs/rules/no-unused-vars#ignorerestsiblings)? If this
doesn’t work, you might need to update to a newer version of ESLint.

Hope that helps!

Kai

On Sun, Feb 2, 2020 at 4:39 PM Nigel Gilbert <[email protected]>
wrote:

> ESLint complains that clientID and color are defined but never used in the
> following code:
>
> function clean(items) {
>  // return a copy of an array of objects, with two properties, clientID
> and color, removed
>  return items.map(({ clientID, color, ...keepAttrs }) => keepAttrs)
> }
>
> The code is, I believe, correct and the two symbols are necessary for it
> to work.  How can I stop ESLint complaining?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ESLint" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/eslint/ad7c75cb-73c2-44d3-8e65-41ccbb73ea07%40googlegroups.com
> <https://groups.google.com/d/msgid/eslint/ad7c75cb-73c2-44d3-8e65-41ccbb73ea07%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
-- 
Kai Cataldo
Independent Software Developer & maintainer of ESLint <https://eslint.org/>
and Babel <https://babeljs.io/>
kaicataldo.com

-- 
You received this message because you are subscribed to the Google Groups 
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/eslint/CAKfCaPhmMj_Gr6qah91UT_heG0Md4zWFFko1ow4yKoeYGpfepw%40mail.gmail.com.

Reply via email to