Skip to content

Enable no-unused-vars #14

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

Merged
merged 1 commit into from
May 13, 2019
Merged

Enable no-unused-vars #14

merged 1 commit into from
May 13, 2019

Conversation

mgol
Copy link
Member

@mgol mgol commented May 12, 2019

Please review @jquery/core @Krinkle @trentmwillis @leobalter

This rule requires all function parameters to be used, not just the last one.
In cases where that's not possible as we need to match an external API, there's
an escape hatch of prefixing an unused argument with _.

This change makes it easier to catch unused AMD dependencies and unused
parameters in internal functions the API of which we may change at will, among
other things.

Ref jquery/jquery#4381

This rule requires all function parameters to be used, not just the last one.
In cases where that's not possible as we need to match an external API, there's
an escape hatch of prefixing an unused argument with _.

This change makes it easier to catch unused AMD dependencies and unused
parameters in internal functions the API of which we may change at will, among
other things.

Ref jquery/jquery#4381
@mgol
Copy link
Member Author

mgol commented May 12, 2019

I can update the jQuery copy under which the test is performed once jquery/jquery#4381 lands. Currently, tests still don't fail as there's a global /*eslint-disable no-unused-vars*/ at the top which was only removed in later jQuery versions.

@mgol mgol merged commit 4f4e9cd into jquery:master May 13, 2019
@mgol mgol deleted the no-unused-vars branch May 13, 2019 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants