Closed amotmot closed 9 years ago
foo.bar.flag = "0"; foo.bar.flag = "1";
foo.bar.flag = "0";
foo.bar.flag = "1";
The following rule matches both above cases $_any.flag = "0"
$_any.flag = "0"
ScanJS results in Experiment Tab: http://imgur.com/88omUeW
Is it possible to write a rule that checks if a variable is set to a particular value? I'm trying to create a rule that checks to see if a variable is set to false or true in numeric equivalents as strings .
Maybe using https://github.com/eslint/eslint with a custom rule as a plugin is more interesting to you?
@mozfreddyb thanks. I'll look into writing a custom rule with eslint.
foo.bar.flag = "0";
foo.bar.flag = "1";
The following rule matches both above cases
$_any.flag = "0"
ScanJS results in Experiment Tab: http://imgur.com/88omUeW
Is it possible to write a rule that checks if a variable is set to a particular value? I'm trying to create a rule that checks to see if a variable is set to false or true in numeric equivalents as strings .