-
Notifications
You must be signed in to change notification settings - Fork 844
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
[Docs only] Various fixes/cleanups with demo code imports #5641
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a473452
Account for `// @ts-ignore` before imports on Typescript demos
cee-chen 54debb3
Add regex comment breakdown
cee-chen 714e377
Merge branch 'main' into docs/fix-ts-ignore-imports
cee-chen fb804b3
Setup for React import regex - comment blocks, var naming
cee-chen f9f317e
Add react import regex & position
cee-chen c4329bc
Fix newline spacing between import groups
cee-chen 11d2011
Fix missing `@` character causing `@emotion/react` import not to be p…
cee-chen 1d3e5b9
Clean up remaining import regex
cee-chen 9d718ef
Fix CodeSandbox not using cleaned up demo source code
cee-chen de3040d
Handle source code with no EUI imports
cee-chen 7566542
Fix React imports that sit below other imports lines gobbling the imp…
cee-chen 2f10904
Fix consistent newline spacing between import groups once and for all…
cee-chen f2142bf
Fix Typescript CodeSandboxes not opening directly to the demo file
cee-chen c4018d6
Merge branch 'main' into docs/fix-ts-ignore-imports
cee-chen 78c6c71
Fix babel config to not throw errors when running jest tests on src-d…
cee-chen b9abdda
remove inaccurate dedent comments
cee-chen 8de5313
Missed a __dirName (??)
cee-chen 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
const baseConfig = require('../.babelrc.js'); | ||
const index = baseConfig.plugins.indexOf( | ||
'./scripts/babel/proptypes-from-ts-props' | ||
`${__dirname}/scripts/babel/proptypes-from-ts-props` | ||
); | ||
baseConfig.plugins.splice( | ||
index + 1, | ||
0, | ||
'./scripts/babel/react-docgen-typescript' | ||
`${__dirname}/../scripts/babel/react-docgen-typescript` | ||
); | ||
module.exports = baseConfig; |
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
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
Oops, something went wrong.
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.
@chandlerprall I have no idea why this works but I cribbed it from parcel-bundler/parcel#1698 (comment) and it seems to solve the broken Jest tests 🙈 I also don't really know why this one needs
../
and the previous one doesn't, hahaaFWIW though I ran
yarn start
,yarn test-unit
, andyarn build-pack
and all of them ran with no errors with this change (and the new regex unit tests do show up as expected inyarn test-unit
🎉)