From ac1b551b76ba6202c414d22629effaaf396c764c Mon Sep 17 00:00:00 2001 From: Terry Jia Date: Fri, 19 Dec 2025 15:06:11 -0500 Subject: [PATCH] eslint issue on windows (#7634) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary fix eslint issue on windows ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7634-eslint-issue-on-windows-2ce6d73d365081f785def469045f57bd) by [Unito](https://www.unito.io) --------- Co-authored-by: DrJKL --- eslint.config.ts | 8 ++++++-- package.json | 1 - pnpm-lock.yaml | 50 --------------------------------------------- pnpm-workspace.yaml | 1 - 4 files changed, 6 insertions(+), 54 deletions(-) diff --git a/eslint.config.ts b/eslint.config.ts index 4940254ab..1e3dbf644 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -4,7 +4,10 @@ import pluginI18n from '@intlify/eslint-plugin-vue-i18n' import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript' import { importX } from 'eslint-plugin-import-x' import oxlint from 'eslint-plugin-oxlint' -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' +// WORKAROUND: eslint-plugin-prettier causes segfault on Node.js 24 + Windows +// See: https://github.com/nodejs/node/issues/58690 +// Prettier is still run separately in lint-staged, so this is safe to disable +import eslintConfigPrettier from 'eslint-config-prettier' import { configs as storybookConfigs } from 'eslint-plugin-storybook' import unusedImports from 'eslint-plugin-unused-imports' import pluginVue from 'eslint-plugin-vue' @@ -108,7 +111,8 @@ export default defineConfig([ tseslintConfigs.recommended, // Difference in typecheck on CI vs Local pluginVue.configs['flat/recommended'], - eslintPluginPrettierRecommended, + // Use eslint-config-prettier instead of eslint-plugin-prettier to avoid Node 24 segfault + eslintConfigPrettier, // @ts-expect-error Type incompatibility between storybook plugin and ESLint config types storybookConfigs['flat/recommended'], // @ts-expect-error Type incompatibility between import-x plugin and ESLint config types diff --git a/package.json b/package.json index ed09c762a..14552bcda 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,6 @@ "eslint-import-resolver-typescript": "catalog:", "eslint-plugin-import-x": "catalog:", "eslint-plugin-oxlint": "catalog:", - "eslint-plugin-prettier": "catalog:", "eslint-plugin-storybook": "catalog:", "eslint-plugin-unused-imports": "catalog:", "eslint-plugin-vue": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b56b7a4aa..fec5ae471 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -159,9 +159,6 @@ catalogs: eslint-plugin-oxlint: specifier: 1.25.0 version: 1.25.0 - eslint-plugin-prettier: - specifier: ^5.5.4 - version: 5.5.4 eslint-plugin-storybook: specifier: ^10.1.9 version: 10.1.9 @@ -600,9 +597,6 @@ importers: eslint-plugin-oxlint: specifier: 'catalog:' version: 1.25.0 - eslint-plugin-prettier: - specifier: 'catalog:' - version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1))(prettier@3.7.4) eslint-plugin-storybook: specifier: 'catalog:' version: 10.1.9(eslint@9.39.1(jiti@2.6.1))(storybook@10.1.9(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(typescript@5.9.3) @@ -5051,20 +5045,6 @@ packages: eslint-plugin-oxlint@1.25.0: resolution: {integrity: sha512-grS4KdR9FAxoQC+wMkepeQHL4osMhoYfUI11Pot6Gitqr4wWi+JZrX0Shr8Bs9fjdWhEjtaZIV6cr4mbfytmyw==} - eslint-plugin-prettier@5.5.4: - resolution: {integrity: sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '*' - eslint: '>=8.0.0' - eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true - eslint-plugin-storybook@10.1.9: resolution: {integrity: sha512-2XCnHhu+9ShW8U/MsvnlT4ZkzADIPtlfYVD/GBBbs8loWu0x9IZ3EfNg1LEImjvvNVDhwpd5K04lK4CAP+2bWA==} peerDependencies: @@ -5190,9 +5170,6 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} @@ -6846,10 +6823,6 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} - prettier@3.7.4: resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} engines: {node: '>=14'} @@ -7499,10 +7472,6 @@ packages: resolution: {integrity: sha512-2SG1TnJGjMkD4+gblONMGYSrwAzYi+ymOitD+Jb/iMYm57nH20PlkVeMQRah3yDMKEa0QQYUF/QPWpdW7C6zNg==} engines: {node: ^14.18.0 || >=16.0.0} - synckit@0.11.11: - resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==} - engines: {node: ^14.18.0 || >=16.0.0} - table@6.9.0: resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==} engines: {node: '>=10.0.0'} @@ -13128,15 +13097,6 @@ snapshots: dependencies: jsonc-parser: 3.3.1 - eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1))(prettier@3.7.4): - dependencies: - eslint: 9.39.1(jiti@2.6.1) - prettier: 3.7.4 - prettier-linter-helpers: 1.0.0 - synckit: 0.11.11 - optionalDependencies: - eslint-config-prettier: 10.1.8(eslint@9.39.1(jiti@2.6.1)) - eslint-plugin-storybook@10.1.9(eslint@9.39.1(jiti@2.6.1))(storybook@10.1.9(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(typescript@5.9.3): dependencies: '@typescript-eslint/utils': 8.50.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) @@ -13295,8 +13255,6 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-diff@1.3.0: {} - fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -15300,10 +15258,6 @@ snapshots: prelude-ls@1.2.1: {} - prettier-linter-helpers@1.0.0: - dependencies: - fast-diff: 1.3.0 - prettier@3.7.4: {} pretty-bytes@7.1.0: {} @@ -16191,10 +16145,6 @@ snapshots: '@pkgr/core': 0.2.9 tslib: 2.8.1 - synckit@0.11.11: - dependencies: - '@pkgr/core': 0.2.9 - table@6.9.0: dependencies: ajv: 8.17.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index a4c91f38b..fb28dcf63 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -54,7 +54,6 @@ catalog: eslint-import-resolver-typescript: ^4.4.4 eslint-plugin-import-x: ^4.16.1 eslint-plugin-oxlint: 1.25.0 - eslint-plugin-prettier: ^5.5.4 eslint-plugin-storybook: ^10.1.9 eslint-plugin-unused-imports: ^4.3.0 eslint-plugin-vue: ^10.6.2