-
Notifications
You must be signed in to change notification settings - Fork 38
Workspaces typescript fixes #3
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
Merged
F1LT3R
merged 6 commits into
react-workspaces:master
from
indigostudio:workspaces-typescript-fixes
Dec 23, 2019
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4b7c4fb
Remove unused functions
pmoleri c8c9853
Don't consider a subpackage as the workspace root
pmoleri 2dec991
Add 'browser' and 'module' package main fields
pmoleri 19e2490
Find react-scripts even when hoisted
pmoleri a754bcf
Set up ForkTsCheckerWebpackPlugin for workspaces
pmoleri e78111b
Disable typescript linting outside main project
pmoleri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering why you thought to remove this?
My best guess is that you didn't see it doing anything for your project, and that you were thinking it was not needed?
Hopefully it was not breaking anything for you in Typescript?
The reason I added, this was so the dev-server does not lint workspace dependencies that were not added to the
package.json
file of the app that is being launched. I think you'll find that without these lines, all of your worspaces withmain:src
in thepackage.json
will be linted when launching your React app from the dev-server, even if the dependencies never get used by the app.The way we are using react-workspaces we currently have 7 apps, and 13 suites of components. Linting 13 suites of components for 7 apps takes a couple minutes; but it takes about 10 seconds for one app. As the monorepo grows, linting unused code gets increasingly expensive, so we would like to avoid this cost.
Interested to get your thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for explaining the rationale, I think watch and linting are working as expected.
I just removed them because they seem to be currently unused in the in master. I only noticed it because VS Code shows them grayed out.
Reviewing the code again... I'll make my own guess :)
I think the functions were renamed and both versions were kept:
and old versions can be safeley removed.
Does that seem right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I see what you mean. I will double check this. Thanks!