From f7fda9f364447aa8dba5310032a109f837dbe369 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Fri, 29 May 2020 18:05:10 -0700 Subject: [PATCH 1/2] prettier [nfc]: Put config in a JS file so we can add comments. The Prettier docs [1] say it's fine to use a .js file, and that's what the RN template has. So, do. [1]: https://prettier.io/docs/en/configuration.html --- .prettierrc | 6 ------ .prettierrc.js | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 .prettierrc create mode 100644 .prettierrc.js diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 0de23f80c99..00000000000 --- a/.prettierrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "printWidth": 100, - "parser": "babel-flow", - "singleQuote": true, - "trailingComma": "all", -} diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 00000000000..27a3d8ceacd --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,6 @@ +module.exports = { + printWidth: 100, + parser: 'babel-flow', + singleQuote: true, + trailingComma: 'all', +}; From 1f2657d3ddacea21bd9b4787c94d3056ba605d67 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Fri, 29 May 2020 18:12:04 -0700 Subject: [PATCH 2/2] prettier [nfc]: Don't take some Prettier config in the RN 60 upgrade. This commit marks part of the RN v0.59 -> v0.60 changes to the template app [1] that we don't take. This commit may freely be positioned before the upgrade. Corresponds to facebook/react-native@f4d5e8c23, released in RN v0.60.5. --- .prettierrc.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.prettierrc.js b/.prettierrc.js index 27a3d8ceacd..c00bdcfde95 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,4 +1,14 @@ module.exports = { + /** + * These two were added to the RN template file in + * `facebook/react-native@f4d5e8c23` (released in 0.60.5) because of + * conflicts with `eslint-config-react-native-community`. We haven't + * activated that config (we might, it's #4119), and we haven't + * otherwise found a use for these rules; we don't follow them. + */ + // bracketSpacing: false, + // jsxBracketSameLine: true, + printWidth: 100, parser: 'babel-flow', singleQuote: true,