Skip to content

Commit 4f4e9cd

Browse files
authored
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. Closes #14 Ref jquery/jquery#4381
1 parent 522a1c7 commit 4f4e9cd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.eslintrc.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@
3939
"double"
4040
],
4141
"no-undef": "error",
42-
"no-unused-vars": "error",
42+
"no-unused-vars": [
43+
"error",
44+
{
45+
"args": "all",
46+
"argsIgnorePattern": "^_"
47+
}
48+
],
4349
"operator-linebreak": [
4450
"error",
4551
"after"

0 commit comments

Comments
 (0)