Skip to content

Commit 512a6a5

Browse files
BridgeARjasnell
authored andcommitted
tools: stricter no-undef eslint rule
By default eslint does not validate variables that are placed in a typeof check. PR-URL: #19926 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent cb2e78a commit 512a6a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ module.exports = {
185185
'no-this-before-super': 'error',
186186
'no-throw-literal': 'error',
187187
'no-trailing-spaces': 'error',
188-
'no-undef': 'error',
188+
'no-undef': ['error', { typeof: true }],
189189
'no-undef-init': 'error',
190190
'no-unexpected-multiline': 'error',
191191
'no-unreachable': 'error',

0 commit comments

Comments
 (0)