Skip to content

Commit

Permalink
fix(svelte): factory code was not compiling anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
murdos committed Oct 2, 2024
1 parent 2b14b7e commit 4e12210
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ public JHipsterModule buildSvelteModule(JHipsterModuleProperties properties) {
.addFile("svelte-logo.png")
.and()
.and()
.apply(patchPrettierConfig())
.apply(patchPrettierConfig(properties))
.build();
//@formatter:on
}

private Consumer<JHipsterModuleBuilder> patchPrettierConfig() {
private Consumer<JHipsterModuleBuilder> patchPrettierConfig(JHipsterModuleProperties properties) {
//@formatter:off
return moduleBuilder -> moduleBuilder
.mandatoryReplacements()
.in(path(".prettierrc"))
.line(lineBeforeText("plugins:"), properties.idendation().times(1) + "- prettier-plugin-svelte")
.add(lineBeforeText("plugins:"), properties.indentation().times(1) + "- prettier-plugin-svelte")
.add(append(), "\n# Svelte rules:")
.add(append(), "semi: false")
.add(append(), "svelteSortOrder: options-scripts-styles-markup")
Expand Down

0 comments on commit 4e12210

Please sign in to comment.