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

Chore: add more test cases for no-sequences #14579

Merged
merged 1 commit into from May 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/lib/rules/no-sequences.js
Expand Up @@ -59,7 +59,11 @@ ruleTester.run("no-sequences", rule, {

// valid code with "allowInParentheses" set to `false`
{ code: "for ((i = 0, j = 0); test; );", options: [{ allowInParentheses: false }] },
{ code: "for (; test; (i++, j++));", options: [{ allowInParentheses: false }] }
{ code: "for (; test; (i++, j++));", options: [{ allowInParentheses: false }] },

// https://github.com/eslint/eslint/issues/14572
{ code: "const foo = () => { return ((bar = 123), 10) }", env: { es6: true } },
{ code: "const foo = () => (((bar = 123), 10));", env: { es6: true } }
],

// Examples of code that should trigger the rule
Expand Down