Repository: jhipster/jhipster-lite
Pull request #10986 (2024-09-26 19:52:12)

Apply prettier


Patch:
diff --git a/src/main/java/tech/jhipster/lite/generator/buildtool/maven/domain/MavenModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/buildtool/maven/domain/MavenModuleFactory.java
index 05b400994..25cc60282 100644
--- a/src/main/java/tech/jhipster/lite/generator/buildtool/maven/domain/MavenModuleFactory.java
+++ b/src/main/java/tech/jhipster/lite/generator/buildtool/maven/domain/MavenModuleFactory.java
@@ -25,6 +25,7 @@ public class MavenModuleFactory {
     ### Java
 
     You need to have Java 21:
+
     - [JDK 21](https://openjdk.java.net/projects/jdk/21/)""";
 
   public JHipsterModule buildMavenModule(JHipsterModuleProperties properties) {
diff --git a/src/main/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactory.java b/src/main/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactory.java
index ca3f22d45..9cc9181e9 100644
--- a/src/main/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactory.java
+++ b/src/main/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactory.java
@@ -117,7 +117,7 @@ public class VueModulesFactory {
     return moduleBuilder -> moduleBuilder
       .mandatoryReplacements()
         .in(path("eslint.config.js"))
-          .add(lineAfterRegex("from 'typescript-eslint'"), "import vue from 'eslint-plugin-vue';")
+          .add(lineAfterRegex("from '@eslint/js'"), "import vue from 'eslint-plugin-vue';")
           .add(lineAfterRegex("...typescript.configs.recommended"), vuePluginConfig)
           .add(text("files: ['src/*/webapp/**/*.ts']"), "files: ['src/*/webapp/**/*.vue', 'src/*/webapp/**/*.ts']")
           .add(eslintTypescriptVueRule("'vue/html-self-closing': 'off',", properties.indentation()))
diff --git a/src/main/resources/generator/client/angular/core/eslint.config.mjs.mustache b/src/main/resources/generator/client/angular/core/eslint.config.mjs.mustache
index e8f0545da..9fbd0773e 100644
--- a/src/main/resources/generator/client/angular/core/eslint.config.mjs.mustache
+++ b/src/main/resources/generator/client/angular/core/eslint.config.mjs.mustache
@@ -1,7 +1,7 @@
-import globals from 'globals';
-import tseslint from 'typescript-eslint';
 import eslint from '@eslint/js';
 import angular from 'angular-eslint';
+import globals from 'globals';
+import tseslint from 'typescript-eslint';
 
 export default tseslint.config(
   {
diff --git a/src/main/resources/generator/client/react/core/vite.config.ts.mustache b/src/main/resources/generator/client/react/core/vite.config.ts.mustache
index 5d5c5803a..8b593a00b 100644
--- a/src/main/resources/generator/client/react/core/vite.config.ts.mustache
+++ b/src/main/resources/generator/client/react/core/vite.config.ts.mustache
@@ -1,6 +1,6 @@
+import react from '@vitejs/plugin-react';
 import { defineConfig } from 'vite';
 import tsconfigPaths from 'vite-tsconfig-paths';
-import react from '@vitejs/plugin-react';
 
 export default defineConfig({
   plugins: [react(), tsconfigPaths()],
diff --git a/src/main/resources/generator/client/vue/vite.config.ts.mustache b/src/main/resources/generator/client/vue/vite.config.ts.mustache
index e69a85715..1e2b30e9b 100644
--- a/src/main/resources/generator/client/vue/vite.config.ts.mustache
+++ b/src/main/resources/generator/client/vue/vite.config.ts.mustache
@@ -1,6 +1,6 @@
+import vue from '@vitejs/plugin-vue';
 import { defineConfig } from 'vite';
 import tsconfigPaths from 'vite-tsconfig-paths';
-import vue from '@vitejs/plugin-vue';
 
 // https://vitejs.dev/config/
 export default defineConfig({


Test patch:
diff --git a/src/main/resources/generator/typescript/vitest.config.ts.mustache b/src/main/resources/generator/typescript/vitest.config.ts.mustache
index 0dc4d9d3e..30452b097 100644
--- a/src/main/resources/generator/typescript/vitest.config.ts.mustache
+++ b/src/main/resources/generator/typescript/vitest.config.ts.mustache
@@ -1,7 +1,7 @@
 /// <reference types="vitest" />
 
 import tsconfigPaths from 'vite-tsconfig-paths';
-import { defineConfig, configDefaults } from 'vitest/config';
+import { configDefaults, defineConfig } from 'vitest/config';
 
 export default defineConfig({
   plugins: [tsconfigPaths()],
diff --git a/src/test/java/tech/jhipster/lite/generator/buildtool/maven/domain/MavenModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/buildtool/maven/domain/MavenModuleFactoryTest.java
index ff5314b4e..1fdeef9ab 100644
--- a/src/test/java/tech/jhipster/lite/generator/buildtool/maven/domain/MavenModuleFactoryTest.java
+++ b/src/test/java/tech/jhipster/lite/generator/buildtool/maven/domain/MavenModuleFactoryTest.java
@@ -141,6 +141,7 @@ class MavenModuleFactoryTest {
         ### Java
 
         You need to have Java 21:
+
         - [JDK 21](https://openjdk.java.net/projects/jdk/21/)
         """
       );
diff --git a/src/test/resources/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.shouldBuildModuleWithStyle.vitest.config.ts.approved.txt b/src/test/resources/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.shouldBuildModuleWithStyle.vitest.config.ts.approved.txt
index 5bdbdda98..b75e04ba3 100644
--- a/src/test/resources/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.shouldBuildModuleWithStyle.vitest.config.ts.approved.txt
+++ b/src/test/resources/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.shouldBuildModuleWithStyle.vitest.config.ts.approved.txt
@@ -1,7 +1,7 @@
 /// <reference types="vitest" />
 
 import tsconfigPaths from 'vite-tsconfig-paths';
-import { defineConfig, configDefaults } from 'vitest/config';
+import { configDefaults, defineConfig } from 'vitest/config';
 import react from '@vitejs/plugin-react';
 
 export default defineConfig({
diff --git a/src/test/resources/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.shouldCreateVueModule.eslint.config.js.approved.txt b/src/test/resources/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.shouldCreateVueModule.eslint.config.js.approved.txt
index 9608b0fe0..a45582a4a 100644
--- a/src/test/resources/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.shouldCreateVueModule.eslint.config.js.approved.txt
+++ b/src/test/resources/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.shouldCreateVueModule.eslint.config.js.approved.txt
@@ -1,7 +1,7 @@
 import js from '@eslint/js';
+import vue from 'eslint-plugin-vue';
 import globals from 'globals';
 import typescript from 'typescript-eslint';
-import vue from 'eslint-plugin-vue';
 
 export default typescript.config(
   {
diff --git a/src/test/resources/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.shouldCreateVueModule.vitest.config.ts.approved.txt b/src/test/resources/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.shouldCreateVueModule.vitest.config.ts.approved.txt
index d66cc33dc..6307b1faa 100644
--- a/src/test/resources/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.shouldCreateVueModule.vitest.config.ts.approved.txt
+++ b/src/test/resources/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.shouldCreateVueModule.vitest.config.ts.approved.txt
@@ -1,7 +1,7 @@
 /// <reference types="vitest" />
 
 import tsconfigPaths from 'vite-tsconfig-paths';
-import { defineConfig, configDefaults } from 'vitest/config';
+import { configDefaults, defineConfig } from 'vitest/config';
 import vue from '@vitejs/plugin-vue';
 
 export default defineConfig({