Enhancement: Need different style of project service determination for react-native mixed package #9901
Closed
4 tasks done
Labels
awaiting response
Issues waiting for a reply from the OP or another party
enhancement
New feature or request
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
Before You File a Proposal Please Confirm You Have Done The Following...
Relevant Package
typescript-estree
My proposal is suitable for this project
Description
This link suggested I open an issue explaining my use case:
https://typescript-eslint.io/troubleshooting/typed-linting/#allowdefaultproject-glob-too-wide
I have a problem enabling the project service in my eslint.
I have a mixed directory of both react-native-web and native files ie:
lib/datePicker.tsx
lib/datePicker.ios.tsx
And have setup my React native and my web to correctly read only the correct files, which is the standard way suggested by react-native (or at least it was when I did it)
The problem with the typescript is I may have packages that are available on web, but not on a react-native or vice versa so I end up with two different typescript "packages" that I am building, my website and my app. The app lives under /app/tsconfig.json which prefers .ios files if it exists
and the web lives under /tsconfig.json which ignores .ios files
But for lint I am able to just have one eslint config that covers all of my files.
My problem with the project service is that it wants to use the closest tsconfig to my file, but my .ios files are scattered throughout my whole project so the closest tsconfig.json ends up being wrong one, and the includes don't map correctly.
So, my request is just to let me assign a glob of files to a specific project even though its not the closest, or even just have a default package that can include all of my .ios files that are scattered through my project.
I think this helpful for anyone who uses a system other than "closest file is the best tsconfig" so it could likely help out some monorepo cases too.
Additional Info
No response
The text was updated successfully, but these errors were encountered: