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
add option or comment hint to ignore 'Unreachable break after return' #757
Comments
I would love this as well as often when debugging I'll just throw in a return statement but then jshint (run automatically) complains |
@Zugwalt what I ended up doing was modifying my generator to wrap the user specified code in an For example:
This is equivalent to the code without the braces and jshint doesn't complain :) |
I don't know if this is older than this functionality, but I was just looking at the source, and the docs for JSLint, and this could do the trick as well
|
The documentation says that sytax turns off those warnings everywhere, so I'm not sure if function scope works with those. Also I would like to note another use case for this is the use of a preprocessor. It would be nice to be able to lint before and after preprocessing if you take the time to set jshint options. So far I'm going to try the approach I just mentioned. Update: It is function scoped. |
…eak after return statement This options suppresses warnings about unreachable break after return. It is useful especially with auto generated code. Closes jshint#757
I specifically ask about this condition because any straight-forward lex-compatible parser generator will use this pattern.
The text was updated successfully, but these errors were encountered: