Build: ESLint: forbid unused function parameters

This commit 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.

Unused AMD dependencies have been removed as part of this commit.

Closes gh-4381
This commit is contained in:
Michał Gołębiowski-Owczarek
2019-05-13 22:25:11 +02:00
committed by GitHub
parent 9ec09c3b4a
commit 438b1a3e8a
19 changed files with 27 additions and 37 deletions

3
dist/.eslintrc.json vendored
View File

@@ -7,9 +7,10 @@
// That is okay for the built version
"no-multiple-empty-lines": "off",
// Because sizzle is not compatible to jquery code style
// Sizzle is not compatible with jQuery code style
"no-nested-ternary": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"lines-around-comment": "off",
"space-in-parens": "off",
"camelcase": "off",