Home > Back-end >  ESLint: TypeError: this.libOptions.parse is not a function
ESLint: TypeError: this.libOptions.parse is not a function

Time:08-28

I was getting started with Next.js on WebStorm 2022.2.1 Build #WS-222.3739.57 I created a new Next.js project with typescript enabled and that's all,

The error is shown below:

TypeError: this.libOptions.parse is not a function

TypeError: this.libOptions.parse is not a function
    at ESLint8Plugin.<anonymous> (C:\Program Files\JetBrains\WebStorm 2022.1.2\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:139:64)
    at step (C:\Program Files\JetBrains\WebStorm 2022.1.2\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:44:23)
    at Object.next (C:\Program Files\JetBrains\WebStorm 2022.1.2\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:25:53)
    at C:\Program Files\JetBrains\WebStorm 2022.1.2\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:19:71
    at new Promise (<anonymous>)
    at __awaiter (C:\Program Files\JetBrains\WebStorm 2022.1.2\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:15:12)
    at ESLint8Plugin.invokeESLint (C:\Program Files\JetBrains\WebStorm 2022.1.2\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:133:16)
    at ESLint8Plugin.<anonymous> (C:\Program Files\JetBrains\WebStorm 2022.1.2\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:120:44)
    at step (C:\Program Files\JetBrains\WebStorm 2022.1.2\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:44:23)
    at Object.next (C:\Program Files\JetBrains\WebStorm 2022.1.2\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:25:53)
Process finished with exit code -1

My node.js is v16.15.1 and eslint version is 8.23.0

This is what my devDependencies looks like;

  "devDependencies": {
    "@types/node": "18.7.13",
    "@types/react": "18.0.17",
    "@types/react-dom": "18.0.6",
    "eslint": "8.23.0",
    "eslint-config-next": "12.2.5",
    "prisma": "^4.2.1",
    "typescript": "4.8.2"
  }

my .eslintrc.json,

{
  "extends": "next/core-web-vitals"
}

CodePudding user response:

The issue is tracked at WEB-57089, please follow it for updates. It's caused by the changes introduced in [email protected] (Offending upstream commit: https://github.com/eslint/eslint/commit/3e5839ecae96aecfbc1ac9526e88e0105e671032#diff-358c9491edc00f0db6f2f3c317df9aa932135803481b86c9289bd56bf8af0622L66), downgrading ESLint should help

  • Related