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
Problematic code for no-sequences showing and being flagged as non-problematic #5536
Comments
Sequences are allowed when enclosed in parentheses. See http://eslint.org/docs/rules/no-sequences#rule-details. The rule is behaving as expected. The introductory paragraph and code example does not say all of the code is considered bad, it is just showing examples of code sequences. We can maybe make that clearer. |
Ok, sure--maybe a problematic equivalent too, since there's already a non-problematic version: 0, eval("doSomething();"); |
Very minor tweak to increase clarity of docs, including the problematic version of the code above. Thoughts? Edit: Just to clarify why I only changed one word: "its use" is not very clear - it's hard to tell if it's referring to the rule or sequences as a pattern. This change should make it clearer to the reader. |
I like it. |
Kinda goofed by pushing to my fork first and tried to delete it. Here's the actual PR: #5650 Sorry for the confusion 😅 |
Docs: Update no-sequences rule docs for clarity (fixes #5536)
Sweet, thanks, I think that was a very good way to resolve it... |
@brettz9 Glad to hear it - thanks for reporting the issue! |
What version of ESLint are you using?
The ESLint demo (and looking at docs in
master
).What configuration and parser (Espree, Babel-ESLint, etc.) are you using?
The ESLint demo (and looking at docs in
master
).What did you do? Please include the actual source code causing the issue.
I noticed that the following code in
no-sequences
:...is listed in the introductory block referring to the problem of sequences as well as in a non-problematic section.
What did you expect to happen?
I'd expect that the code would not appear in the non-problematic block in the docs but would be flagged in the demo. I'd also expect a non-problematic equivalent to be documented.
What actually happened? Please include the actual, raw output from ESLint.
The code appears in a non-problematic block and was not flagged as a problem (with
no-sequences
enabled) in the demo.The text was updated successfully, but these errors were encountered: