-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add missing eslint import in generated package.json #375
Conversation
🦋 Changeset detectedLatest commit: 2ad8759 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
Mhmm, interesting. I tried reproducing exactly what you did in #374 and for me, it's not failing. This is because |
@manuel3108 Thanks for the hint, it looks like it's specifically related to pnpm 10 (which was installed on my system) and I am indeed unable to replicate on pnpm 9. I guess I can file this as a pnpm 10 regression instead? I'll keep the issue open for now in case it's closed as works-as-intended on their end and we've been relying on undefined behavior for pnpm 9 and below. |
@GrygrFlzr Sure, sounds good! |
Per #374 we really are using Aside, I will also have to investigate if the prettier config generated by the CLI has similar implied dependency issues. |
Issue ===== Eslint cannot be run after a clean install. ```sh [Running: fd node_modules --no-ignore --prune -x rm -rf && pnpm i && cd integration-tests && pnpm eslint] Scope: all 2 workspace projects Lockfile is up to date, resolution step is skipped Packages: +607 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Progress: resolved 607, reused 607, downloaded 0, added 607, done devDependencies: + @umbrelladocs/linkspector 0.3.13 + markdownlint-cli2 0.17.2 + prettier 3.4.2 + prettier-plugin-organize-imports 4.1.0 + prettier-plugin-packagejson 2.5.8 Done in 4.8s > @yazi.nvim/[email protected] eslint /Users/mikavilpas/git/yazi.nvim/integration-tests > eslint --max-warnings=0 . Oops! Something went wrong! :( ESLint: 9.20.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@eslint/eslintrc' imported from /Users/mikavilpas/git/yazi.nvim/integration-tests/eslint.config.mjs Did you mean to import "@eslint/eslintrc/dist/eslintrc.cjs"? at packageResolve (node:internal/modules/esm/resolve:857:9) at moduleResolve (node:internal/modules/esm/resolve:926:18) at defaultResolve (node:internal/modules/esm/resolve:1056:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:654:12) at #cachedDefaultResolve (node:internal/modules/esm/loader:603:25) at ModuleLoader.resolve (node:internal/modules/esm/loader:586:38) at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:242:38) at ModuleJob._link (node:internal/modules/esm/module_job:135:49) ELIFECYCLE Command failed with exit code 2. [Command exited with 2, lasted 11.133123792s] ``` Solution ======== - Migrate the eslint config to the new flat config system. - remove "legacy" typescript-eslint setup Here is the PR where the breaking change was done - pnpm/pnpm#8378 More information about the "flat config" - https://eslint.org/blog/2022/08/new-config-system-part-2/ Other references I used - pnpm/pnpm#8378 - https://typescript-eslint.io/packages/typescript-eslint/#migrating-from-legacy-config-setups - sveltejs/cli#374 - sveltejs/cli#375 - nuxt/eslint#539 - pnpm/pnpm#9052
Issue ===== Eslint cannot be run after a clean install. ```sh [Running: fd node_modules --no-ignore --prune -x rm -rf && pnpm i && cd integration-tests && pnpm eslint] Scope: all 2 workspace projects Lockfile is up to date, resolution step is skipped Packages: +607 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Progress: resolved 607, reused 607, downloaded 0, added 607, done devDependencies: + @umbrelladocs/linkspector 0.3.13 + markdownlint-cli2 0.17.2 + prettier 3.4.2 + prettier-plugin-organize-imports 4.1.0 + prettier-plugin-packagejson 2.5.8 Done in 4.8s > @yazi.nvim/[email protected] eslint /Users/mikavilpas/git/yazi.nvim/integration-tests > eslint --max-warnings=0 . Oops! Something went wrong! :( ESLint: 9.20.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@eslint/eslintrc' imported from /Users/mikavilpas/git/yazi.nvim/integration-tests/eslint.config.mjs Did you mean to import "@eslint/eslintrc/dist/eslintrc.cjs"? at packageResolve (node:internal/modules/esm/resolve:857:9) at moduleResolve (node:internal/modules/esm/resolve:926:18) at defaultResolve (node:internal/modules/esm/resolve:1056:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:654:12) at #cachedDefaultResolve (node:internal/modules/esm/loader:603:25) at ModuleLoader.resolve (node:internal/modules/esm/loader:586:38) at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:242:38) at ModuleJob._link (node:internal/modules/esm/module_job:135:49) ELIFECYCLE Command failed with exit code 2. [Command exited with 2, lasted 11.133123792s] ``` Solution ======== - Migrate the eslint config to the new flat config system. - remove "legacy" typescript-eslint setup Here is the PR where the breaking change was done - pnpm/pnpm#8378 More information about the "flat config" - https://eslint.org/blog/2022/08/new-config-system-part-2/ Other references I used - pnpm/pnpm#8378 - https://typescript-eslint.io/packages/typescript-eslint/#migrating-from-legacy-config-setups - sveltejs/cli#374 - sveltejs/cli#375 - nuxt/eslint#539 - pnpm/pnpm#9052
Fixes #374
I used version
@eslint/js@^9.17.0
since that's what's installed on our pnpm lockfile for this project, but maybe we can require lower?