Skip to content

Commit

Permalink
tools: stricter no-undef eslint rule
Browse files Browse the repository at this point in the history
By default eslint does not validate variables that are placed in a
typeof check.

PR-URL: nodejs#19926
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
BridgeAR committed May 1, 2018
1 parent 6963e96 commit ecb4202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ module.exports = {
// Variables
// http://eslint.org/docs/rules/#variables
'no-delete-var': 'error',
'no-undef': 'error',
'no-undef': ['error', { typeof: true }],
'no-unused-vars': ['error', { args: 'none' }],
'no-use-before-define': ['error', {
classes: true,
Expand Down

0 comments on commit ecb4202

Please sign in to comment.