I'm trying to add path-mapping to a monorepo. I already have eslint-plugin-import rules in place, and I'm getting an error "Unable to resolve path to module" on all mapped imports.
app/
├─ package/
│ ├─ src/
│ ├─ tsconfig.json
.eslintrc
tsconfig.json
.eslintrc looks like
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"import",
],
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript
],
"settings": {
"import/resolver": {
"typescript": {}
}
}
}
The inner tsconfig.json looks like:
{
"extends": "../tsconfig",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"actions/*": ["src/actions/*"],
"context/*": ["src/context/*"]
}
}
}
The paths map just fine, but I have the lint error "Unable to resolve path to module 'context' wherever I try to use the mapped path.
Researching this shows I need to use the eslint-import-resolver-typescript package, but it hasn't made the errors go away.