microsoft / vscode-eslint

VSCode extension to integrate eslint into VSCode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VSCode-ESLint doesn't respect a local `moduleResolver`

RobertAKARobin opened this issue · comments

I'm working on something to make ESLint able to resolve Deno modules. I've written a deno-resolver.js that is imported into my .eslintrc.js:

module.exports = {
	...,
	overrides: [
		{
			files: [`*.ts`],
			parser: `@typescript-eslint/parser`,
			parserOptions: {
				moduleResolver: __dirname + `/deno-resolver.js`,
				project: [`./tsconfig.json`]
			},
		},
	],
};

It works in that npx eslint . completes without any warnings or errors. However, the VSCode extension does not appear to respect the modules imported with this custom resolver:

Screen Shot 2022-12-12 at 2 29 32 PM

Why doesn't the ESLint extension have the same result as me running npx eslint . in my CLI?

Repo: https://github.com/RobertAKARobin/eslint-import-debug

This problem comes from the TS language server and not ESLint (see the error code ts(2691))

Closing the issue since. Please report it to the TypeScript team.