-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
Unexpected end of JSON input #2700
Comments
What version of everything are you using? eslint 8.2 is out of date, try with eslint latest, and make sure you're on the latest of |
i use 19.0.4 of eslint-config-airbnb and v8.30.0 of eslint. Still the same issue. extends": ["eslint:recommended","airbnb/whitespace"], if i replace "airbnb/whitespace" with "airbnb" or even "airbnb/hooks" the issue is resolved. but wont work with whitespace for some reason |
i have 2 different projects, with same issue, in one project, it opens "airbnb/whitespace-async.js" file in my notepad whenever i run "npm run lint" or "eslint ." |
The way the If that file is being opened in your editor then perhaps the executable bit isn't set properly on that file, or perhaps something about your system isn't supporting If it's a problem on all Windows machines, then we might need to change the approach we use to execute the whitespace-async file. |
the problem didnt exist in older versions, only in the latest versions we r facing the issue. Previously we used 18.2.0 with typescript 3.9.10 |
yes, this technique was introduced to be compatible with eslint 8. |
is it possible to fix this thing? or can give me a hint of how to get around this, I can give a try and probably will contribute the update |
I believe that what's required is either finding a package that can sync exec a node file on linux/mac and windows - or, detecting windows, and using an alternative sync approach on windows (all in the whitespace file, to exec the whitespace-async file). |
i don't know what you mean by "seized" here - but certainly if running it directly with node fixes the problem, that might work. |
i mean stopped. cool. I was just checking if "node " does the same thing as it was doing previoulsy |
Yes, it should be unnecessary, but it also doesn't hurt. Want to make a PR? |
yep sure. |
I faced the very same issue recently. So, the problem was the line My fix:
I hope it'will work for someone else |
@kapilsriram hi! Maybe my workaround could help you |
@meta-panic could you please elaborate..? I am facing the same issue . |
@kapilsriram your solution helped. Thankyou👍 |
Looks like the fix worked for many people. IMHO, The PR and the issue both can get resolved. |
I am facing similar issue as mentioned in #2540
whenever I run "eslint ." i am thrown "Unexpected end of JSON input"
The text was updated successfully, but these errors were encountered: