From 1864b0faf275bb6805ec2761096aa5b142314b17 Mon Sep 17 00:00:00 2001 From: Robin Cussol Date: Mon, 15 Jul 2019 18:02:52 +0200 Subject: [PATCH] fix: init renames _prettierrc.js to .prettierrc.js In https://github.com/facebook/react-native/commit/65eea9d1f82215f7dd10241a3cc1045b6ac3918a, the prettier config for ESLint has been extracted to a .prettierrc file. It was however not added to the React Native `template` folder and this was causing linting issues in newly generated RN apps. In that [PR](https://github.com/facebook/react-native/pull/25478) to `react-native`, a `_prettierrc.js` file was added to the `template` folder, however, a newly generated project would have the file still underscored (see https://github.com/facebook/react-native/pull/25478#issuecomment-511452946) This commit addresses that issue by adding `prettierrc.js` to the list of underscored files that need to be renamed to dotfiles. --- packages/cli/src/commands/init/editTemplate.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/src/commands/init/editTemplate.js b/packages/cli/src/commands/init/editTemplate.js index a72ca07f3..89a610137 100644 --- a/packages/cli/src/commands/init/editTemplate.js +++ b/packages/cli/src/commands/init/editTemplate.js @@ -48,6 +48,7 @@ const UNDERSCORED_DOTFILES = [ 'flowconfig', 'gitattributes', 'gitignore', + 'prettierrc.js', 'watchmanconfig', ];