Skip to content

Commit

Permalink
use prettier from generator-jhipster. (#1810)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Jun 11, 2024
1 parent 6b999e5 commit 3d9e354
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion generators/react-native/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default class extends BaseApplicationGenerator {
const replace = section => {
if (packageJsonTarget[section]) {
Object.entries(packageJsonTarget[section]).forEach(([dependency, dependencyReference]) => {
if (dependencyReference.startsWith(keyToReplace)) {
if (dependencyReference?.startsWith(keyToReplace)) {
const [keyToReplaceAtSource, sectionAtSource = section, dependencyAtSource = dependency] = dependencyReference.split('#');
if (keyToReplaceAtSource !== keyToReplace) return;
if (!packageJsonSource[sectionAtSource] || !packageJsonSource[sectionAtSource][dependencyAtSource]) {
Expand Down
1 change: 0 additions & 1 deletion generators/react-native/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"mockery": "2.1.0",
"patch-package": "8.0.0",
"path-exists": "5.0.0",
"prettier": "3.3.1",
"react-test-renderer": "18.2.0",
"resolve": "1.22.8",
"rimraf": "5.0.7",
Expand Down
2 changes: 1 addition & 1 deletion generators/react-native/templates/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"mockery": "REPLACE_WITH_VERSION",
"patch-package": "REPLACE_WITH_VERSION",
"path-exists": "REPLACE_WITH_VERSION",
"prettier": "REPLACE_WITH_VERSION",
"prettier": null,
"react-test-renderer": "REPLACE_WITH_VERSION",
"resolve": "REPLACE_WITH_VERSION",
"rimraf": "REPLACE_WITH_VERSION",
Expand Down

0 comments on commit 3d9e354

Please sign in to comment.