diff --git a/.prettierrc b/.prettierrc index f45d2b8c574e4a..600a26c495189d 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,7 +1,7 @@ { "arrowParens": "avoid", + "bracketSameLine": true, "bracketSpacing": false, - "jsxBracketSameLine": true, "requirePragma": true, "singleQuote": true, "trailingComma": "all" diff --git a/packages/eslint-config-react-native-community/package.json b/packages/eslint-config-react-native-community/package.json index bf80d296770fcc..fe4fa8e50547d2 100644 --- a/packages/eslint-config-react-native-community/package.json +++ b/packages/eslint-config-react-native-community/package.json @@ -23,7 +23,7 @@ "eslint-plugin-react": "^7.20.0", "eslint-plugin-react-hooks": "^4.0.7", "eslint-plugin-react-native": "^3.10.0", - "prettier": "^2.0.2" + "prettier": "^2.4.1" }, "peerDependencies": { "eslint": ">=7", @@ -31,6 +31,6 @@ }, "devDependencies": { "eslint": "7.12.0", - "prettier": "^2.3.2" + "prettier": "^2.4.1" } } diff --git a/packages/eslint-config-react-native-community/yarn.lock b/packages/eslint-config-react-native-community/yarn.lock index 2029c4ca41a92a..be94f2a9629b7e 100644 --- a/packages/eslint-config-react-native-community/yarn.lock +++ b/packages/eslint-config-react-native-community/yarn.lock @@ -1140,10 +1140,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08" - integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg== +prettier@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" + integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== progress@^2.0.0: version "2.0.3" diff --git a/packages/react-native-codegen/.prettierrc b/packages/react-native-codegen/.prettierrc index f45d2b8c574e4a..600a26c495189d 100644 --- a/packages/react-native-codegen/.prettierrc +++ b/packages/react-native-codegen/.prettierrc @@ -1,7 +1,7 @@ { "arrowParens": "avoid", + "bracketSameLine": true, "bracketSpacing": false, - "jsxBracketSameLine": true, "requirePragma": true, "singleQuote": true, "trailingComma": "all" diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index 95324c2ff731f2..aff3b93ece5dd9 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -37,6 +37,6 @@ "invariant": "^2.2.4", "micromatch": "^4.0.2", "mkdirp": "^0.5.1", - "prettier": "1.19.1" + "prettier": "^2.4.1" } } diff --git a/repo-config/package.json b/repo-config/package.json index f94dbb7b66d7ec..1f3219e2d3c41a 100644 --- a/repo-config/package.json +++ b/repo-config/package.json @@ -43,7 +43,7 @@ "metro-babel-register": "0.66.2", "metro-transform-plugins": "^0.66.2", "mkdirp": "^0.5.1", - "prettier": "1.19.1", + "prettier": "^2.4.1", "react": "17.0.2", "react-native-codegen": "^0.0.10", "react-shallow-renderer": "16.14.1", diff --git a/template/_prettierrc.js b/template/_prettierrc.js index 645abb25811b5f..2b540746a7575e 100644 --- a/template/_prettierrc.js +++ b/template/_prettierrc.js @@ -1,7 +1,7 @@ module.exports = { arrowParens: 'avoid', + bracketSameLine: true, bracketSpacing: false, - jsxBracketSameLine: true, singleQuote: true, trailingComma: 'all', }; diff --git a/yarn.lock b/yarn.lock index 7f4d55cba4c31b..937359a1983974 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5453,10 +5453,10 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier@1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== +prettier@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" + integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== pretty-format@^24.9.0: version "24.9.0"