-
Notifications
You must be signed in to change notification settings - Fork 361
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
refactor: [M3-8762] - only-export-components
for Tanstack routes
#11142
Merged
Conversation
This file contains 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
abailly-akamai
force-pushed
the
M3-8762
branch
from
October 23, 2024 16:33
2755fdb
to
7f608f9
Compare
abailly-akamai
force-pushed
the
M3-8762
branch
from
October 23, 2024 19:29
86a10af
to
c79a20f
Compare
abailly-akamai
requested review from
dwiley-akamai and
bnussman-akamai
and removed request for
a team
October 23, 2024 20:32
Coverage Report: ✅ |
bnussman-akamai
changed the title
refactor: [M3-8762]
refactor: [M3-8762] - Oct 24, 2024
only-export-components
for Tanstack routesonly-export-components
for Tanstack routes
bnussman-akamai
approved these changes
Oct 24, 2024
dwiley-akamai
approved these changes
Oct 24, 2024
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.
No adverse impacts observed in Cloud ✅
Cloud Manager E2E Run #6732
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Passed #6732
|
Run duration | 28m 02s |
Commit |
82f3542ba2: refactor: [M3-8762] - `only-export-components` for Tanstack routes (#11142)
|
Committer | Alban Bailly |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
3
|
Pending |
2
|
Skipped |
0
|
Passing |
445
|
View all changes introduced in this branch ↗︎ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description 📝
This PR only intends to avoid degradation of the developer experience with with HMR invalidates and fast refresh, specifically (now) for the routes, considering how high in the tree they are. It does nothing to functionality or UI, just prevents potential future regressions with fast refresh when the Tanstack Router migration is well under.
source
We sometimes get warnings related to this in the console when touching some files while developing. The linting will now provide insight when this is happening in our files, and the fixing can be done on a per case basis. They may not always be important to fix, but a good reminder to separate concerns and keep React happy and doing its thing.
Usually the resolution is to avoid combining Component and function exports within the same file by extracting either into its own file. It can also sometimes be related to wrong capping of your function/component.
Note
Here is the gist, taken from the eslint rule page:
export *
are not supported and will be reported as a warning( ex
const CMS = () => <></>; export { CMS }
)Changes 🔄
only-export-components
eslint ruleHow to test 🧪
Verification steps
I frankly am not too sure how to repro the fast refresh errors in the console consistently, so the verification steps here should be making sure that there's no regression in the application. This PR is more preventive than anything else.
As an Author I have considered 🤔
Check all that apply