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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Enable no-unused-vars
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
  • Loading branch information
mgol committed May 12, 2019
commit f96c719031063f0cdf6b30ff8a42e836f1d2d1bc
8 changes: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@
"double"
],
"no-undef": "error",
"no-unused-vars": "error",
"no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_"
}
],
"operator-linebreak": [
"error",
"after"
Expand Down