Search code examples
npmeslintvisual-studio-2019prettier

How can I tell what version of ESLint Visual Studio 2019 is running?


I'm trying to run ESLint on Visual Studio 2019. It works fine until I add eslint-plugin-prettier in my package.json. Then I get this error.

internal-error | (ESLint) Failed to load plugin prettier: Cannot find module 'eslint-plugin-prettier'

If I open the command prompt I can run eslint and it has no trouble finding the prettier plugin.

My next step is to go into the ESLint source code, find that error, and figure out where it's looking for "eslint-plugin-prettier". But I can't figure out what copy of ESLint Visual Studio is running. It works even if I uninstall ESLint both locally and globally, so I guess it's running an internal copy?

Is there a way to find out for sure what copy of ESLint Visual Studio is running?


Solution

  • I also wanted to find this information, and here is what I did:

    1. Go to C:\Users\\{YourWindowsUsername}\AppData\Local\Microsoft\TypeScript\ESLint.
    2. Open the package.json file.
    3. You should see the version of ESLint that is installed, in my case it is "eslint": "4.19.1" for example.