Repository: jhipster/jhipster-lite (java)

Issue:
Migration ESLint 9.0.0 (Angular React Vue apps)
https://eslint.org/docs/latest/use/configure/migration-guide



Pull request:
ESLint 9
Fix #9496 

Patch:
diff --git a/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java b/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java
index 942dd4c9a..35a21ed56 100644
--- a/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java
+++ b/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java
@@ -46,6 +46,8 @@ public class ReactCoreModulesFactory {
         .addDevDependency(packageName("@typescript-eslint/eslint-plugin"), COMMON)
         .addDevDependency(packageName("@vitejs/plugin-react"), REACT)
         .addDevDependency(packageName("@vitest/coverage-istanbul"), COMMON)
+        .addDevDependency(packageName("typescript-eslint"), COMMON)
+        .addDevDependency(packageName("globals"), COMMON)
         .addDevDependency(packageName("eslint"), COMMON)
         .addDevDependency(packageName("eslint-plugin-react"), REACT)
         .addDevDependency(packageName("jsdom"), COMMON)
@@ -61,7 +63,7 @@ public class ReactCoreModulesFactory {
         .addScript(scriptKey("build"), scriptCommand("tsc && vite build --emptyOutDir"))
         .addScript(scriptKey("preview"), scriptCommand("vite preview"))
         .addScript(scriptKey("start"), scriptCommand("vite"))
-        .addScript(scriptKey("lint"), scriptCommand("eslint --ext .js,.ts,.tsx src/"))
+        .addScript(scriptKey("lint"), scriptCommand("eslint ."))
         .addScript(scriptKey("tsc:watch"), scriptCommand("tsc --noEmit --watch"))
         .addScript(scriptKey("test"), scriptCommand("npm run test:watch"))
         .addScript(scriptKey("test:coverage"), scriptCommand("vitest run --coverage"))
@@ -72,10 +74,9 @@ public class ReactCoreModulesFactory {
           .addFile("tsconfig.json")
           .addTemplate("vite.config.ts")
           .addTemplate("vitest.config.ts")
-          .addFile(".eslintrc.cjs")
+          .addTemplate("eslint.config.js")
           .and()
         .batch(SOURCE_COMMON, to("."))
-          .addFile(".eslintignore")
           .addFile(".npmrc")
           .and()
         .batch(APP_SOURCE, APP_DESTINATION)
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 b694ea402..02bf854d3 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
@@ -56,7 +56,8 @@ public class VueModulesFactory {
         .addDependency(packageName("vue-router"), VUE)
         .addDevDependency(packageName("@typescript-eslint/parser"), COMMON)
         .addDevDependency(packageName("@vitejs/plugin-vue"), VUE)
-        .addDevDependency(packageName("@vue/eslint-config-typescript"), VUE)
+        .addDevDependency(packageName("typescript-eslint"), COMMON)
+        .addDevDependency(packageName("globals"), COMMON)
         .addDevDependency(packageName("@vue/test-utils"), VUE)
         .addDevDependency(packageName("@vue/tsconfig"), VUE)
         .addDevDependency(packageName("@vitest/coverage-istanbul"), COMMON)
@@ -74,7 +75,7 @@ public class VueModulesFactory {
         .addDevDependency(packageName("sinon"), VUE)
         .addScript(scriptKey("build"), scriptCommand("vue-tsc -p tsconfig.build.json --noEmit && vite build --emptyOutDir"))
         .addScript(scriptKey("dev"), scriptCommand("vite"))
-        .addScript(scriptKey("lint"), scriptCommand("eslint --ext .js,.ts,.vue src/"))
+        .addScript(scriptKey("lint"), scriptCommand("eslint ."))
         .addScript(scriptKey("preview"), scriptCommand("vite preview"))
         .addScript(scriptKey("start"), scriptCommand("vite"))
         .addScript(scriptKey("tsc:watch"), scriptCommand("vue-tsc -p tsconfig.build.json --noEmit --watch"))
@@ -83,7 +84,7 @@ public class VueModulesFactory {
         .addScript(scriptKey("test:watch"), scriptCommand("vitest --"))
         .and()
       .files()
-        .add(SOURCE.file(".eslintrc.cjs"), to(".eslintrc.cjs"))
+        .add(SOURCE.template("eslint.config.js.mustache"), to("eslint.config.js"))
         .add(SOURCE.file("tsconfig.json"), to("tsconfig.json"))
         .add(SOURCE.file("tsconfig.build.json"), to("tsconfig.build.json"))
         .add(SOURCE.template("webapp/app/http/AxiosHttp.ts.mustache"), MAIN_DESTINATION.append("http/AxiosHttp.ts"))
@@ -92,7 +93,6 @@ public class VueModulesFactory {
           .addTemplate("vitest.config.ts")
           .and()
         .batch(SOURCE_COMMON, to("."))
-          .addFile(".eslintignore")
           .addFile(".npmrc")
           .and()
         .batch(SOURCE.file("test/unit/http"), to("src/test/webapp/unit/http"))
diff --git a/src/main/java/tech/jhipster/lite/generator/typescript/core/domain/TypescriptModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/typescript/core/domain/TypescriptModuleFactory.java
index 8a76b31ae..1c80856da 100644
--- a/src/main/java/tech/jhipster/lite/generator/typescript/core/domain/TypescriptModuleFactory.java
+++ b/src/main/java/tech/jhipster/lite/generator/typescript/core/domain/TypescriptModuleFactory.java
@@ -27,12 +27,13 @@ public class TypescriptModuleFactory {
         .addDevDependency(packageName("@vitest/coverage-istanbul"), COMMON)
         .addDevDependency(packageName("eslint"), COMMON)
         .addDevDependency(packageName("eslint-config-prettier"), COMMON)
-        .addDevDependency(packageName("eslint-import-resolver-typescript"), COMMON)
-        .addDevDependency(packageName("eslint-plugin-import"), COMMON)
+        .addDevDependency(packageName("eslint-plugin-import-x"), COMMON)
+        .addDevDependency(packageName("globals"), COMMON)
+        .addDevDependency(packageName("typescript-eslint"), COMMON)
         .addDevDependency(packageName("vite-tsconfig-paths"), COMMON)
         .addDevDependency(packageName("vitest"), COMMON)
         .addDevDependency(packageName("vitest-sonar-reporter"), COMMON)
-        .addScript(scriptKey("lint"), scriptCommand("eslint --ext .js,.ts,.tsx src/"))
+        .addScript(scriptKey("lint"), scriptCommand("eslint ."))
         .addScript(scriptKey("test"), scriptCommand("npm run test:watch"))
         .addScript(scriptKey("test:coverage"), scriptCommand("vitest run --coverage"))
         .addScript(scriptKey("test:watch"), scriptCommand("vitest --"))
@@ -41,7 +42,7 @@ public class TypescriptModuleFactory {
         .batch(SOURCE, to("."))
           .addFile("tsconfig.json")
           .addTemplate("vitest.config.ts")
-          .addFile(".eslintrc.cjs")
+          .addTemplate("eslint.config.js")
           .and()
         .and()
       .build();
diff --git a/src/main/resources/generator/client/react/core/.eslintrc.cjs b/src/main/resources/generator/client/react/core/.eslintrc.cjs
deleted file mode 100644
index 67a74f9ad..000000000
--- a/src/main/resources/generator/client/react/core/.eslintrc.cjs
+++ /dev/null
@@ -1,24 +0,0 @@
-module.exports = {
-  env: {
-    node: true,
-  },
-  extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended'],
-  parserOptions: {
-    ecmaFeatures: {
-      jsx: true,
-    },
-    ecmaVersion: 2018,
-    sourceType: 'module',
-  },
-  plugins: ['react'],
-  ignorePatterns: ['node_modules/'],
-  rules: {
-    'react/react-in-jsx-scope': 'off',
-    '@typescript-eslint/no-explicit-any': 'off',
-  },
-  settings: {
-    react: {
-      version: 'detect',
-    },
-  },
-};
diff --git a/src/main/resources/generator/client/react/core/eslint.config.js.mustache b/src/main/resources/generator/client/react/core/eslint.config.js.mustache
new file mode 100644
index 000000000..2a5a13d05
--- /dev/null
+++ b/src/main/resources/generator/client/react/core/eslint.config.js.mustache
@@ -0,0 +1,42 @@
+import globals from 'globals';
+import typescript from 'typescript-eslint';
+import eslint from '@eslint/js';
+import react from 'eslint-plugin-react/configs/recommended.js';
+
+export default typescript.config(
+  {
+    languageOptions: {
+      globals: {
+        ...globals.node,
+      },
+    },
+  },
+  {
+    ignores: ['{{projectBuildDirectory}}/'],
+  },
+  eslint.configs.recommended,
+  {
+    files: ['src/main/webapp/**/*.{ts,tsx}', 'src/main/webapp/**/*.spec.ts'],
+    extends: [...typescript.configs.recommendedTypeChecked, react],
+    settings: {
+      react: {
+        version: 'detect',
+      },
+    },
+    languageOptions: {
+      globals: {
+        ...globals.browser,
+      },
+      parserOptions: {
+        project: ['./tsconfig.json'],
+      },
+    },
+    rules: {
+      'react/react-in-jsx-scope': 'off',
+      '@typescript-eslint/no-unsafe-argument': 'off',
+      '@typescript-eslint/no-unsafe-member-access': 'off',
+      '@typescript-eslint/no-floating-promises': 'off',
+      '@typescript-eslint/no-misused-promises': 'off',
+    },
+  },
+);
diff --git a/src/main/resources/generator/client/vue/.eslintrc.cjs b/src/main/resources/generator/client/vue/.eslintrc.cjs
deleted file mode 100644
index 2f67f9b4e..000000000
--- a/src/main/resources/generator/client/vue/.eslintrc.cjs
+++ /dev/null
@@ -1,13 +0,0 @@
-module.exports = {
-  env: {
-    node: true,
-  },
-  extends: ['eslint:recommended', 'plugin:vue/vue3-recommended', '@vue/eslint-config-typescript', 'prettier'],
-  parserOptions: {
-    parser: '@typescript-eslint/parser',
-  },
-  rules: {
-    quotes: ['error', 'single', { avoidEscape: true }],
-    '@typescript-eslint/no-unused-vars': ['error'],
-  },
-};
diff --git a/src/main/resources/generator/client/vue/eslint.config.js.mustache b/src/main/resources/generator/client/vue/eslint.config.js.mustache
new file mode 100644
index 000000000..3fce453e9
--- /dev/null
+++ b/src/main/resources/generator/client/vue/eslint.config.js.mustache
@@ -0,0 +1,40 @@
+import globals from 'globals';
+import typescript from 'typescript-eslint';
+import js from '@eslint/js';
+import vue from 'eslint-plugin-vue';
+
+export default typescript.config(
+  {
+    languageOptions: {
+      globals: {
+        ...globals.node,
+      },
+    },
+  },
+  {
+    ignores: ['{{projectBuildDirectory}}/'],
+  },
+  js.configs.recommended,
+  ...typescript.configs.recommended.map(config => (config.name === 'typescript-eslint/base' ? config : { ...config, files: ['**/*.ts'] })),
+  ...vue.configs['flat/recommended'],
+  {
+    files: ['**/*.vue'],
+    languageOptions: {
+      parserOptions: { parser: '@typescript-eslint/parser' },
+      globals: { ...globals.browser },
+    },
+  },
+  {
+    files: ['src/*/webapp/**/*.vue', 'src/*/webapp/**/*.ts'],
+    languageOptions: {
+      globals: { ...globals.browser },
+    },
+    rules: {
+      quotes: ['error', 'single', { avoidEscape: true }],
+      '@typescript-eslint/no-explicit-any': 'off',
+      '@typescript-eslint/no-unused-vars': ['error'],
+      'vue/html-self-closing': 'off',
+      '@typescript-eslint/no-empty-object-type': 'off',
+    },
+  },
+);
diff --git a/src/main/resources/generator/client/vue/webapp/app/env.d.ts.mustache b/src/main/resources/generator/client/vue/webapp/app/env.d.ts.mustache
index a735ff239..025ac41ec 100644
--- a/src/main/resources/generator/client/vue/webapp/app/env.d.ts.mustache
+++ b/src/main/resources/generator/client/vue/webapp/app/env.d.ts.mustache
@@ -2,7 +2,6 @@
 
 declare module '*.vue' {
   import { DefineComponent } from 'vue';
-  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
   const component: DefineComponent<{}, {}, any>;
   export default component;
 }
diff --git a/src/main/resources/generator/dependencies/common/package.json b/src/main/resources/generator/dependencies/common/package.json
index 34a073d45..564d1c9c5 100644
--- a/src/main/resources/generator/dependencies/common/package.json
+++ b/src/main/resources/generator/dependencies/common/package.json
@@ -15,18 +15,18 @@
     "@tsconfig/recommended": "1.0.7",
     "@types/jest": "29.5.12",
     "@types/node": "20.16.2",
-    "@typescript-eslint/eslint-plugin": "7.18.0",
-    "@typescript-eslint/parser": "7.18.0",
+    "@typescript-eslint/eslint-plugin": "8.1.0",
+    "@typescript-eslint/parser": "8.1.0",
     "@vitest/coverage-istanbul": "2.0.5",
     "autoprefixer": "10.4.20",
     "browser-sync": "3.0.2",
     "cssnano": "7.0.5",
     "cypress": "13.14.1",
-    "eslint": "8.57.0",
+    "eslint": "9.9.0",
     "eslint-config-prettier": "9.1.0",
-    "eslint-import-resolver-typescript": "3.6.3",
     "eslint-plugin-cypress": "3.5.0",
-    "eslint-plugin-import": "2.29.1",
+    "eslint-plugin-import-x": "4.1.0",
+    "globals": "15.9.0",
     "husky": "9.1.5",
     "jasmine-core": "5.2.0",
     "jest": "29.7.0",
@@ -49,6 +49,7 @@
     "tailwindcss": "3.4.10",
     "ts-jest": "29.2.5",
     "typescript": "5.5.4",
+    "typescript-eslint": "8.1.0",
     "vite": "5.4.2",
     "vite-tsconfig-paths": "5.0.1",
     "vitest": "2.0.5",
diff --git a/src/main/resources/generator/dependencies/vue/package.json b/src/main/resources/generator/dependencies/vue/package.json
index 7cf5b8e85..0024054d3 100644
--- a/src/main/resources/generator/dependencies/vue/package.json
+++ b/src/main/resources/generator/dependencies/vue/package.json
@@ -14,7 +14,6 @@
     "@pinia/testing": "0.1.5",
     "@types/sinon": "17.0.3",
     "@vitejs/plugin-vue": "5.1.3",
-    "@vue/eslint-config-typescript": "13.0.0",
     "@vue/test-utils": "2.4.6",
     "@vue/tsconfig": "0.5.1",
     "eslint-plugin-vue": "9.27.0",
diff --git a/src/main/resources/generator/typescript/.eslintrc.cjs b/src/main/resources/generator/typescript/.eslintrc.cjs
deleted file mode 100644
index 056eaa210..000000000
--- a/src/main/resources/generator/typescript/.eslintrc.cjs
+++ /dev/null
@@ -1,64 +0,0 @@
-module.exports = {
-  root: true,
-  env: {
-    node: true,
-  },
-  extends: [
-    'eslint:recommended',
-    'prettier',
-    'plugin:@typescript-eslint/recommended',
-    'plugin:import/errors',
-    'plugin:import/warnings',
-    'plugin:import/typescript',
-  ],
-  plugins: ['@typescript-eslint'],
-  rules: {
-    quotes: ['error', 'single', { avoidEscape: true }],
-    'comma-dangle': [
-      'error',
-      {
-        arrays: 'always-multiline',
-        objects: 'always-multiline',
-        imports: 'always-multiline',
-        exports: 'always-multiline',
-        functions: 'never',
-      },
-    ],
-    'import/order': [
-      'error',
-      {
-        alphabetize: {
-          order: 'asc',
-          caseInsensitive: true,
-        },
-        'newlines-between': 'always',
-      },
-    ],
-  },
-  settings: {
-    'import/resolver': {
-      typescript: {
-        alwaysTryTypes: true,
-      },
-    },
-    'import/core-modules': ['sinon'],
-  },
-  parserOptions: {
-    parser: '@typescript-eslint/parser',
-  },
-  overrides: [
-    {
-      files: ['**/__tests__/*.{j,t}s?(x)', '**/*.spec.{j,t}s?(x)'],
-      env: {
-        jest: true,
-      },
-    },
-    {
-      files: ['**/*.ts', '**/*.tsx'],
-      rules: {
-        'no-unused-vars': ['off'],
-        'no-undef': ['off'],
-      },
-    },
-  ],
-};
diff --git a/src/main/resources/generator/typescript/eslint.config.js.mustache b/src/main/resources/generator/typescript/eslint.config.js.mustache
new file mode 100644
index 000000000..8fc3802f7
--- /dev/null
+++ b/src/main/resources/generator/typescript/eslint.config.js.mustache
@@ -0,0 +1,63 @@
+import js from '@eslint/js';
+import imports from 'eslint-plugin-import-x';
+import globals from 'globals';
+import typescript from 'typescript-eslint';
+
+export default typescript.config(
+  {
+    languageOptions: {
+      globals: {
+        ...globals.node,
+      },
+    },
+  },
+  {
+    ignores: [
+      '{{projectBuildDirectory}}/'
+    ],
+  },
+  js.configs.recommended,
+  ...typescript.configs.recommended.map(config => (config.name === 'typescript-eslint/base' ? config : { ...config, files: ['**/*.ts'] })),
+  {
+    extends: [imports.flatConfigs.recommended, imports.flatConfigs.typescript],
+    languageOptions: {
+      // import plugin does not use ecmaVersion and sourceType from languageOptions object
+      parserOptions: {
+        ecmaVersion: 2022,
+        sourceType: 'module',
+      },
+    },
+    rules: {
+      'import-x/no-unresolved': 'off',
+      'import-x/order': [
+        'error',
+        {
+          alphabetize: {
+            order: 'asc',
+            caseInsensitive: true,
+          },
+          'newlines-between': 'always',
+        },
+      ],
+    },
+  },
+  {
+    files: ['src/*/webapp/**/*.ts'],
+    languageOptions: {
+      globals: { ...globals.browser },
+    },
+    rules: {
+      quotes: ['error', 'single', { avoidEscape: true }],
+      'comma-dangle': [
+        'error',
+        {
+          arrays: 'always-multiline',
+          objects: 'always-multiline',
+          imports: 'always-multiline',
+          exports: 'always-multiline',
+          functions: 'never',
+        },
+      ],
+    },
+  },
+);


Test patch:
diff --git a/src/test/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.java
index a3332deda..d200f9851 100644
--- a/src/test/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.java
+++ b/src/test/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.java
@@ -30,6 +30,8 @@ class ReactCoreModulesFactoryTest {
       .containing(nodeDependency("@typescript-eslint/eslint-plugin"))
       .containing(nodeDependency("@vitejs/plugin-react"))
       .containing(nodeDependency("@vitest/coverage-istanbul"))
+      .containing(nodeDependency("typescript-eslint"))
+      .containing(nodeDependency("globals"))
       .containing(nodeDependency("eslint"))
       .containing(nodeDependency("eslint-plugin-react"))
       .containing(nodeDependency("jsdom"))
@@ -46,7 +48,7 @@ class ReactCoreModulesFactoryTest {
       .containing(nodeScript("tsc:watch", "tsc --noEmit --watch"))
       .containing(nodeScript("preview", "vite preview"))
       .containing(nodeScript("start", "vite"))
-      .containing(nodeScript("lint", "eslint --ext .js,.ts,.tsx src/"))
+      .containing(nodeScript("lint", "eslint ."))
       .containing(nodeScript("test", "npm run test:watch"))
       .containing(nodeScript("test:coverage", "vitest run --coverage"))
       .containing(nodeScript("test:watch", "vitest --"))
@@ -61,7 +63,7 @@ class ReactCoreModulesFactoryTest {
         """
       )
       .and()
-      .hasFiles("tsconfig.json", "vite.config.ts", "vitest.config.ts", ".npmrc", ".eslintignore", ".eslintrc.cjs")
+      .hasFiles("tsconfig.json", "vite.config.ts", "vitest.config.ts", ".npmrc", "eslint.config.js")
       .hasFiles("src/main/webapp/index.html")
       .hasPrefixedFiles("src/main/webapp/app", "index.css", "index.tsx", "vite-env.d.ts")
       .hasFiles("src/test/webapp/unit/common/primary/app/App.spec.tsx")
diff --git a/src/test/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.java
index b151d7b41..d0f2af9cf 100644
--- a/src/test/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.java
+++ b/src/test/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactoryTest.java
@@ -30,7 +30,8 @@ class VueModulesFactoryTest {
         .containing(nodeDependency("vue"))
         .containing(nodeDependency("@typescript-eslint/parser"))
         .containing(nodeDependency("@vitejs/plugin-vue"))
-        .containing(nodeDependency("@vue/eslint-config-typescript"))
+        .containing(nodeDependency("typescript-eslint"))
+        .containing(nodeDependency("globals"))
         .containing(nodeDependency("@vue/test-utils"))
         .containing(nodeDependency("@vue/tsconfig"))
         .containing(nodeDependency("@vitest/coverage-istanbul"))
@@ -51,7 +52,7 @@ class VueModulesFactoryTest {
         .containing(nodeScript("build", "vue-tsc -p tsconfig.build.json --noEmit && vite build --emptyOutDir"))
         .containing(nodeScript("tsc:watch", "vue-tsc -p tsconfig.build.json --noEmit --watch"))
         .containing(nodeScript("dev", "vite"))
-        .containing(nodeScript("lint", "eslint --ext .js,.ts,.vue src/"))
+        .containing(nodeScript("lint", "eslint ."))
         .containing(nodeScript("preview", "vite preview"))
         .containing(nodeScript("start", "vite"))
         .containing(nodeScript("test", "npm run test:watch"))
@@ -68,7 +69,7 @@ class VueModulesFactoryTest {
             """
         )
       .and()
-      .hasPrefixedFiles("", ".eslintignore", ".npmrc", ".eslintrc.cjs", "tsconfig.json", "tsconfig.build.json", "vite.config.ts", "vitest.config.ts")
+      .hasPrefixedFiles("", ".npmrc", "eslint.config.js", "tsconfig.json", "tsconfig.build.json", "vite.config.ts", "vitest.config.ts")
       .hasFiles("src/main/webapp/app/http/AxiosHttp.ts")
       .hasPrefixedFiles("src/test/webapp/unit/http", "AxiosHttp.spec.ts", "AxiosHttpStub.ts", "AxiosStub.ts")
       .hasFiles("src/main/webapp/index.html")
diff --git a/src/test/java/tech/jhipster/lite/generator/typescript/domain/core/TypescriptModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/typescript/domain/core/TypescriptModuleFactoryTest.java
index 77c4937d6..6ddf4d8ea 100644
--- a/src/test/java/tech/jhipster/lite/generator/typescript/domain/core/TypescriptModuleFactoryTest.java
+++ b/src/test/java/tech/jhipster/lite/generator/typescript/domain/core/TypescriptModuleFactoryTest.java
@@ -31,16 +31,17 @@ class TypescriptModuleFactoryTest {
       .containing(nodeDependency("@vitest/coverage-istanbul"))
       .containing(nodeDependency("eslint"))
       .containing(nodeDependency("eslint-config-prettier"))
-      .containing(nodeDependency("eslint-import-resolver-typescript"))
-      .containing(nodeDependency("eslint-plugin-import"))
+      .containing(nodeDependency("eslint-plugin-import-x"))
+      .containing(nodeDependency("globals"))
+      .containing(nodeDependency("typescript-eslint"))
       .containing(nodeDependency("vite-tsconfig-paths"))
       .containing(nodeDependency("vitest"))
       .containing(nodeDependency("vitest-sonar-reporter"))
       .containing(nodeScript("test", "npm run test:watch"))
       .containing(nodeScript("test:coverage", "vitest run --coverage"))
       .containing(nodeScript("test:watch", "vitest --"))
-      .containing(nodeScript("lint", "eslint --ext .js,.ts,.tsx src/"))
+      .containing(nodeScript("lint", "eslint ."))
       .and()
-      .hasPrefixedFiles("", ".eslintrc.cjs", "tsconfig.json");
+      .hasPrefixedFiles("", "eslint.config.js", "tsconfig.json");
   }
 }