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
I get this error when I run eslint with eslint-config-airbnb in my project written in gatsby.js.
SyntaxError: Cannot read config file: C:\Users\vanvilecks\Desktop\prj\tmp\gatsby-demo\node_modules\eslint-config-airbnb\whitespace.js
Error: Unexpected end of JSON input
Referenced from: C:\Users\vanvilecks\Desktop\prj\tmp\gatsby-demo\.eslintrc.js
at JSON.parse (<anonymous>)
at Object.<anonymous> (C:\Users\vanvilecks\Desktop\prj\tmp\gatsby-demo\node_modules\eslint-config-airbnb\whitespace.js:54:25)
at Module._compile (C:\Users\vanvilecks\Desktop\prj\tmp\gatsby-demo\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at Object.module.exports [as default] (C:\Users\vanvilecks\Desktop\prj\tmp\gatsby-demo\node_modules\import-fresh\index.js:32:59)
at loadJSConfigFile (C:\Users\vanvilecks\Desktop\prj\tmp\gatsby-demo\node_modules\@eslint\eslintrc\dist\eslintrc.cjs:2531:47)
at loadConfigFile (C:\Users\vanvilecks\Desktop\prj\tmp\gatsby-demo\node_modules\@eslint\eslintrc\dist\eslintrc.cjs:2615:20)
Activity
ljharb commentedon Jan 13, 2022
What version are you using of eslint and eslint-config-airbnb?
ljharb commentedon Jan 13, 2022
https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb/whitespace.js#L54 basically parses https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb/whitespace-async.js#L49 which should only be outputting JSON, so i'm not sure what's breaking here.
vanvilecks-not-dead commentedon Jan 13, 2022
"eslint-config-airbnb": "^19.0.2" and "eslint": "^8.4.1"
vanvilecks-not-dead commentedon Jan 13, 2022
Hmm, so the error is elsewhere?
Okay, I'll keep looking for the error. Thanks for the answer)
ljharb commentedon Jan 13, 2022
I'm not saying that just yet - I'm just not sure how this could be erroring.
What's
import-fresh? is that something of yours, or something eslint uses?ljharb commentedon Jan 13, 2022
Also, what's your eslint config look like?
ljharb commentedon Mar 6, 2022
Closing for now, since there’s no response to my questions.
kapilsriram commentedon Dec 27, 2022
I am facing the exact issue, whenever I use "airbnb/whitespace" I get this error

eslint 8.2.0
this package: latest