Skip to content

tools: enable ESLint arrow-body-style rule (explicit braces and `return`)

Rodrigo Muino Tomonari requested to merge github/fork/Trott/always-curly into master

tools: enable ESLint arrow-body-style rule

Always surround arrow function bodies that consist of a single expression in their own block.

Arrow functions that are a single expression do not need to be their own blocks. Use blocks in that situation for consistency and clarity.

The "use or do not use blocks" discussion came up in a pull request.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

tools test benchmark lib

Merge request reports

Loading