diff options
author | Rich Trott <rtrott@gmail.com> | 2016-02-05 20:39:45 -0800 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-02-07 13:20:45 -0800 |
commit | 478c68284f187270b2efeff41da19d98f0c2362f (patch) | |
tree | 05c6a42fd0136a0de59e354731fcb1862fbf9797 /.eslintrc | |
parent | 987e9e3d64511e5f97e2285ea329daf781dc9958 (diff) | |
download | android-node-v8-478c68284f187270b2efeff41da19d98f0c2362f.tar.gz android-node-v8-478c68284f187270b2efeff41da19d98f0c2362f.tar.bz2 android-node-v8-478c68284f187270b2efeff41da19d98f0c2362f.zip |
tools: lint for empty character classes in regex
Enable linting rule to forbid empty character classes in regular
expressions. See http://eslint.org/docs/rules/no-empty-character-class
Organize "Possible Error" rules in .eslintrc in alphabetical order to
match eslint documentation.
PR-URL: https://github.com/nodejs/node/pull/5115
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to '.eslintrc')
-rw-r--r-- | .eslintrc | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -17,6 +17,8 @@ ecmaFeatures: rules: # Possible Errors # list: https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors + ## disallow control characters in regular expressions + no-control-regex: 2 ## check debugger sentence no-debugger: 2 ## check duplicate arguments @@ -25,24 +27,24 @@ rules: no-dupe-keys: 2 ## check duplicate switch-case no-duplicate-case: 2 - ## disallow superfluous semicolons - no-extra-semi: 2 + ## disallow the use of empty character classes in regular expressions + no-empty-character-class: 2 ## disallow assignment of exceptional params no-ex-assign: 2 - ## disallow unreachable code - no-unreachable: 2 - ## require valid typeof compared string like typeof foo === 'strnig' - valid-typeof: 2 - ## disallow controls characters in regular expressions - no-control-regex: 2 ## disallow extra boolean casts no-extra-boolean-cast : 2 + ## disallow superfluous semicolons + no-extra-semi: 2 ## validate regular expressions no-invalid-regexp: 2 ## forbid weird whitespace characters no-irregular-whitespace: 2 ## avoid unexpected multiline expressions no-unexpected-multiline: 2 + ## disallow unreachable code + no-unreachable: 2 + ## require valid typeof compared string like typeof foo === 'strnig' + valid-typeof: 2 # Best Practices # list: https://github.com/eslint/eslint/tree/master/docs/rules#best-practices |