-
-
Notifications
You must be signed in to change notification settings - Fork 69
Version >= 3.8 causes ESLint stuck in nuxt project #356
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
Comments
Only happened in my NuxtJS project. For other projects, it still works fine. |
Maybe there are too much node_modules path in nuxt generated tsconfig.json file. {
"compilerOptions": {
"paths": {
"nitropack/types": [
"../node_modules/.pnpm/[email protected][email protected]/node_modules/nitropack/types"
],
"nitropack/runtime": [
"../node_modules/.pnpm/[email protected][email protected]/node_modules/nitropack/runtime"
],
"nitropack": [
"../node_modules/.pnpm/[email protected][email protected]/node_modules/nitropack"
],
"defu": [
"../node_modules/.pnpm/[email protected]/node_modules/defu"
],
"h3": [
"../node_modules/.pnpm/[email protected]/node_modules/h3"
],
"consola": [
"../node_modules/.pnpm/[email protected]/node_modules/consola"
],
"ofetch": [
"../node_modules/.pnpm/[email protected]/node_modules/ofetch"
],
"@unhead/vue": [
"../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@unhead/vue"
],
"@nuxt/devtools": [
"../node_modules/.pnpm/@[email protected][email protected][email protected]_@[email protected][email protected][email protected]_9ee0250e209ac58c719ffd43dfe4102d/node_modules/@nuxt/devtools"
],
"@vue/runtime-core": [
"../node_modules/.pnpm/@[email protected]/node_modules/@vue/runtime-core"
],
"@vue/compiler-sfc": [
"../node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc"
],
"unplugin-vue-router/client": [
"../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]_/node_modules/unplugin-vue-router/client"
],
"@nuxt/schema": [
"../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/schema"
],
"nuxt": [
"../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]._255c37df78b381005c9aaa0ce6468c22/node_modules/nuxt"
],
"vite/client": [
"../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/vite/client"
],
"~": [
".."
],
"~/*": [
"../*"
],
"@": [
".."
],
"@/*": [
"../*"
],
"~~": [
".."
],
"~~/*": [
"../*"
],
"@@": [
".."
],
"@@/*": [
"../*"
],
"#shared": [
"../shared"
],
"assets": [
"../assets"
],
"public": [
"../public"
],
"#app": [
"../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]._255c37df78b381005c9aaa0ce6468c22/node_modules/nuxt/dist/app"
],
"#app/*": [
"../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]._255c37df78b381005c9aaa0ce6468c22/node_modules/nuxt/dist/app/*"
],
"vue-demi": [
"../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]._255c37df78b381005c9aaa0ce6468c22/node_modules/nuxt/dist/app/compat/vue-demi"
],
"#vue-router": [
"../node_modules/.pnpm/[email protected][email protected][email protected]_/node_modules/vue-router"
],
"#imports": [
"./imports"
],
"#app-manifest": [
"./manifest/meta/cc5befc9-0c27-4f58-9757-ace23830319b"
],
"#components": [
"./components"
],
"#build": [
"."
],
"#build/*": [
"./*"
]
},
"esModuleInterop": true,
"skipLibCheck": true,
"target": "ESNext",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"verbatimModuleSyntax": true,
"strict": true,
"noUncheckedIndexedAccess": false,
"forceConsistentCasingInFileNames": true,
"noImplicitOverride": true,
"module": "preserve",
"noEmit": true,
"lib": [
"ESNext",
"dom",
"dom.iterable",
"webworker"
],
"jsx": "preserve",
"jsxImportSource": "vue",
"types": [],
"moduleResolution": "Bundler",
"useDefineForClassFields": true,
"noImplicitThis": true,
"allowSyntheticDefaultImports": true
},
"include": [
"./nuxt.d.ts",
"../.config/nuxt.*",
"../**/*",
"../node_modules/.pnpm/@[email protected][email protected][email protected]_@[email protected][email protected][email protected]_9ee0250e209ac58c719ffd43dfe4102d/node_modules/@nuxt/devtools/runtime",
"../node_modules/.pnpm/@[email protected][email protected][email protected]_@[email protected][email protected][email protected]_9ee0250e209ac58c719ffd43dfe4102d/node_modules/@nuxt/devtools/dist/runtime",
"../node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/telemetry/runtime",
"../node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/telemetry/dist/runtime",
".."
],
"exclude": [
"../dist",
"../node_modules",
"../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]._255c37df78b381005c9aaa0ce6468c22/node_modules/nuxt/node_modules",
"../node_modules/.pnpm/@[email protected][email protected][email protected]_@[email protected][email protected][email protected]_9ee0250e209ac58c719ffd43dfe4102d/node_modules/@nuxt/devtools/node_modules",
"../node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/telemetry/node_modules",
"../node_modules/.pnpm/@[email protected][email protected][email protected]_@[email protected][email protected][email protected]_9ee0250e209ac58c719ffd43dfe4102d/node_modules/@nuxt/devtools/runtime/server",
"../node_modules/.pnpm/@[email protected][email protected][email protected]_@[email protected][email protected][email protected]_9ee0250e209ac58c719ffd43dfe4102d/node_modules/@nuxt/devtools/dist/runtime/server",
"../node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/telemetry/runtime/server",
"../node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/telemetry/dist/runtime/server",
"../.output"
]
} |
I’m experiencing the same issue with the project react-parallax-tilt. |
I've tried your repo on Windows with eslint-import-resolver-typescript looking for typescript-eslint in [OMITTED]\eslint-import-resolver-typescript-main\eslint.config.mjs +0ms
eslint-import-resolver-typescript matched node path: [OMITTED]\eslint-import-resolver-typescript-main\node_modules\typescript-eslint\dist\index.d.ts +26ms
eslint-import-resolver-typescript looking for eslint-plugin-import-x in [OMITTED]\eslint-import-resolver-typescript-main\eslint.config.mjs +0ms
eslint-import-resolver-typescript looking for @types\eslint-plugin-import-x in [OMITTED]\eslint-import-resolver-typescript-main\eslint.config.mjs +10ms
eslint-import-resolver-typescript didn't find @types\eslint-plugin-import-x +10ms
eslint-import-resolver-typescript matched node path: [OMITTED]\eslint-import-resolver-typescript-main\node_modules\eslint-plugin-import-x\lib\index.js +0ms
eslint-import-resolver-typescript looking for eslint-import-resolver-typescript in [OMITTED]\eslint-import-resolver-typescript-main\eslint.config.mjs +1ms
eslint-import-resolver-typescript matched node path: [OMITTED]\eslint-import-resolver-typescript-main\node_modules\eslint-import-resolver-typescript\lib\index.d.ts +6ms Nothing blocked ESLint, any ideas? |
We've had a similar issue where a small module that previously took 2-3 seconds to lint, suddenly started taking 30-40 seconds At first glance, the issue looks to be resolved after bumping tinyglobby (dependency of this package) from 0.2.10 to 0.2.11 (either by messing with our lockfile, or adding it explicitly as a dependency) If you look at the changelog of tinyglobby, they do indeed mention something about performance: https://github.com/SuperchupuDev/tinyglobby/releases/tag/0.2.11 , so it seems like a reasonable explanation. Bumping the dependency here could maybe solve the issue for other people as well :) |
I've made a new commit to the reproduction repo. Enabled typescript resolver add added a workflow to run lint in different os. ESLint stuck at every os with lts/latest node add the workflow failed after 10min(timeout is set to 10min). You can check it here https://github.com/ntnyq-dev/eslint-import-resolver-typescript/actions/runs/13391158732 |
@ntnyq I'll retry, give me a couple of minutes... stay tuned |
I tried using |
a possibility would be that if you do a fresh install on the provided reproduction-repo, it will now install [email protected] (as it satisfies ^2.0.10), but when using pnpm it will take into account pnpm-lock.yaml, where the version is 'pinned' to 0.2.10 or maybe tinyglobby has nothing to do with the original issue of this thread :D it's just a guess |
Bump tinyglobby to v0.2.11 does solve the issue. I tried in my local by adding "resolutions": {
"tinyglobby": "^0.2.11"
} |
PR #357 should fix the issue then 🥳 |
I can guarantee that this problem happens in |
@SukkaW This can be closed 🥳 |
Fixed by #357 (hopefully) and included in v3.8.2. |
Version
Since v3.8.0, v3.8.1 still have the issue.
v3.7.0 works as expected.
Reproduction repo
Steps
eslint --debug .
, everything goes fineUSE_TYPESCRIPT_RESOLVER
totrue
, and runeslint --debug .
again.ESLint will stuck at
eslint:languages:js Scope analysis successful
messageThe text was updated successfully, but these errors were encountered: