From fd5ed31afac0757c362ff0d1a60c17537f04a236 Mon Sep 17 00:00:00 2001 From: Alex Corn Date: Thu, 29 Jul 2021 22:55:26 -0400 Subject: [PATCH] Ignore unused vars starting with underscore --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 5b9db8a..25ea1eb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,7 +24,7 @@ module.exports = { // Require spaces before and after keywords (like "if") 'keyword-spacing': 'error', // Don't allow unused variables, but allow unused function args (e.g. in callbacks) and global vars - 'no-unused-vars': ['error', {vars: 'local', args: 'none'}], + 'no-unused-vars': ['error', {vars: 'local', args: 'none', varsIgnorePattern: '^_'}], // Require using dot notation (obj.prop instead of obj['prop']) where possible 'dot-notation': 'error', // Don't use spaces before parens in anonymous or named functions