I'm currently working on implementing path-mapping within a monorepo structure. Despite having existing eslint-plugin-import rules in place, I am encountering an error stating "Unable to resolve path to module" for all mapped imports.
app/
├─ package/
│ ├─ src/
│ ├─ tsconfig.json
.eslintrc
tsconfig.json
The content of .eslintrc is as follows:
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"import",
],
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"settings": {
"import/resolver": {
"typescript": {}
}
}
}
The internal tsconfig.json appears as below:
{
"extends": "../tsconfig",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"actions/*": ["src/actions/*"],
"context/*": ["src/context/*"]
}
}
}
Although the paths are correctly mapped, I am still encountering the lint error "Unable to resolve path to module 'context' whenever I attempt to utilize the mapped path.
Further investigation revealed the necessity of using the eslint-import-resolver-typescript package, but even after incorporating it, the errors persist.