disallow control characters in regular expressions (no-control-regex)
"extends": "eslint:recommended" property in a configuration file enables this rule.
This rule disallows control characters in regular expressions.
Examples of incorrect code for this rule:
/*eslint no-control-regex: "error"*/ var pattern1 = /\x1f/; var pattern2 = new RegExp("\x1f");
Examples of correct code for this rule:
/*eslint no-control-regex: "error"*/ var pattern1 = /\x20/; var pattern2 = new RegExp("\x20");
When Not To Use It
If you need to use control character pattern matching, then you should turn this rule off.
This rule was introduced in ESLint 0.1.0.