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
Running any combination of eslint through via the terminal works as expected, picking up the project config correctly, but the vscode extension just moans about:
Parsing error: ESLint was configured to run on `src/services/user.service.ts` using `parserOptions.project`: <tsconfigRootDir>/tsconfig.json
However, that TSConfig does not include this file. Either:
- Change ESLint's list of included files to not include this file
- Change that TSConfig to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file
This same error appears at the beginning of the every project file, regardless of location, and so no actual linting takes place. I've tried various ways to force the extension to pick up the project config, but sadly nothing has worked. I would expect the extension to simply honour the project config files without further customisation, but instead the extension just seems to ignore all configuration (whether set in project files or VSCode settings).
[Info - 11:27:39] ESLint server is starting.
[Info - 11:27:39] ESLint server running in node v18.18.2
[Info - 11:27:39] ESLint server is running.
[Info - 11:27:39] ESLint library loaded from: ./node_modules/eslint/lib/api.js
[Error - 11:27:40] Server process exited with code 0.
Note: no debug output, wrong node version, etc.
Expected result (from terminal)
$ npx eslint src
...
./src/services/user.service.ts
21:8 error Import name `_` must match one of the following formats: camelCase @typescript-eslint/naming-convention
185:15 error 'user.id' is assigned to itself no-self-assign
✖ 10 problems (10 errors, 0 warnings)
The text was updated successfully, but these errors were encountered:
Can you please provide me with a GitHub repository I can clone with a minimal setup that demos what you are seeing. Otherwise it is hard to tell since something like this can happen due to many things
I am seeing the same issue. I am not sure from where it is picking this node version specifically. I don't have it installed on my system. I tried using eslint.nodePath to hardcode the version to v20.11.1 but it didn't respect the configuration. I tried creating a new react app using npx create-react-app and it still behaves the same
ESLint debug output:
[Info - 6:46:48 PM] ESLint server is starting.
[Info - 6:46:49 PM] ESLint server running in node v18.18.2
[Info - 6:46:49 PM] ESLint server is running.
[Error - 8:31:24 AM] Server process exited with code 0.
[Info - 6:46:50 PM] ESLint library loaded from: /Users/sahil/repos/test-app/node_modules/eslint/lib/api.js
@sahilanguralla it uses the node version that comes with VS Code. If you want to use a custom node version you need to set eslint.runtime. The nodePath value points to pathes to load node modules from.
Running any combination of eslint through via the terminal works as expected, picking up the project config correctly, but the vscode extension just moans about:
This same error appears at the beginning of the every project file, regardless of location, and so no actual linting takes place. I've tried various ways to force the extension to pick up the project config, but sadly nothing has worked. I would expect the extension to simply honour the project config files without further customisation, but instead the extension just seems to ignore all configuration (whether set in project files or VSCode settings).
Config files
Even trying to add overrides in the VSCode settings don't seem to have any effect:
ESLint output:
Note: no debug output, wrong node version, etc.
Expected result (from terminal)
The text was updated successfully, but these errors were encountered: