ESLint plugin for VSCode doesn't give IDE feedback on files within symlink directory

Viewed 412

I have a project within a sandbox (linux - centos) that I access from my host (windows 10) machine using the first party Remote - SSH plugin for VSCode from Microsoft.

Within this sandbox I have symlinked directory e.g. /home/developer/ is symlinked to /var/www/

When I use the remote ssh file explorer from VSCode to open my files, they open from the symlink path /home/developer/ etc, and the ESLint plugin for VSCode will never provide realtime IDE indicators of any linting errors.

Instead, within the problems tab of my console, I get an error for each file I have opened:

Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: ../../../../home/developer/html/boilerplate/src/pages/App.vue.
The file must be included in at least one of the projects provided.

However, if I open the file in the absolute original path (/var/www/, I get the feedback I expect in my problems console:

Unexpected console statement.

and I also get the real time IDE feedback.

eslint output of original path vs symlink path

Is there any way to get the ESLint plugin for VSCode to treat the symlink directory in the same manner? I'm not sure why I am getting these differences in behaviour.

I also have an eslintc.cjs file, and here are the parser and parserOptions values:

parser: 'vue-eslint-parser',
  parserOptions: {
    parser: '@typescript-eslint/parser',
    project: 'tsconfig.json',
    sourceType: 'module', // Allows for the use of imports
    extraFileExtensions: ['.vue'],
  },

Any help is very appreciated, thanks.

0 Answers
Related