Currently, I am utilizing the vss-web-extension-sdk in my project. To ensure the validity of my files, I have integrated ESLint along with eslint-plugin-import and eslint-import-resolver-typescript.
import { WidgetSettings, WidgetStatus } from "TFS/Dashboards/WidgetContracts";
The above code segment, extracted from my run.ts
file, is triggering the following issue.
Unable to resolve path to module 'TFS/Dashboards/WidgetContracts'. eslint(import/no-unresolved).
Interestingly, when I perform a control-click on the import in VSCode, it correctly navigates to the module in tfs.d.ts
. Is there a mistake on my part causing the resolver to not recognize the module?
In my tsconfig.json
, I have the following configuration:
{
"compilerOptions": {
"module": "amd",
"strict": true,
"moduleResolution": "node",
"types": [
"vss-web-extension-sdk"
]
}
}
Additionally, in my .eslintrc.json
file, I have specified the following settings:
{
"settings": {
"plugins": [
"import"
],
"rules": {
"import/no-unresolved": "error"
},
"import/resolver": {
"typescript": {}
}
}
}
Installation Commands:
npm install --save-dev eslint-plugin-import typescript-eslint-parser eslint-import-resolver-typescript
npm install --save vss-web-extension-sdk