microsoft / vscode-eslint

VSCode extension to integrate eslint into VSCode
MIT License
1.69k stars 322 forks source link

Getting code actions from ''ESLint'' #1055

Closed artmsv closed 2 years ago

artmsv commented 3 years ago

Issue Type: Performance Issue

I got a performance regression after an update of VSCode insider, not sure which version was working fine, updated on 08.26.2020 - 08.27.2020. Today decided to report an issue.

I found a couple of similar problems:

https://github.com/microsoft/vscode-eslint/issues/999 https://github.com/microsoft/vscode/issues/102956

settings.json

"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
    "source.fixAll": false,
    "source.fixAll.eslint": true
},

ESlint node module version: v6.8.0 (didn't change)

Extension version: 2.1.8 VS Code version: Code - Insiders 1.49.0-insider (6384e3246884694cbc34eacc70281ada15e2c7f2, 2020-08-28T16:02:16.834Z) OS version: Darwin x64 19.6.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz (4 x 3100)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|2, 4, 6| |Memory (System)|16.00GB (0.42GB free)| |Process Argv|-psn_0_421991 --crash-reporter-id d4eda43b-3842-4492-8d6b-78ceef6890ab| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 14 82 39168 code-insiders main 5 66 39173 gpu-process 0 16 39174 utility 8 246 39176 window (~/Development/project/component.js) 0 98 39659 extensionHost 0 49 39669 electron_node tsserver.js 0 311 39670 electron_node tsserver.js 0 33 39676 electron_node typingsInstaller.js typesMap.js 0 49 39673 /Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Renderer).app/Contents/MacOS/Code - Insiders Helper (Renderer) /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=39659 0 49 39677 electron_node server.js 113 639 39841 electron_node eslintServer.js 0 16 39665 watcherService 0 0 40223 /bin/zsh -l 1 82 39660 shared-process 0 0 41238 /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 2 66 41236 window (Issue Reporter) ```
Workspace Info ``` | Window (~/Development/project/component.js) | Folder (project): 2715 files | File types: html(896) js(699) json(335) png(74) svg(24) eot(6) ttf(6) | woff(6) css(5) map(5) | Conf files: launch.json(1) package.json(1) | Launch Configs: pwa-node; ```
dbaeumer commented 3 years ago

Without a reproducible case this is very hard to track down. Almost all cases I have seen so far result in high CPU usage in the eslint npm module itself. To verify that you could use the setting eslint.debug which prints a performance trace to the ESLint channel.

Can you provide me with a GitHub repository I can clone that demos what you are experiencing.

artmsv commented 3 years ago

@dbaeumer Unfortunately I can't share the project but let me try with debug info.

dbaeumer commented 3 years ago

@h3xsoul thanks. Let me know what you find out.

Dirk

vscodebot[bot] commented 3 years ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

timroes commented 3 years ago

I've having the same issue on a couple of repositories regularily. One of the repositories where I can reproduce it always is EUI. Just opening that project and trying to save a file a couple of times, usually from around the 5th saving on it'll always be in that state where it's stuck in the "Getting code actions from ESLint" phase. eslint.debug does not seem to produce any helpful information for me: https://gist.github.com/timroes/9f15a78f5fc1ed1e1b3cecb94f9195d5

When I hit saving in the stuck mode, no new lines will appear in the log. I know that other people working on that repository are having the same issue, so I hope with that above repo it should be easily reproducible. I've also enabled all other checks, to make sure it's really stuck on the ESLint check and not one of the TypeScript code actions.

It seems to happen OS independent (fails at least on Linux and Mac).

Please let me know if I can provide any additional information.

cc @chandlerprall @cchaos

dbaeumer commented 3 years ago

@timroes actually the trace is helpful. It shows that the linting hangs in the ESLint npm library. The 2020-10-06T15:02:34.292Z eslint:linter Verify should at some point be closed with something like eslint:cli-engine Linting complete in:

dbaeumer commented 3 years ago

@timroes I tried to reproduce this using the repository you pointed out. Any more steps you can provide (e.g. which file to save and what to type beforehand)

timroes commented 3 years ago

@dbaeumer for me it happens pretty regularily. I e.g. just edited the combo_box.tsx file in a couple of places and saved it a couple of times and it got stuck. In general I don't have noticed any specific steps or actions I took, than just coding, saving and after some saves it's stuck.

JonasBa commented 3 years ago

Happens pretty regularly to me too, with the message ': Getting code actions from ''ESLint', 'TypeScript Importer'' (configure)' I tried disabling the ts import plugin but it didnt solve the issue.

dbaeumer commented 3 years ago

@timroes I tried again with the repository you provided but without any success. But I have to say I didn't make any meaningful changes. Not an expert in the code. When this happens to you the next time could you provide me with the content of the file when it gets stuck. May that helps to track this down.

dbaeumer commented 3 years ago

And two general question

cchaos commented 3 years ago

I can attest to @timroes' problem as I personally had the same issue with the same repository a while back. It would definitely throttle my CPU and I'd always have click "Cancel" where it would skip the auto-formatting and then save the file.

I can't remember exactly what my previous configuration in my settings file was, though something similar to what the OP pasted. I removed all of those configs and I now just have the following relevant settings:

  "editor.formatOnSave": true,
  "eslint.format.enable": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode"

The editor saves and formats on save properly now.

FloodGames commented 3 years ago

It keeps coming up for me too since the latest releases from Eslint I guess. image

dbaeumer commented 3 years ago

I believe all of you that you see this. But without me being able to reproduce it there is very little I can do. So if someone has steps please provide them here. Or if someone is willing to debug please ping as well. I can provide steps on how to do this.

myasonik commented 3 years ago

@dbaeumer Happy to debug with your guidance. I can consistently trigger the hanging issue with any change right now so I'm not sure I can provide an repro steps other than "try saving a file..."

I'll hold off making @cchaos's recommended config changes for a few days so that I don't risk changing anything before getting to the bottom of this.

dbaeumer commented 3 years ago

@myasonik thanks for your willingness to debug this. Highly appreciated. Here are the steps:

When you hit the problem go back to the first instance of VS Code

capture

Can you then provide me with the call stack. I will then see what additional information we can obtain to be able to reproduce this.

timroes commented 3 years ago

I am having "excessive saving issues", in the form that I hit "save" very very often while typing (like a couple of times per minutes). Sometimes I guess I hit it when the code is not even in a compilable state. I wonder if that could be related to that issue, because I had - while watching this behavior over the weekend - the feeling it happens more often when it's trying to reformat (prettier via eslint) in a state, where the code is not actually parseable. Sorry, haven't had the time to really debug it, but maybe @myasonik this can help reproducing this.

myasonik commented 3 years ago

Welp, I finally got around to this and I can't reproduce it after being able to reproduce it consistently for two days. (And I haven't touched the repo nor any settings in since then.) Banged at it for nearly an hour with no luck.

The only trace I could get is this one though it seems to just be a warning that wasn't causing any issues...

stack trace: SyntaxError: Unexpected token, expected ";" (89:78)
    at _class.raise (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:4028:15)
    at _class.unexpected (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:5343:16)
    at _class.semicolon (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:5327:40)
    at _class.parseVarStatement (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:7729:10)
    at _class.parseStatementContent (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:7327:21)
    at _class.parseStatementContent (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:10082:58)
    at _class.parseStatement (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:7277:17)
    at _class.parseBlockOrModuleBlockBody (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:7829:23)
    at _class.parseBlockBody (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:7816:10)
    at _class.parseTopLevel (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:7242:10)
    at _class.parse (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:8642:17)
    at parse (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/@babel/parser/lib/index.js:10648:38)
    at parse (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/import-cost/dist/src/babelParser.js:67:28)
    at getPackages (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/import-cost/dist/src/babelParser.js:60:13)
    at getPackages (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/import-cost/dist/src/parser.js:16:41)
    at Object._callee$ (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/import-cost/dist/src/index.js:43:47)
    at tryCatch (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.invoke [as _invoke] (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
    at Generator.next (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
    at step (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/import-cost/dist/src/index.js:21:191)
    at /Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/import-cost/dist/src/index.js:21:437
    at new Promise (<anonymous>)
    at Timeout._onTimeout (/Users/myasonik/.vscode/extensions/wix.vscode-import-cost-2.12.0/node_modules/import-cost/dist/src/index.js:21:99)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
just-Bri commented 3 years ago

Just stopping by to say I have this same message popup almost every time I save a .tsx file in a React project.

I tried adding/removing options from the settings.json:

  "editor.formatOnSave": true,
  "eslint.format.enable": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode"

Tried enabling/disabling each of those but nothing changes the behaviour.

dbaeumer commented 3 years ago

@myasonik thanks a lot for trying!!

@reifnotreef can you share that repository with steps to reproduce?

just-Bri commented 3 years ago

@reifnotreef can you share that repository with steps to reproduce?

Unfortunately no, it's a private work repo. My first guess is a specific setting we have but I haven't been able to find anything that would cause it in our config files etc.

FloodGames commented 3 years ago

At this point in time, it doesn't seem to get stuck anymore (latest vscode, eslint or just the act of upgrading did it?)

just-Bri commented 3 years ago

My current, relevant, settings are:

  "editor.formatOnSave": false,
  "eslint.format.enable": false,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll": false,
    "source.organizeImports": false,
    "source.fixAll.eslint": true
  },

I did make sure that I have the latest prettier/eslint via npm i -g.
It still pops up every now and then, but it doesn't hang for nearly as long as it used to.
I have all of vs-code's formatting turned off and rely on eslint/prettier specifically.

dbaeumer commented 3 years ago

Can really no one share a repository with me we I can reproduce this?

cchaos commented 3 years ago

The repo that some of us have been having trouble with this in is https://github.com/elastic/eui

timroes commented 3 years ago

@cchaos @myasonik I'd be curious if it happens to you after the latest VSCode upgrade still. I've upgraded last week and worked the weekend on a project, where it didn't happen that often as in EUI, but still often enough to notice, and I haven't had a single issue ont he whole weekend in that repo. But haven't checked yet if it also disappeared for EUI, maybe one of you already tried with the new VSCode version.

dbaeumer commented 3 years ago

I again played with https://github.com/elastic/eui without success. @cchaos which file are you usually editing when you see this.

artmsv commented 3 years ago

@dbaeumer I started using the stable version of VSCode since the settings sync feature was added to it. But since then, nor Insider nor Stable version didn't have any issues of saving with eslint. This problem just disappeared without updating eslint dependency in repo or plugin. Couldn't reproduce it and debug since then, sorry about that. Might it be dependent on platform? I didn't see the same issue on Linux or Windows, only on Mac. Just FYI.

dbaeumer commented 3 years ago

@h3xsoul thanks for reaching back. I actually doubt that this is platform dependent. I still think that it hangs in some ESlint library / plugin. May be switching to a different platform installed a different version of a dependency.

myasonik commented 3 years ago

I got a trace!

<anonymous> (/Users/myasonik/workspace/eui/node_modules/deasync/index.js:69)
getPortSync (/Users/myasonik/workspace/eui/src-docs/webpack.config.js:149)
<anonymous> (/Users/myasonik/workspace/eui/src-docs/webpack.config.js:123)
<anonymous> (<node_internals>/internal/modules/cjs/loader.js:1014)
<anonymous> (<node_internals>/internal/modules/cjs/loader.js:1051)
<anonymous> (<node_internals>/internal/modules/cjs/loader.js:862)
<anonymous> (<node_internals>/internal/modules/cjs/loader.js:774)
<anonymous> (<node_internals>/electron/js2c/asar.js:769)
<anonymous> (<node_internals>/internal/modules/cjs/loader.js:899)
require (<node_internals>/internal/modules/cjs/helpers.js:74)
<anonymous> (/Users/myasonik/workspace/eui/node_modules/eslint-import-resolver-webpack/index.js:83)
v2 (/Users/myasonik/workspace/eui/node_modules/eslint-module-utils/resolve.js:117)
withResolver (/Users/myasonik/workspace/eui/node_modules/eslint-module-utils/resolve.js:122)
fullResolve (/Users/myasonik/workspace/eui/node_modules/eslint-module-utils/resolve.js:139)
relative (/Users/myasonik/workspace/eui/node_modules/eslint-module-utils/resolve.js:84)
resolve (/Users/myasonik/workspace/eui/node_modules/eslint-module-utils/resolve.js:220)
checkSourceValue (/Users/myasonik/workspace/eui/node_modules/eslint-plugin-import/lib/rules/no-unresolved.js:29)
checkSourceValue (/Users/myasonik/workspace/eui/node_modules/eslint-module-utils/moduleVisitor.js:29)
checkCommon (/Users/myasonik/workspace/eui/node_modules/eslint-module-utils/moduleVisitor.js:60)
<anonymous> (/Users/myasonik/workspace/eui/node_modules/eslint-module-utils/moduleVisitor.js:97)
<anonymous> (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/safe-emitter.js:45)
emit (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/safe-emitter.js:45)
applySelector (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/node-event-generator.js:254)
applySelectors (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/node-event-generator.js:283)
enterNode (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/node-event-generator.js:297)
enterNode (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711)
<anonymous> (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/linter.js:952)
runRules (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/linter.js:947)
_verifyWithoutProcessors (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/linter.js:1173)
_verifyWithConfigArray (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/linter.js:1271)
verify (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/linter.js:1226)
verifyAndFix (/Users/myasonik/workspace/eui/node_modules/eslint/lib/linter/linter.js:1416)
verifyText (/Users/myasonik/workspace/eui/node_modules/eslint/lib/cli-engine/cli-engine.js:224)
executeOnText (/Users/myasonik/workspace/eui/node_modules/eslint/lib/cli-engine/cli-engine.js:882)
<anonymous> (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1280)
withCLIEngine (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1334)
validate (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1278)
<anonymous> (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1205)
Promise.then (Unknown Source:1)
validateSingle (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1200)
<anonymous> (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1062)
processQueue (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1049)
<anonymous> (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1006)
processImmediate (Unknown Source:439)
Immediate (Unknown Source:1)
init (<node_internals>/internal/inspector_async_hook.js:21)
emitInitNative (Unknown Source:136)
emitInitScript (Unknown Source:345)
initAsyncResource (Unknown Source:147)
Immediate (Unknown Source:215)
setImmediate (Unknown Source:271)
trigger (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1004)
addNotificationMessage (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:993)
<anonymous> (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1090)
processTicksAndRejections (Unknown Source:94)
Promise.then (Unknown Source:1)
<anonymous> (/Users/myasonik/personal-workspace/vscode-eslint/server/src/eslintServer.ts:1086)
invoke (/Users/myasonik/personal-workspace/vscode-eslint/server/node_modules/vscode-jsonrpc/lib/common/events.js:55)
fire (/Users/myasonik/personal-workspace/vscode-eslint/server/node_modules/vscode-jsonrpc/lib/common/events.js:117)
<anonymous> (/Users/myasonik/personal-workspace/vscode-eslint/server/node_modules/vscode-languageserver/lib/common/server.js:127)
handleNotification (/Users/myasonik/personal-workspace/vscode-eslint/server/node_modules/vscode-jsonrpc/lib/common/connection.js:547)
processMessageQueue (/Users/myasonik/personal-workspace/vscode-eslint/server/node_modules/vscode-jsonrpc/lib/common/connection.js:289)
<anonymous> (/Users/myasonik/personal-workspace/vscode-eslint/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276)
processImmediate (Unknown Source:439)
Immediate (Unknown Source:1)
init (<node_internals>/internal/inspector_async_hook.js:21)
emitInitNative (Unknown Source:136)
emitInitScript (Unknown Source:345)
initAsyncResource (Unknown Source:147)
Immediate (Unknown Source:215)
setImmediate (Unknown Source:271)
setImmediate (/Users/myasonik/personal-workspace/vscode-eslint/server/node_modules/vscode-jsonrpc/lib/node/ril.js:147)
triggerMessageQueue (/Users/myasonik/personal-workspace/vscode-eslint/server/node_modules/vscode-jsonrpc/lib/common/connection.js:274)
callback (/Users/myasonik/personal-workspace/vscode-eslint/server/node_modules/vscode-jsonrpc/lib/common/connection.js:324)
emit (Unknown Source:223)
emit (<node_internals>/internal/child_process.js:876)
processTicksAndRejections (Unknown Source:82)
TickObject (Unknown Source:1)
init (<node_internals>/internal/inspector_async_hook.js:21)
emitInitNative (Unknown Source:136)
emitInitScript (Unknown Source:345)
nextTick (Unknown Source:132)
handleMessage (<node_internals>/internal/child_process.js:885)
<anonymous> (<node_internals>/internal/child_process.js:574)

And in case it's relevent, some random settings that seem related?

"eslint.format.enable": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": { "source.fixAll": true },
olafurkarl commented 3 years ago

I had this issue today, which I believe was triggered by me importing an enormous javascript data file (>3MB). Making eslint ignore the file, and then doing 'Clear Editor History' made the issue go away. Before clearing history the issue would linger.

dbaeumer commented 3 years ago

@myasonik thanks.

Interestingly the linter hangs on a configuration file of the repository which tries to sync get a port. I am pretty sure that this can hang the same in the terminal.

I am not sure what the ESLint extension can do about this except offering a command to reload ESLint. Does anyone know why the validation of a file in ESLint needs to load a webpack configuration file.

chandlerprall commented 3 years ago

Does anyone know why the validation of a file in ESLint needs to load a webpack configuration file.

Looks like its the eslint-import-resolver-webpack plugin, which makes sense. We can clean up the sync port detection in the project to avoid it when not explicitly running the dev server.

timroes commented 3 years ago

I've checked the other project where this happened for me. No eslint-import-resolver-webpack in there, but eslint-import-resolver-node (via react-scripts since it's a Create React App application). Maybe this is having similar problems.

timroes commented 3 years ago

I am not sure what the ESLint extension can do about this except offering a command to reload ESLint.

Reloading eslint would already be a huge benefit. I am so far always using the "Developer: Reload Window", but only reloading eslint would be nicer. I am wondering if there might be different plugins which can be stuck in that way and if vscode-eslint could be "more smart" about detecting those hangs independent on what crashed freezes eslint somehow? (Don't know the internals of this plugin to know if there's a possibility for this.)

dbaeumer commented 3 years ago

I will look into providing a reload command. Detecting these cases is not easy. I will look into whether I can auto attach a debugger and then try to get a stack dump when the server becomes unresponsive for a certain time.

timroes commented 3 years ago

Could there be a setting like killAfter that could automatically trigger the reload after it became unresponsive for some time? This could be off by default so users not running into those problems will never be affected by it, but for us in this thread knowing we might run into it we could use it to automatically have eslint reload?

dbaeumer commented 3 years ago

Actually I am not a fan of this since it will not help to track down the underlying reason. I will first try to see if I can programmatically attach a debugger and then try to collect a stack trace to see why it is hanging.

ThaJay commented 3 years ago

It seems to happen reliably for me when I start up the editor and when create a new file in a project that has circular depedencies.

If I let it sit for 10 minutes or more, it usually comes back to a fast state.

dbaeumer commented 3 years ago

Circular project dependencies or files.

eurobob commented 3 years ago

I started a new project to try and get to the bottom of this, and for me the hanging on code actions occurred once I tried to include this plugin: eslint-plugin-import-order-alphabetical

package.json

  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^4.7.0",
    "@typescript-eslint/parser": "^4.7.0",
    "eslint": "^7.13.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-config-prettier": "^6.15.0",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-import-order-alphabetical": "^1.0.1",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-prettier": "^3.1.4",
    "eslint-plugin-react": "^7.21.5",
    "prettier": "^2.1.2",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "react-native": "^0.63.3",
    "typescript": "^4.0.5"
  }

.eslintrc

{
    "extends": [
        "airbnb",
        "prettier",
        "eslint:recommended",
        "plugin:@typescript-eslint/eslint-recommended",
        "plugin:@typescript-eslint/recommended"
    ],
    "plugins": ["prettier", "@typescript-eslint"],
    "rules": {
        "prettier/prettier": ["error"]
    },
    "parser": "@typescript-eslint/parser"
}

tsconfig.json

{
    "compilerOptions": {
        "outDir": "web",
        "module": "esnext",
        "target": "es5",
        "lib": [
            "es6",
            "dom",
            "es2016",
            "es2017"
        ],
        "sourceMap": true,
        "allowJs": false,
        "jsx": "react",
        "declaration": true,
        "moduleResolution": "node",
        "allowSyntheticDefaultImports": true,
        "forceConsistentCasingInFileNames": true,
        "noImplicitReturns": true,
        "noImplicitThis": true,
        "noImplicitAny": true,
        "strictNullChecks": true,
        "suppressImplicitAnyIndexErrors": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "baseUrl": ".",
        "paths": {
            "@components/*": [
                "src/components/*"
            ],
            "@types": [
                "src/types/index.tsx"
            ]
        }
    },
    "include": [
        "src"
    ],
    "exclude": [
        "node_modules",
        "web",
        "native",
        "src/**/*.native.tsx"
    ]
}

.prettierrc

{
    "semi": true,
    "trailingComma": "all",
    "singleQuote": true,
    "printWidth": 70
}
charkour commented 3 years ago

@eurobob, is it possible you have settings configured in your workspace or user level in VSCode to auto-organize imports in addition to the ESLint alphabetize? I was experiencing the "Getting Code Actions" hanging behavior when I had two conflicting formatters trying to organize my imports in different ways. One was an ESLint rule and the other was in my editor workspace settings. Removing one solved the hanging issue but I couldn't find a way to get both to work together.

dbaeumer commented 3 years ago

@eurobob can you share that setup in a repository I can clone including some source files showing the problem.

sepehr500 commented 3 years ago

This drove me crazy for a long time. But I figured out what was happening. In my case, vscode had accidentally auto imported import { collapseTextChangeRangesAcrossMultipleVersions } from "typescript"; and I didn't notice. This is what was causing eslint to be super slow. When I removed it things were back to normal. Not why eslint is analyzing npm modules like this, but maybe we should add a flag to ignore them?

dbaeumer commented 3 years ago

@sepehr500 in this setup do you see a slow down when running eslint in the terminal?

NicolasBuecher commented 3 years ago

Hello guys, I'm running into this issue for 3 days now, in a private repo (sorry) using Typescript.

On other repos using only JS, everything works great.

As I recently switched to this TS repo, I'm not sure if the issue came with the recent Typescript support or not. I can see in my settings.json file that I was using the depreciated eslint.validate: [typescript, typescriptreact] and I don't remember having trouble last time I used the repo.

I've to say I'm the only one of my team having the issue for now (also the only one using Windows), although we're several to use VSCode.

eslint (v7.12.1), typescript-eslint/eslint-plugin (v4.6.1) and typescript-eslint/parser (v4.6.1) are in the devDependencies, we don't use anything globally installed.

I put some dirty code in a file and when I run:

node_modules/eslint/bin/eslint.js ./src/core/Scene/Scene.ts

I get exactly what I'm expecting from the linter:

/fakePath/src/core/Scene/Scene.ts
  77:5   error  Unexpected console statement                  no-console
  78:1   error  Expected indentation of 4 spaces but found 6  @typescript-eslint/indent
  78:7   error  Unexpected console statement                  no-console
  78:23  error  Trailing spaces not allowed                   no-trailing-spaces
  79:1   error  Trailing spaces not allowed                   no-trailing-spaces

✖ 5 problems (5 errors, 0 warnings)
  3 errors and 0 warnings potentially fixable with the `--fix` option.

So I guess eslint works fine. BUT, VSCode doesn't lint anything: image

Here is the ESLint output console
    
[Info  - 22:47:30] ESLint server is starting
[Info  - 22:47:30] ESLint server running in node v12.14.1
[Info  - 22:47:30] ESLint server is running.
[Info  - 22:47:31] ESLint library loaded from: D:\fakePath\node_modules\eslint\lib\api.js
2020-11-20T21:47:31.900Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: 'D:\\fakePath', loose: false } ]
2020-11-20T21:47:31.902Z eslint:ignore-pattern   processed: { basePath: 'D:\\fakePath', patterns: [ '/**/node_modules/*' ] }
2020-11-20T21:47:31.902Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: 'D:\\fakePath', loose: false } ]
2020-11-20T21:47:31.902Z eslint:ignore-pattern   processed: { basePath: 'D:\\fakePath', patterns: [ '/**/node_modules/*' ] }
2020-11-20T21:47:32.354Z eslint:rules Loading rule 'accessor-pairs' (remaining=281)
2020-11-20T21:47:32.359Z eslint:rules Loading rule 'array-bracket-newline' (remaining=280)
2020-11-20T21:47:32.360Z eslint:rules Loading rule 'array-bracket-spacing' (remaining=279)
2020-11-20T21:47:32.362Z eslint:rules Loading rule 'array-callback-return' (remaining=278)
2020-11-20T21:47:32.363Z eslint:rules Loading rule 'array-element-newline' (remaining=277)
2020-11-20T21:47:32.365Z eslint:rules Loading rule 'arrow-body-style' (remaining=276)
2020-11-20T21:47:32.366Z eslint:rules Loading rule 'arrow-parens' (remaining=275)
2020-11-20T21:47:32.367Z eslint:rules Loading rule 'arrow-spacing' (remaining=274)
2020-11-20T21:47:32.368Z eslint:rules Loading rule 'block-scoped-var' (remaining=273)
2020-11-20T21:47:32.369Z eslint:rules Loading rule 'block-spacing' (remaining=272)
2020-11-20T21:47:32.370Z eslint:rules Loading rule 'brace-style' (remaining=271)
2020-11-20T21:47:32.371Z eslint:rules Loading rule 'callback-return' (remaining=270)
2020-11-20T21:47:32.371Z eslint:rules Loading rule 'camelcase' (remaining=269)
2020-11-20T21:47:32.373Z eslint:rules Loading rule 'capitalized-comments' (remaining=268)
2020-11-20T21:47:32.375Z eslint:rules Loading rule 'class-methods-use-this' (remaining=267)
2020-11-20T21:47:32.376Z eslint:rules Loading rule 'comma-dangle' (remaining=266)
2020-11-20T21:47:32.378Z eslint:rules Loading rule 'comma-spacing' (remaining=265)
2020-11-20T21:47:32.379Z eslint:rules Loading rule 'comma-style' (remaining=264)
2020-11-20T21:47:32.380Z eslint:rules Loading rule 'complexity' (remaining=263)
2020-11-20T21:47:32.381Z eslint:rules Loading rule 'computed-property-spacing' (remaining=262)
2020-11-20T21:47:32.382Z eslint:rules Loading rule 'consistent-return' (remaining=261)
2020-11-20T21:47:32.383Z eslint:rules Loading rule 'consistent-this' (remaining=260)
2020-11-20T21:47:32.384Z eslint:rules Loading rule 'constructor-super' (remaining=259)
2020-11-20T21:47:32.385Z eslint:rules Loading rule 'curly' (remaining=258)
2020-11-20T21:47:32.386Z eslint:rules Loading rule 'default-case' (remaining=257)
2020-11-20T21:47:32.387Z eslint:rules Loading rule 'default-case-last' (remaining=256)
2020-11-20T21:47:32.388Z eslint:rules Loading rule 'default-param-last' (remaining=255)
2020-11-20T21:47:32.389Z eslint:rules Loading rule 'dot-location' (remaining=254)
2020-11-20T21:47:32.390Z eslint:rules Loading rule 'dot-notation' (remaining=253)
2020-11-20T21:47:32.393Z eslint:rules Loading rule 'eol-last' (remaining=252)
2020-11-20T21:47:32.394Z eslint:rules Loading rule 'eqeqeq' (remaining=251)
2020-11-20T21:47:32.395Z eslint:rules Loading rule 'for-direction' (remaining=250)
2020-11-20T21:47:32.396Z eslint:rules Loading rule 'func-call-spacing' (remaining=249)
2020-11-20T21:47:32.397Z eslint:rules Loading rule 'func-name-matching' (remaining=248)
2020-11-20T21:47:32.399Z eslint:rules Loading rule 'func-names' (remaining=247)
2020-11-20T21:47:32.400Z eslint:rules Loading rule 'func-style' (remaining=246)
2020-11-20T21:47:32.401Z eslint:rules Loading rule 'function-call-argument-newline' (remaining=245)
2020-11-20T21:47:32.402Z eslint:rules Loading rule 'function-paren-newline' (remaining=244)
2020-11-20T21:47:32.403Z eslint:rules Loading rule 'generator-star-spacing' (remaining=243)
2020-11-20T21:47:32.404Z eslint:rules Loading rule 'getter-return' (remaining=242)
2020-11-20T21:47:32.404Z eslint:rules Loading rule 'global-require' (remaining=241)
2020-11-20T21:47:32.405Z eslint:rules Loading rule 'grouped-accessor-pairs' (remaining=240)
2020-11-20T21:47:32.406Z eslint:rules Loading rule 'guard-for-in' (remaining=239)
2020-11-20T21:47:32.406Z eslint:rules Loading rule 'handle-callback-err' (remaining=238)
2020-11-20T21:47:32.407Z eslint:rules Loading rule 'id-blacklist' (remaining=237)
2020-11-20T21:47:32.408Z eslint:rules Loading rule 'id-denylist' (remaining=236)
2020-11-20T21:47:32.408Z eslint:rules Loading rule 'id-length' (remaining=235)
2020-11-20T21:47:32.409Z eslint:rules Loading rule 'id-match' (remaining=234)
2020-11-20T21:47:32.410Z eslint:rules Loading rule 'implicit-arrow-linebreak' (remaining=233)
2020-11-20T21:47:32.410Z eslint:rules Loading rule 'indent' (remaining=232)
2020-11-20T21:47:32.414Z eslint:rules Loading rule 'indent-legacy' (remaining=231)
2020-11-20T21:47:32.415Z eslint:rules Loading rule 'init-declarations' (remaining=230)
2020-11-20T21:47:32.416Z eslint:rules Loading rule 'jsx-quotes' (remaining=229)
2020-11-20T21:47:32.417Z eslint:rules Loading rule 'key-spacing' (remaining=228)
2020-11-20T21:47:32.417Z eslint:rules Loading rule 'keyword-spacing' (remaining=227)
2020-11-20T21:47:32.418Z eslint:rules Loading rule 'line-comment-position' (remaining=226)
2020-11-20T21:47:32.419Z eslint:rules Loading rule 'linebreak-style' (remaining=225)
2020-11-20T21:47:32.420Z eslint:rules Loading rule 'lines-around-comment' (remaining=224)
2020-11-20T21:47:32.420Z eslint:rules Loading rule 'lines-around-directive' (remaining=223)
2020-11-20T21:47:32.421Z eslint:rules Loading rule 'lines-between-class-members' (remaining=222)
2020-11-20T21:47:32.422Z eslint:rules Loading rule 'max-classes-per-file' (remaining=221)
2020-11-20T21:47:32.422Z eslint:rules Loading rule 'max-depth' (remaining=220)
2020-11-20T21:47:32.423Z eslint:rules Loading rule 'max-len' (remaining=219)
2020-11-20T21:47:32.424Z eslint:rules Loading rule 'max-lines' (remaining=218)
2020-11-20T21:47:32.424Z eslint:rules Loading rule 'max-lines-per-function' (remaining=217)
2020-11-20T21:47:32.425Z eslint:rules Loading rule 'max-nested-callbacks' (remaining=216)
2020-11-20T21:47:32.426Z eslint:rules Loading rule 'max-params' (remaining=215)
2020-11-20T21:47:32.426Z eslint:rules Loading rule 'max-statements' (remaining=214)
2020-11-20T21:47:32.427Z eslint:rules Loading rule 'max-statements-per-line' (remaining=213)
2020-11-20T21:47:32.428Z eslint:rules Loading rule 'multiline-comment-style' (remaining=212)
2020-11-20T21:47:32.429Z eslint:rules Loading rule 'multiline-ternary' (remaining=211)
2020-11-20T21:47:32.429Z eslint:rules Loading rule 'new-cap' (remaining=210)
2020-11-20T21:47:32.430Z eslint:rules Loading rule 'new-parens' (remaining=209)
2020-11-20T21:47:32.431Z eslint:rules Loading rule 'newline-after-var' (remaining=208)
2020-11-20T21:47:32.431Z eslint:rules Loading rule 'newline-before-return' (remaining=207)
2020-11-20T21:47:32.432Z eslint:rules Loading rule 'newline-per-chained-call' (remaining=206)
2020-11-20T21:47:32.433Z eslint:rules Loading rule 'no-alert' (remaining=205)
2020-11-20T21:47:32.433Z eslint:rules Loading rule 'no-array-constructor' (remaining=204)
2020-11-20T21:47:32.434Z eslint:rules Loading rule 'no-async-promise-executor' (remaining=203)
2020-11-20T21:47:32.435Z eslint:rules Loading rule 'no-await-in-loop' (remaining=202)
2020-11-20T21:47:32.435Z eslint:rules Loading rule 'no-bitwise' (remaining=201)
2020-11-20T21:47:32.436Z eslint:rules Loading rule 'no-buffer-constructor' (remaining=200)
2020-11-20T21:47:32.436Z eslint:rules Loading rule 'no-caller' (remaining=199)
2020-11-20T21:47:32.437Z eslint:rules Loading rule 'no-case-declarations' (remaining=198)
2020-11-20T21:47:32.438Z eslint:rules Loading rule 'no-catch-shadow' (remaining=197)
2020-11-20T21:47:32.438Z eslint:rules Loading rule 'no-class-assign' (remaining=196)
2020-11-20T21:47:32.439Z eslint:rules Loading rule 'no-compare-neg-zero' (remaining=195)
2020-11-20T21:47:32.439Z eslint:rules Loading rule 'no-cond-assign' (remaining=194)
2020-11-20T21:47:32.440Z eslint:rules Loading rule 'no-confusing-arrow' (remaining=193)
2020-11-20T21:47:32.441Z eslint:rules Loading rule 'no-console' (remaining=192)
2020-11-20T21:47:32.442Z eslint:rules Loading rule 'no-const-assign' (remaining=191)
2020-11-20T21:47:32.442Z eslint:rules Loading rule 'no-constant-condition' (remaining=190)
2020-11-20T21:47:32.443Z eslint:rules Loading rule 'no-constructor-return' (remaining=189)
2020-11-20T21:47:32.443Z eslint:rules Loading rule 'no-continue' (remaining=188)
2020-11-20T21:47:32.444Z eslint:rules Loading rule 'no-control-regex' (remaining=187)
2020-11-20T21:47:32.448Z eslint:rules Loading rule 'no-debugger' (remaining=186)
2020-11-20T21:47:32.449Z eslint:rules Loading rule 'no-delete-var' (remaining=185)
2020-11-20T21:47:32.450Z eslint:rules Loading rule 'no-div-regex' (remaining=184)
2020-11-20T21:47:32.450Z eslint:rules Loading rule 'no-dupe-args' (remaining=183)
2020-11-20T21:47:32.451Z eslint:rules Loading rule 'no-dupe-class-members' (remaining=182)
2020-11-20T21:47:32.452Z eslint:rules Loading rule 'no-dupe-else-if' (remaining=181)
2020-11-20T21:47:32.452Z eslint:rules Loading rule 'no-dupe-keys' (remaining=180)
2020-11-20T21:47:32.453Z eslint:rules Loading rule 'no-duplicate-case' (remaining=179)
2020-11-20T21:47:32.454Z eslint:rules Loading rule 'no-duplicate-imports' (remaining=178)
2020-11-20T21:47:32.454Z eslint:rules Loading rule 'no-else-return' (remaining=177)
2020-11-20T21:47:32.456Z eslint:rules Loading rule 'no-empty' (remaining=176)
2020-11-20T21:47:32.456Z eslint:rules Loading rule 'no-empty-character-class' (remaining=175)
2020-11-20T21:47:32.457Z eslint:rules Loading rule 'no-empty-function' (remaining=174)
2020-11-20T21:47:32.458Z eslint:rules Loading rule 'no-empty-pattern' (remaining=173)
2020-11-20T21:47:32.458Z eslint:rules Loading rule 'no-eq-null' (remaining=172)
2020-11-20T21:47:32.459Z eslint:rules Loading rule 'no-eval' (remaining=171)
2020-11-20T21:47:32.459Z eslint:rules Loading rule 'no-ex-assign' (remaining=170)
2020-11-20T21:47:32.460Z eslint:rules Loading rule 'no-extend-native' (remaining=169)
2020-11-20T21:47:32.463Z eslint:rules Loading rule 'no-extra-bind' (remaining=168)
2020-11-20T21:47:32.464Z eslint:rules Loading rule 'no-extra-boolean-cast' (remaining=167)
2020-11-20T21:47:32.465Z eslint:rules Loading rule 'no-extra-label' (remaining=166)
2020-11-20T21:47:32.467Z eslint:rules Loading rule 'no-extra-parens' (remaining=165)
2020-11-20T21:47:32.468Z eslint:rules Loading rule 'no-extra-semi' (remaining=164)
2020-11-20T21:47:32.468Z eslint:rules Loading rule 'no-fallthrough' (remaining=163)
2020-11-20T21:47:32.469Z eslint:rules Loading rule 'no-floating-decimal' (remaining=162)
2020-11-20T21:47:32.470Z eslint:rules Loading rule 'no-func-assign' (remaining=161)
2020-11-20T21:47:32.471Z eslint:rules Loading rule 'no-global-assign' (remaining=160)
2020-11-20T21:47:32.471Z eslint:rules Loading rule 'no-implicit-coercion' (remaining=159)
2020-11-20T21:47:32.472Z eslint:rules Loading rule 'no-implicit-globals' (remaining=158)
2020-11-20T21:47:32.473Z eslint:rules Loading rule 'no-implied-eval' (remaining=157)
2020-11-20T21:47:32.473Z eslint:rules Loading rule 'no-import-assign' (remaining=156)
2020-11-20T21:47:32.474Z eslint:rules Loading rule 'no-inline-comments' (remaining=155)
2020-11-20T21:47:32.475Z eslint:rules Loading rule 'no-inner-declarations' (remaining=154)
2020-11-20T21:47:32.475Z eslint:rules Loading rule 'no-invalid-regexp' (remaining=153)
2020-11-20T21:47:32.476Z eslint:rules Loading rule 'no-invalid-this' (remaining=152)
2020-11-20T21:47:32.477Z eslint:rules Loading rule 'no-irregular-whitespace' (remaining=151)
2020-11-20T21:47:32.478Z eslint:rules Loading rule 'no-iterator' (remaining=150)
2020-11-20T21:47:32.478Z eslint:rules Loading rule 'no-label-var' (remaining=149)
2020-11-20T21:47:32.479Z eslint:rules Loading rule 'no-labels' (remaining=148)
2020-11-20T21:47:32.480Z eslint:rules Loading rule 'no-lone-blocks' (remaining=147)
2020-11-20T21:47:32.481Z eslint:rules Loading rule 'no-lonely-if' (remaining=146)
2020-11-20T21:47:32.481Z eslint:rules Loading rule 'no-loop-func' (remaining=145)
2020-11-20T21:47:32.482Z eslint:rules Loading rule 'no-loss-of-precision' (remaining=144)
2020-11-20T21:47:32.483Z eslint:rules Loading rule 'no-magic-numbers' (remaining=143)
2020-11-20T21:47:32.483Z eslint:rules Loading rule 'no-misleading-character-class' (remaining=142)
2020-11-20T21:47:32.487Z eslint:rules Loading rule 'no-mixed-operators' (remaining=141)
2020-11-20T21:47:32.488Z eslint:rules Loading rule 'no-mixed-requires' (remaining=140)
2020-11-20T21:47:32.488Z eslint:rules Loading rule 'no-mixed-spaces-and-tabs' (remaining=139)
2020-11-20T21:47:32.489Z eslint:rules Loading rule 'no-multi-assign' (remaining=138)
2020-11-20T21:47:32.489Z eslint:rules Loading rule 'no-multi-spaces' (remaining=137)
2020-11-20T21:47:32.490Z eslint:rules Loading rule 'no-multi-str' (remaining=136)
2020-11-20T21:47:32.491Z eslint:rules Loading rule 'no-multiple-empty-lines' (remaining=135)
2020-11-20T21:47:32.491Z eslint:rules Loading rule 'no-native-reassign' (remaining=134)
2020-11-20T21:47:32.492Z eslint:rules Loading rule 'no-negated-condition' (remaining=133)
2020-11-20T21:47:32.493Z eslint:rules Loading rule 'no-negated-in-lhs' (remaining=132)
2020-11-20T21:47:32.493Z eslint:rules Loading rule 'no-nested-ternary' (remaining=131)
2020-11-20T21:47:32.494Z eslint:rules Loading rule 'no-new' (remaining=130)
2020-11-20T21:47:32.495Z eslint:rules Loading rule 'no-new-func' (remaining=129)
2020-11-20T21:47:32.495Z eslint:rules Loading rule 'no-new-object' (remaining=128)
2020-11-20T21:47:32.496Z eslint:rules Loading rule 'no-new-require' (remaining=127)
2020-11-20T21:47:32.497Z eslint:rules Loading rule 'no-new-symbol' (remaining=126)
2020-11-20T21:47:32.497Z eslint:rules Loading rule 'no-new-wrappers' (remaining=125)
2020-11-20T21:47:32.498Z eslint:rules Loading rule 'no-obj-calls' (remaining=124)
2020-11-20T21:47:32.498Z eslint:rules Loading rule 'no-octal' (remaining=123)
2020-11-20T21:47:32.499Z eslint:rules Loading rule 'no-octal-escape' (remaining=122)
2020-11-20T21:47:32.500Z eslint:rules Loading rule 'no-param-reassign' (remaining=121)
2020-11-20T21:47:32.500Z eslint:rules Loading rule 'no-path-concat' (remaining=120)
2020-11-20T21:47:32.501Z eslint:rules Loading rule 'no-plusplus' (remaining=119)
2020-11-20T21:47:32.502Z eslint:rules Loading rule 'no-process-env' (remaining=118)
2020-11-20T21:47:32.502Z eslint:rules Loading rule 'no-process-exit' (remaining=117)
2020-11-20T21:47:32.503Z eslint:rules Loading rule 'no-promise-executor-return' (remaining=116)
2020-11-20T21:47:32.504Z eslint:rules Loading rule 'no-proto' (remaining=115)
2020-11-20T21:47:32.505Z eslint:rules Loading rule 'no-prototype-builtins' (remaining=114)
2020-11-20T21:47:32.505Z eslint:rules Loading rule 'no-redeclare' (remaining=113)
2020-11-20T21:47:32.506Z eslint:rules Loading rule 'no-regex-spaces' (remaining=112)
2020-11-20T21:47:32.507Z eslint:rules Loading rule 'no-restricted-exports' (remaining=111)
2020-11-20T21:47:32.508Z eslint:rules Loading rule 'no-restricted-globals' (remaining=110)
2020-11-20T21:47:32.508Z eslint:rules Loading rule 'no-restricted-imports' (remaining=109)
2020-11-20T21:47:32.510Z eslint:rules Loading rule 'no-restricted-modules' (remaining=108)
2020-11-20T21:47:32.511Z eslint:rules Loading rule 'no-restricted-properties' (remaining=107)
2020-11-20T21:47:32.511Z eslint:rules Loading rule 'no-restricted-syntax' (remaining=106)
2020-11-20T21:47:32.512Z eslint:rules Loading rule 'no-return-assign' (remaining=105)
2020-11-20T21:47:32.513Z eslint:rules Loading rule 'no-return-await' (remaining=104)
2020-11-20T21:47:32.513Z eslint:rules Loading rule 'no-script-url' (remaining=103)
2020-11-20T21:47:32.514Z eslint:rules Loading rule 'no-self-assign' (remaining=102)
2020-11-20T21:47:32.515Z eslint:rules Loading rule 'no-self-compare' (remaining=101)
2020-11-20T21:47:32.515Z eslint:rules Loading rule 'no-sequences' (remaining=100)
2020-11-20T21:47:32.516Z eslint:rules Loading rule 'no-setter-return' (remaining=99)
2020-11-20T21:47:32.517Z eslint:rules Loading rule 'no-shadow' (remaining=98)
2020-11-20T21:47:32.517Z eslint:rules Loading rule 'no-shadow-restricted-names' (remaining=97)
2020-11-20T21:47:32.518Z eslint:rules Loading rule 'no-spaced-func' (remaining=96)
2020-11-20T21:47:32.518Z eslint:rules Loading rule 'no-sparse-arrays' (remaining=95)
2020-11-20T21:47:32.519Z eslint:rules Loading rule 'no-sync' (remaining=94)
2020-11-20T21:47:32.520Z eslint:rules Loading rule 'no-tabs' (remaining=93)
2020-11-20T21:47:32.520Z eslint:rules Loading rule 'no-template-curly-in-string' (remaining=92)
2020-11-20T21:47:32.521Z eslint:rules Loading rule 'no-ternary' (remaining=91)
2020-11-20T21:47:32.521Z eslint:rules Loading rule 'no-this-before-super' (remaining=90)
2020-11-20T21:47:32.522Z eslint:rules Loading rule 'no-throw-literal' (remaining=89)
2020-11-20T21:47:32.523Z eslint:rules Loading rule 'no-trailing-spaces' (remaining=88)
2020-11-20T21:47:32.523Z eslint:rules Loading rule 'no-undef' (remaining=87)
2020-11-20T21:47:32.524Z eslint:rules Loading rule 'no-undef-init' (remaining=86)
2020-11-20T21:47:32.524Z eslint:rules Loading rule 'no-undefined' (remaining=85)
2020-11-20T21:47:32.525Z eslint:rules Loading rule 'no-underscore-dangle' (remaining=84)
2020-11-20T21:47:32.526Z eslint:rules Loading rule 'no-unexpected-multiline' (remaining=83)
2020-11-20T21:47:32.526Z eslint:rules Loading rule 'no-unmodified-loop-condition' (remaining=82)
2020-11-20T21:47:32.527Z eslint:rules Loading rule 'no-unneeded-ternary' (remaining=81)
2020-11-20T21:47:32.528Z eslint:rules Loading rule 'no-unreachable' (remaining=80)
2020-11-20T21:47:32.529Z eslint:rules Loading rule 'no-unreachable-loop' (remaining=79)
2020-11-20T21:47:32.530Z eslint:rules Loading rule 'no-unsafe-finally' (remaining=78)
2020-11-20T21:47:32.531Z eslint:rules Loading rule 'no-unsafe-negation' (remaining=77)
2020-11-20T21:47:32.531Z eslint:rules Loading rule 'no-unused-expressions' (remaining=76)
2020-11-20T21:47:32.532Z eslint:rules Loading rule 'no-unused-labels' (remaining=75)
2020-11-20T21:47:32.533Z eslint:rules Loading rule 'no-unused-vars' (remaining=74)
2020-11-20T21:47:32.533Z eslint:rules Loading rule 'no-use-before-define' (remaining=73)
2020-11-20T21:47:32.534Z eslint:rules Loading rule 'no-useless-backreference' (remaining=72)
2020-11-20T21:47:32.535Z eslint:rules Loading rule 'no-useless-call' (remaining=71)
2020-11-20T21:47:32.536Z eslint:rules Loading rule 'no-useless-catch' (remaining=70)
2020-11-20T21:47:32.537Z eslint:rules Loading rule 'no-useless-computed-key' (remaining=69)
2020-11-20T21:47:32.538Z eslint:rules Loading rule 'no-useless-concat' (remaining=68)
2020-11-20T21:47:32.539Z eslint:rules Loading rule 'no-useless-constructor' (remaining=67)
2020-11-20T21:47:32.540Z eslint:rules Loading rule 'no-useless-escape' (remaining=66)
2020-11-20T21:47:32.542Z eslint:rules Loading rule 'no-useless-rename' (remaining=65)
2020-11-20T21:47:32.543Z eslint:rules Loading rule 'no-useless-return' (remaining=64)
2020-11-20T21:47:32.544Z eslint:rules Loading rule 'no-var' (remaining=63)
2020-11-20T21:47:32.546Z eslint:rules Loading rule 'no-void' (remaining=62)
2020-11-20T21:47:32.546Z eslint:rules Loading rule 'no-warning-comments' (remaining=61)
2020-11-20T21:47:32.547Z eslint:rules Loading rule 'no-whitespace-before-property' (remaining=60)
2020-11-20T21:47:32.548Z eslint:rules Loading rule 'no-with' (remaining=59)
2020-11-20T21:47:32.549Z eslint:rules Loading rule 'nonblock-statement-body-position' (remaining=58)
2020-11-20T21:47:32.550Z eslint:rules Loading rule 'object-curly-newline' (remaining=57)
2020-11-20T21:47:32.550Z eslint:rules Loading rule 'object-curly-spacing' (remaining=56)
2020-11-20T21:47:32.553Z eslint:rules Loading rule 'object-property-newline' (remaining=55)
2020-11-20T21:47:32.554Z eslint:rules Loading rule 'object-shorthand' (remaining=54)
2020-11-20T21:47:32.555Z eslint:rules Loading rule 'one-var' (remaining=53)
2020-11-20T21:47:32.555Z eslint:rules Loading rule 'one-var-declaration-per-line' (remaining=52)
2020-11-20T21:47:32.556Z eslint:rules Loading rule 'operator-assignment' (remaining=51)
2020-11-20T21:47:32.557Z eslint:rules Loading rule 'operator-linebreak' (remaining=50)
2020-11-20T21:47:32.558Z eslint:rules Loading rule 'padded-blocks' (remaining=49)
2020-11-20T21:47:32.558Z eslint:rules Loading rule 'padding-line-between-statements' (remaining=48)
2020-11-20T21:47:32.559Z eslint:rules Loading rule 'prefer-arrow-callback' (remaining=47)
2020-11-20T21:47:32.560Z eslint:rules Loading rule 'prefer-const' (remaining=46)
2020-11-20T21:47:32.561Z eslint:rules Loading rule 'prefer-destructuring' (remaining=45)
2020-11-20T21:47:32.562Z eslint:rules Loading rule 'prefer-exponentiation-operator' (remaining=44)
2020-11-20T21:47:32.563Z eslint:rules Loading rule 'prefer-named-capture-group' (remaining=43)
2020-11-20T21:47:32.564Z eslint:rules Loading rule 'prefer-numeric-literals' (remaining=42)
2020-11-20T21:47:32.564Z eslint:rules Loading rule 'prefer-object-spread' (remaining=41)
2020-11-20T21:47:32.565Z eslint:rules Loading rule 'prefer-promise-reject-errors' (remaining=40)
2020-11-20T21:47:32.566Z eslint:rules Loading rule 'prefer-reflect' (remaining=39)
2020-11-20T21:47:32.566Z eslint:rules Loading rule 'prefer-regex-literals' (remaining=38)
2020-11-20T21:47:32.567Z eslint:rules Loading rule 'prefer-rest-params' (remaining=37)
2020-11-20T21:47:32.568Z eslint:rules Loading rule 'prefer-spread' (remaining=36)
2020-11-20T21:47:32.568Z eslint:rules Loading rule 'prefer-template' (remaining=35)
2020-11-20T21:47:32.569Z eslint:rules Loading rule 'quote-props' (remaining=34)
2020-11-20T21:47:32.570Z eslint:rules Loading rule 'quotes' (remaining=33)
2020-11-20T21:47:32.571Z eslint:rules Loading rule 'radix' (remaining=32)
2020-11-20T21:47:32.572Z eslint:rules Loading rule 'require-atomic-updates' (remaining=31)
2020-11-20T21:47:32.573Z eslint:rules Loading rule 'require-await' (remaining=30)
2020-11-20T21:47:32.573Z eslint:rules Loading rule 'require-jsdoc' (remaining=29)
2020-11-20T21:47:32.574Z eslint:rules Loading rule 'require-unicode-regexp' (remaining=28)
2020-11-20T21:47:32.574Z eslint:rules Loading rule 'require-yield' (remaining=27)
2020-11-20T21:47:32.575Z eslint:rules Loading rule 'rest-spread-spacing' (remaining=26)
2020-11-20T21:47:32.576Z eslint:rules Loading rule 'semi' (remaining=25)
2020-11-20T21:47:32.576Z eslint:rules Loading rule 'semi-spacing' (remaining=24)
2020-11-20T21:47:32.577Z eslint:rules Loading rule 'semi-style' (remaining=23)
2020-11-20T21:47:32.578Z eslint:rules Loading rule 'sort-imports' (remaining=22)
2020-11-20T21:47:32.579Z eslint:rules Loading rule 'sort-keys' (remaining=21)
2020-11-20T21:47:32.581Z eslint:rules Loading rule 'sort-vars' (remaining=20)
2020-11-20T21:47:32.582Z eslint:rules Loading rule 'space-before-blocks' (remaining=19)
2020-11-20T21:47:32.582Z eslint:rules Loading rule 'space-before-function-paren' (remaining=18)
2020-11-20T21:47:32.583Z eslint:rules Loading rule 'space-in-parens' (remaining=17)
2020-11-20T21:47:32.584Z eslint:rules Loading rule 'space-infix-ops' (remaining=16)
2020-11-20T21:47:32.584Z eslint:rules Loading rule 'space-unary-ops' (remaining=15)
2020-11-20T21:47:32.585Z eslint:rules Loading rule 'spaced-comment' (remaining=14)
2020-11-20T21:47:32.586Z eslint:rules Loading rule 'strict' (remaining=13)
2020-11-20T21:47:32.586Z eslint:rules Loading rule 'switch-colon-spacing' (remaining=12)
2020-11-20T21:47:32.587Z eslint:rules Loading rule 'symbol-description' (remaining=11)
2020-11-20T21:47:32.588Z eslint:rules Loading rule 'template-curly-spacing' (remaining=10)
2020-11-20T21:47:32.588Z eslint:rules Loading rule 'template-tag-spacing' (remaining=9)
2020-11-20T21:47:32.589Z eslint:rules Loading rule 'unicode-bom' (remaining=8)
2020-11-20T21:47:32.590Z eslint:rules Loading rule 'use-isnan' (remaining=7)
2020-11-20T21:47:32.590Z eslint:rules Loading rule 'valid-jsdoc' (remaining=6)
2020-11-20T21:47:32.597Z eslint:rules Loading rule 'valid-typeof' (remaining=5)
2020-11-20T21:47:32.598Z eslint:rules Loading rule 'vars-on-top' (remaining=4)
2020-11-20T21:47:32.599Z eslint:rules Loading rule 'wrap-iife' (remaining=3)
2020-11-20T21:47:32.600Z eslint:rules Loading rule 'wrap-regex' (remaining=2)
2020-11-20T21:47:32.601Z eslint:rules Loading rule 'yield-star-spacing' (remaining=1)
2020-11-20T21:47:32.602Z eslint:rules Loading rule 'yoda' (remaining=0)
2020-11-20T21:47:34.013Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: 'D:\\fakePath', loose: false } ]
2020-11-20T21:47:34.014Z eslint:ignore-pattern   processed: { basePath: 'D:\\fakePath', patterns: [ '/**/node_modules/*' ] }
2020-11-20T21:47:34.017Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: 'D:\\fakePath', loose: false } ]
2020-11-20T21:47:34.017Z eslint:ignore-pattern   processed: { basePath: 'D:\\fakePath', patterns: [ '/**/node_modules/*' ] }
2020-11-20T21:47:34.017Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: 'D:\\fakePath', loose: false } ]
2020-11-20T21:47:34.017Z eslint:ignore-pattern   processed: { basePath: 'D:\\fakePath', patterns: [ '/**/node_modules/*' ] }
2020-11-20T21:47:34.084Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: 'D:\\fakePath', loose: false } ]
2020-11-20T21:47:34.084Z eslint:ignore-pattern   processed: { basePath: 'D:\\fakePath', patterns: [ '/**/node_modules/*' ] }
2020-11-20T21:47:34.085Z eslint:ignore-pattern Check {
  filePath: 'D:\\fakePath\\src\\core\\Scene\\Scene.ts',
  dot: false,
  relativePath: 'src/core/Scene/Scene.ts',
  result: false
}
2020-11-20T21:47:34.085Z eslint:cli-engine Lint D:\fakePath\src\core\Scene\Scene.ts
2020-11-20T21:47:34.085Z eslint:linter Linting code for D:\fakePath\src\core\Scene\Scene.ts (pass 1)
2020-11-20T21:47:34.085Z eslint:linter Verify
2020-11-20T21:47:34.085Z eslint:linter With ConfigArray: D:\fakePath\src\core\Scene\Scene.ts
    
  

Then, when I update settings.json to format and/or autoFix on save:

{
    "editor.formatOnSave": false,
    "editor.codeActionsOnSave": {
        "source.fixAll": false,
        "source.fixAll.eslint": true,
    }
}

Now I systematically get the never ending pop up (and still the same output in ESLint console):

image

More info about the repo, VSCode and ESLint versions If somehow it can be useful, here is a part of the `package.json` of the repo: ``` { [...] "engines": { "node": ">=12.19.0", "npm": ">=6.14.8" }, "scripts": { [...] }, "dependencies": { [...] }, "devDependencies": { "@babel/plugin-proposal-class-properties": "~7.12.1", "@babel/plugin-transform-runtime": "~7.12.1", "@babel/preset-env": "~7.12.1", "@babel/preset-typescript": "~7.12.1", "@private/babel-preset-node": "~35.2.2", "@private/eslint-config": "~35.2.2", "@private/package-meta": "~35.2.2", "@private/webpack-glsl-loader": "~35.2.2", "@private/webpack-presets": "~35.2.2", "@private/woof-cli": "~35.2.2", "@typescript-eslint/eslint-plugin": "~4.6.1", "@typescript-eslint/parser": "~4.6.1", "babel-loader": "~8.1.0", "copy-webpack-plugin": "~6.3.0", "css-loader": "~4.3.0", "file-loader": "~6.2.0", "fork-ts-checker-webpack-plugin": "~5.2.1", "ip": "~1.1.5", "nanoid": "~3.1.16", "string-replace-loader": "~2.3.0", "style-loader": "~1.2.1", "terser-webpack-plugin": "~4.2.2", "typescript": "~4.0.5", "webpack": "~4.44.2", "webpack-cli": "~3.3.12", "webpack-dev-server": "~3.11.0" } } ``` VSCode version: ``` Version: 1.51.1 (user setup) Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f Date: 2020-11-10T23:34:32.027Z Electron: 9.3.3 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Windows_NT x64 10.0.18363 ``` And ESLint Extension version v2.1.13

Here is all I have, sorry for not introducing any new elements to help us.

sepehr500 commented 3 years ago

@dbaeumer I see the slowdown when running eslint in the terminal as well.

dbaeumer commented 3 years ago

@sepehr500 thanks.

@NicolasBuecher I think your problem is unrelated to the slowness described in these issues since ESLint is not working in your setup in the first place. Are you suing a mono repository?

dbaeumer commented 3 years ago

@NicolasBuecher I would still like to understand why this is happening for you. Would you be able to distil a reproducible case or share the project with me using another channel than a public GitHub repository?

NicolasBuecher commented 3 years ago

@NicolasBuecher I think your problem is unrelated to the slowness described in these issues since ESLint is not working in your setup in the first place. Are you suing a mono repository?

No it's not, there is only one package.json file at the root. But I can tell there are several .eslint.rc files. One at the root and one in ./src. The latter contains thetypescript-eslint rules. Because only ./src dir contains TS files.

Just in case, here is the structure of the project (I opened folders with `.eslint.rc` inside) ![image](https://user-images.githubusercontent.com/6748903/100044258-807d1400-2e0f-11eb-83e3-98ae0728a822.png)

If you think my problem is unrelated, maybe I should stop writing here. I posted as I saw people saying being stuck, not only slowed down.

I'm sorry, I see that you read that quite everytime, but reproducing the project environment would be difficult. I'll try to play with VSCode and ESLint versions. As I'm the only one of my team experiencing that, I have to spot a difference somewhere and I'll tell you if I find something. Looks like other people in my team also have the problem, we'll come back with more info and maybe a repo if it's not just a bad eslint configuration.