Created
June 12, 2017 11:45
-
-
Save yannickcr/2db44e1f489e0fcb88f71a5880877210 to your computer and use it in GitHub Desktop.
Disallow typeof v === 'undefined'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"rules": { | |
"no-restricted-syntax": [ | |
"error", { | |
"selector": "BinaryExpression[left.operator='typeof'][right.value='undefined']", | |
"message": "There's no reason to do that in our codebase ;)" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment