Closed
Description
Bug
Current Behavior
If this library used to lint several projects at once - only first project paths are taken into account (and they are also exposed to other projects)
Desired Behavior
Each project paths should be resolved according to this project tsconfig.json file.
Requirements to reproduce this bug
- There should be at least two folders with "subprojects" inside root folder, for example "app1" and "app2"
- Each subproject folder should contain it's own tsconfig.json and .eslintrc.js file
- Each .eslintrc.js file should contain it's own settings for import/resolver, which points to current subproject folder (or tsconfig.json file), e.g.:
settings: {
'import/resolver': {
typescript: {
directory: __dirname
}
}
}
- Run
eslint . --ext .ts
from the root folder to validate all subrojects at once
Suggested Solution
Currently in source code if this library function initMappers
invokes only once at the very start. To fix this bug this function should be invoked again if new set of options is passed (this situation will happen if there is several eslintrc configs with different import/resolver settings.
Workarounds
There is two possible workarounds, which can be used till this bug will be fixed:
- Run eslint for each project separately
- Use single .eslintrc file at the root folder which will contain references to tsconfig.json files in each project.
Metadata
Metadata
Assignees
Labels
No labels