From f96c719031063f0cdf6b30ff8a42e836f1d2d1bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Sun, 12 May 2019 20:19:17 +0200 Subject: [PATCH] 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 --- .eslintrc.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 4fccd98..13e5e01 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -39,7 +39,13 @@ "double" ], "no-undef": "error", - "no-unused-vars": "error", + "no-unused-vars": [ + "error", + { + "args": "all", + "argsIgnorePattern": "^_" + } + ], "operator-linebreak": [ "error", "after"