You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 eslint-config-airbnb as well.
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 ."
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 execSync of an executable JS file. It's possible this happens on any Windows machine, but I'd be pretty surprised if you were the first Windows user to use the whitespace config.
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.
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).
Activity
ljharb commentedon Dec 27, 2022
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
eslint-config-airbnb
as well.kapilsriram commentedon Dec 28, 2022
i use 19.0.4 of eslint-config-airbnb and v8.30.0 of eslint. Still the same issue.
this is what i have in my eslint.json
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
kapilsriram commentedon Dec 28, 2022
kapilsriram commentedon Dec 28, 2022
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 ."
ljharb commentedon Dec 28, 2022
The way the
eslint-config-airbnb/whitespace
file works is it executes https://unpkg.com/browse/eslint-config-airbnb@19.0.4/whitespace-async.js - which is an executable node program - and it outputs JSON.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
execSync
of an executable JS file. It's possible this happens on any Windows machine, but I'd be pretty surprised if you were the first Windows user to use the whitespace config.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.
kapilsriram commentedon Dec 29, 2022
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
ljharb commentedon Dec 29, 2022
yes, this technique was introduced to be compatible with eslint 8.
kapilsriram commentedon Dec 30, 2022
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
ljharb commentedon Dec 30, 2022
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).
kapilsriram commentedon Jan 2, 2023
by adding "node " to the command, the issue seized, is this the expected functionality? we are only trying to run the js file in node isnt?
ljharb commentedon Jan 2, 2023
i don't know what you mean by "seized" here - but certainly if running it directly with node fixes the problem, that might work.
kapilsriram commentedon Jan 3, 2023
i mean stopped. cool. I was just checking if "node " does the same thing as it was doing previoulsy
ljharb commentedon Jan 3, 2023
Yes, it should be unnecessary, but it also doesn't hurt. Want to make a PR?
kapilsriram commentedon Jan 6, 2023
yep sure.
8 remaining items