From 512a6a55b75a6d11471366611519dc9a509abd27 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Wed, 11 Apr 2018 03:47:27 +0200 Subject: [PATCH] tools: stricter no-undef eslint rule By default eslint does not validate variables that are placed in a typeof check. PR-URL: https://github.com/nodejs/node/pull/19926 Reviewed-By: Gus Caplan Reviewed-By: Weijia Wang Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 5c4933101447f2..2eb3eae6a88979 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -185,7 +185,7 @@ module.exports = { 'no-this-before-super': 'error', 'no-throw-literal': 'error', 'no-trailing-spaces': 'error', - 'no-undef': 'error', + 'no-undef': ['error', { typeof: true }], 'no-undef-init': 'error', 'no-unexpected-multiline': 'error', 'no-unreachable': 'error',