ESLint: TypeError: this.libOptions.parse is not a function – Code Example

Total
0
Shares

If you are using ESLint 8.23.0 and WebStorm 2022.2.1 or PhpStorm 2022.2.1 then you might be encountering TypeError: this.libOptions.parse is not a function. It’s a bug in ESLint 8.23.0. The ESLint team is working on it and hopefully resolve it soon. Till then the workaround is to downgrade your ESLint version to 8.22.

Solution

Run this command to downgrade the version of ESLint –

npm install [email protected] --save-exact

Or, you can follow these steps –

1. Delete node_modules.

2. Remove package-json.lock file.

3. Change ESLint version from 8.23.0 to 8.22.0 in package.json file.

4. Run npm install


Or, you can run this command –

rm -rf node_modules; rm package-lock.json; npm install