Skip to content

Commit

Permalink
Merge pull request #49 from blond/issue-36
Browse files Browse the repository at this point in the history
Add `no-useless-escape` rule
  • Loading branch information
blond committed Apr 22, 2017
2 parents ac1884c + 9d5cf5d commit 12f0746
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/bad/regex.js
Expand Up @@ -12,3 +12,6 @@ var pattern3 = /^abc[]/; // Empty character classes in regular expressions do n

/*eslint no-invalid-regexp: ["error", {"allowConstructorFlags": ["u", "y"]}]*/
var pattern4 = new RegExp('\\');

/*eslint no-useless-escape: "error"*/
"\'";
1 change: 1 addition & 0 deletions lib/common-rules.js
Expand Up @@ -35,6 +35,7 @@ module.exports = {
'no-regex-spaces': 'error',
'no-empty-character-class': 'error',
'no-invalid-regexp': ['error', { allowConstructorFlags: ['u', 'y'] }],
'no-useless-escape': 'error',

// Not optimal
'no-empty': 'error',
Expand Down

0 comments on commit 12f0746

Please sign in to comment.