One of the modules is causing eslint complaints, even though it is installed and functioning properly in the code.
Error message: Unable to resolve path to module '@azure/functions'.eslintimport/no-unresolved
az/index.ts
import { AzureFunction, Context } from "@azure/functions";
import { SentMessageInfo } from "nodemailer";
.eslintrc.js
module.exports = {
root: true,
env: {
es6: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"google",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["tsconfig.json", "tsconfig.dev.json"],
sourceType: "module",
},
ignorePatterns: [
"/lib/**/*", // Ignore built files.
],
plugins: [
"@typescript-eslint",
"import",
],
rules: {
"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": false,
"MethodDefinition": false,
"ClassDeclaration": false,
"ArrowFunctionExpression": false,
"FunctionExpression": false,
},
}],
},
};
folder structure
|__ .eslintrc.js
|__ az
|__ index.ts