-
Notifications
You must be signed in to change notification settings - Fork 26.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add no-unused-vars to README #1828
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
README.md
Outdated
z = z + 1; | ||
|
||
// Unused function arguments. | ||
function getY(x, y) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this case, x
won't be reported because y
is used. if you return x
, however, then y
would be reported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I did not know that. Will fix.
|
||
alert(getXPlusY(x, y)); | ||
|
||
// 'type' is ignored even if unused because it has a rest property sibling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's elaborate on why: this is a form of extracting an object that omits specific keys.
This documents the enforced but currently undocumented `no-unused-vars` rule with a brief description, examples, and noting the `"ignoreRestSiblings": true` option.
Thanks, I amended the commit with your feedback. |
This documents the enforced but currently undocumented
no-unused-vars
rule with a brief description, examples, and noting the"ignoreRestSiblings": true
option.