1

Is there an extension or setting in vscode that will show an error when an import or require path is not entered correctly or doesn't resolve.

For example, I would like vscode to underline or highlight this line because lodash/gets is not correct.

const _get = require('lodash/gets'); <--- error

Or, can vscode underline or highlight any custom module pointing to the wrong path?

const myModule = require('../../some/wrong/path/to/my/module'); <--- error
1
  • What language is this, JS? Please edit to add the tag for it. FWIW, this works in Python using e.g. PyLint. Commented Oct 20, 2025 at 16:39

1 Answer 1

0

You can do it with ESLint, the ESLint import plugin and the ESLint extension for VSCode. Alternately, if you're using Deno, you can use the Deno extension for VSCode

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.