Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow _ to be an unused variable #800
Comments
feross
added
the
enhancement
label
Feb 23, 2017
This comment has been minimized.
This comment has been minimized.
"no-unused-vars": [2, { "vars": "all", "args": "all", "argsIgnorePattern": "^_$" }],Is what I am using, but it doesn't cover this case... edit: "varsIgnorePattern": "^_$"Does not work for this case either, fwiw. |
This comment has been minimized.
This comment has been minimized.
|
@feross /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
// 'type' is ignored because it has a rest property sibling.
var { type, ...coords } = data; |
This comment has been minimized.
This comment has been minimized.
|
@dcousens Oh, nice. Let's use |
feross
added this to the
standard v10 milestone
Feb 28, 2017
This comment has been minimized.
This comment has been minimized.
|
No ecosystem impact. This will be included in the standard v10 beta. |
feross
closed this
Mar 1, 2017
feross
added a commit
to standard/eslint-config-standard
that referenced
this issue
Mar 2, 2017
This comment has been minimized.
This comment has been minimized.
tdd
commented
Mar 3, 2017
|
ZOMG this is SO going to make my day |
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
feross commentedFeb 23, 2017
•
edited
In React, it's common to do:
This assigns all the properties of
propsexceptwidthandheightto the<div>.Currently
standardwarns aboutwidthandheightbeing unused. Would be nice if we could assign these variables to_and_2to mark them as unused (since we can't assign them both to_in one assignment).@dcousens Didn't you say that you have a rule modification that you use for this purpose? Can you share it?