'Eslint & Typescript: Cannot find module of aliased path
Im working in a monorepo. Under root>packages>eslint-plugin>tsconfig I set some path aliases for the plugin. This plugin is getting loaded in a project under root>company>project It looks like it does not resolve that path. My tsconfig:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"Styleguide/*": ["./*"]
}
}
}
package.json -> dependencies of the plugin:
"dependencies": {
"@types/jest": "27.4.0",
"@typescript-eslint/parser": "5.9.1",
"eslint-import-resolver-typescript": "^2.5.0",
"jest": "27.4.7",
"ts-jest": "27.1.2",
"ts-node": "9.1.1"
},
"devDependencies": {
"@types/eslint": "7.2.10",
"@types/lodash": "4.14.178",
"@types/node": "^17.0.19",
"@typescript-eslint/experimental-utils": "5.9.1",
"eslint": "7.24.0",
"ts-node": "10.4.0",
"typescript": "4.1.5"
}
As seen I already installed eslint-import-resolver-typescript but it still does not work. Everything works fine since without path aliases, my rules work. Do I need to configure a eslintrc? I have one in my project folder already but not in the plugin.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
