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

Docs: add more examples with arrow functions for no-sequences rule #14313

Merged
merged 2 commits into from Apr 12, 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: 6 additions & 0 deletions docs/rules/no-sequences.md
Expand Up @@ -39,6 +39,8 @@ switch (val = foo(), val) {}
while (val = foo(), val < 42);

with (doSomething(), val) {}

const foo = (val) => (console.log('bar'), val);
```

Examples of **correct** code for this rule:
Expand All @@ -61,6 +63,8 @@ switch ((val = foo(), val)) {}
while ((val = foo(), val < 42));

with ((doSomething(), val)) {}

const foo = (val) => ((console.log('bar'), val));
mdjermanovic marked this conversation as resolved.
Show resolved Hide resolved
```

## Options
Expand Down Expand Up @@ -91,6 +95,8 @@ switch ((val = foo(), val)) {}
while ((val = foo(), val < 42));

with ((doSomething(), val)) {}

const foo = (val) => ((console.log('bar'), val));
```

Examples of **correct** code for this rule with the `{ "allowInParentheses": false }` option:
Expand Down