You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This warning flags any bare regexp after a return or yield statment as
ambiguous. (Example: `return /[0-9]/`.) The unnecessary fix is to wrap
the regexp in parens like so:
return (/[0-9]/)
This is a useless warning. An unwrapped regexp following a return
statement is not ambiguous to humans or parsers. The division operator
(/) must follow an expression; a regexp literal must *not* follow an
expression. This warning flags regexp literals that appear immediately
after a return statement and thus never after an expression.
No reason to optionalize this warning, as it's not useful.
References:
http://groups.yahoo.com/neo/groups/jslint_com/conversations/topics/345eslint/eslint#324jshint#245jshint#1218
/[0-9]/.exec('123')
throwing a warning is pretty annoying.The text was updated successfully, but these errors were encountered: