Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: lint for empty character classes in regex #5115

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down