Skip to content

Commit

Permalink
prettier: Set arrowParens explicitly to 'avoid'.
Browse files Browse the repository at this point in the history
Done to follow the template-app change in
facebook/react-native@635ac1ba5, on the path to the RN v0.64
upgrade.

The default behavior on our Prettier version, according to the
doc [1], is already `arrowParens: 'avoid'`, but that default will
change to 'always' in Prettier v2.0.0. The RN commit sets it to
'avoid', explicitly, to avoid a silent change of behavior when
upgrading.

Might as well do the same, although the path to us actually using
Prettier v2 might be complicated; see
prettier/prettier-eslint-cli#304.

[1] https://prettier.io/docs/en/options.html#arrow-function-parentheses
  • Loading branch information
chrisbobbe committed Aug 4, 2021
1 parent ed6deb5 commit 7e4f7a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ module.exports = {
parser: 'babel-flow',
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
};

0 comments on commit 7e4f7a4

Please sign in to comment.