-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[import/no-unresolved] not working in our mono-repo from 2.0.0 #37
Comments
Please provide a minimal runnable reproduction, thx. |
Personal idea without approve, you should never use multiple Take https://github.com/1stG/configs/tree/master/packages/eslint-config as an example. Feel free to point out if I'm wrong. |
Or try to add |
I have possibly encountered the same problem: Whenever you run eslint on several files from different sub-packages Please check this repo for reproduction: https://github.com/ZmoNkk/import-resolver-typescript-demo Repro steps:
Result:First file is linted ok, but second file throws Any advice? Possibly this is a misconfiguration on my part, but I have tried different setups and this issue persists. Issue does not appear on |
@ZmoNkk Thx for reproduction, I'll check it ASAP when I'm not so busy. |
@rheaditi @ZmoNkk Please check https://github.com/ZmoNkk/import-resolver-typescript-demo/pull/1/files. I believe you're both misusing I'm going close this issue temporarily, feel free to point out if I'm wrong and I'll reopen it. |
I have below config in config: parserOptions:
ecmaVersion: latest
parser: '@typescript-eslint/parser'
sourceType: module
createDefaultProgram: true
project:
- ./tsconfig.json error:
And the project folder structure is:
if I change I have to use So the question become: how to resolve this? Because if I want to run the app outside of monorepo, it will not work again. |
We recently upgraded to Typescript 3.7 and updated all eslint + prettier related packages. Moving from
eslint-import-resolver-typescript@1.1.1
toeslint-import-resolver-typescript@2.0.0
is leading to moreimport/no-unresolved
errors showing up forpaths
configured intsconfig.json
in the sub-packages.Our structure
. ├── ... ├── .eslintrc.js ├── packages │ ├── a │ │ ├── .eslintrc.js │ │ ├── tsconfig.json │ │ └── package.json │ └── b │ ├── .eslintrc.js │ ├── tsconfig.json │ └── package.json ├── ... ├── package.json ├── lerna.json
We're using multiple
.eslintrc.js
in each directory since the projects are cross platform (node/browser) and have different environments & configurations.Configs
What we've tried
packages/*/tsconfig.json
We downgraded back to
v1.1.1
. 😅Can you help us out? Happy to provide more information as required.
The text was updated successfully, but these errors were encountered: