diff options
Diffstat (limited to 'tools/node_modules/eslint/lib/rules/arrow-body-style.js')
-rw-r--r-- | tools/node_modules/eslint/lib/rules/arrow-body-style.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/node_modules/eslint/lib/rules/arrow-body-style.js b/tools/node_modules/eslint/lib/rules/arrow-body-style.js index 6d84c7adfb..8d3b400037 100644 --- a/tools/node_modules/eslint/lib/rules/arrow-body-style.js +++ b/tools/node_modules/eslint/lib/rules/arrow-body-style.js @@ -175,10 +175,10 @@ module.exports = { } /* - * If the first token of the reutrn value is `{`, + * If the first token of the reutrn value is `{` or the return value is a sequence expression, * enclose the return value by parentheses to avoid syntax error. */ - if (astUtils.isOpeningBraceToken(firstValueToken)) { + if (astUtils.isOpeningBraceToken(firstValueToken) || blockBody[0].argument.type === "SequenceExpression") { fixes.push( fixer.insertTextBefore(firstValueToken, "("), fixer.insertTextAfter(lastValueToken, ")") |