Skip to content
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

applySuggestions hangs on "Opening editor..." #347

Open
eddie-dunn opened this issue Mar 7, 2024 · 3 comments
Open

applySuggestions hangs on "Opening editor..." #347

eddie-dunn opened this issue Mar 7, 2024 · 3 comments

Comments

@eddie-dunn
Copy link

image

I ran eslint-interactive via npx. OS is Fedora Silverblue 39.

@mizdra
Copy link
Owner

mizdra commented Apr 24, 2024

@eddie-dunn I think this is the same as #328. Could you try the solution described in the issue?

@eddie-dunn
Copy link
Author

It might be related -- whlie EDITOR is set in my shell, fish, I don't remember if I used fish when I reported the "Opening editor..." issue.

Unfortunately, I cannot try again as I'm now getting this error:

❯ npx eslint-interactive .
✖ Linting...
Error: Could not find config file.
    at locateConfigFileToUse (/var/home/username/.npm/_npx/81916b408d06f96a/node_modules/eslint/lib/eslint/eslint.js:348:21)
    at async calculateConfigArray (/var/home/username/.npm/_npx/81916b408d06f96a/node_modules/eslint/lib/eslint/eslint.js:383:49)
    at async ESLint.lintFiles (/var/home/username/.npm/_npx/81916b408d06f96a/node_modules/eslint/lib/eslint/eslint.js:790:25)
    at Core.lint (/var/home/username/.npm/_npx/81916b408d06f96a/node_modules/eslint-interactive/src/core.ts:64:19)

I'm assuming it's looking for an eslint config file? The repo does have one:

❯ ls -al | grep eslintrc
-rw-r--r--. 1 username username   5918 25 mar 11.24 .eslintrc.js

@mizdra
Copy link
Owner

mizdra commented Apr 30, 2024

Probably because eslint-interactive is using ESLint v9. ESLint v9 loads the flat config by default, not the legacy config. The .eslintrc.js is not loaded by default because it is a legacy config.

To load the legacy config, start eslint-interactive with the ESLINT_USE_FLAT_CONFIG=false environment variable set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants