Skip to content
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

chore: housekeeping 2 - emit ts-sourcemaps & monorepo config stuff #103

Merged
merged 11 commits into from
May 28, 2023

Conversation

juliusmarminge
Copy link
Collaborator

@juliusmarminge juliusmarminge commented May 26, 2023

  • this allows jump-to-definition for the internal packages directly from the example apps - previously we just got to the /dist/*.d.ts file
CleanShot.2023-05-26.at.23.38.09.mp4
  • adds a standard prettier config along with import sorter
  • adds a shared tsup config
  • uses the shared tsconfigs more
  • standardizes the examples (make the structure the same for app and pages)

@changeset-bot
Copy link

changeset-bot bot commented May 26, 2023

⚠️ No Changeset found

Latest commit: cc02cdd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented May 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-uploadthing ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2023 8:01am

@juliusmarminge juliusmarminge changed the title chore: emit ts-sourcemaps chore: emit ts-sourcemaps & monorepo config stuff May 26, 2023
Comment on lines +16 to +19
async onSuccess() {
// emit sourcemap to enable jump to definition
execSync("pnpm tsc --project tsconfig.sourcemap.json");
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the stuff that generates the sourcemaps that allows jump-to-definition

@juliusmarminge juliusmarminge changed the title chore: emit ts-sourcemaps & monorepo config stuff chore: housekeeping 2 - emit ts-sourcemaps & monorepo config stuff May 26, 2023
"@ianvs/prettier-plugin-sort-imports",
"prettier-plugin-tailwindcss",
],
importOrder: [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add "<TYPES>" to the end of the sort order? Mixing type imports with regular imports gets a bit confusing at times.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you want separate type imports? so like

import { foo } from "foo";
import type { Bar } from "foo";

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly.

Copy link
Member

@t3dotgg t3dotgg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not excited for the merge conflict I'm about to eat on the v4 PR lol

@juliusmarminge
Copy link
Collaborator Author

Not excited for the merge conflict I'm about to eat on the v4 PR lol

DW I'll resolve it all 😇

Copy link
Collaborator

@markflorkowski markflorkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits.

.vscode/settings.json Outdated Show resolved Hide resolved
@@ -115,10 +117,13 @@ The `@uploadthing/solid` package includes an "Uploader" component that you can s
```tsx copy
// You need to import our styles for the button to look right. Best to import in the root /layout.tsx but this is fine
import "@uploadthing/solid/styles.css";

import { type VoidComponent } from "solid-js";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything we can do to prefer

import type { ... } from "some-package"

over

import { type ... } from "some-package"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if there is a way to force you to change inline-type to separate ones, but with the current setup the auto fix is set to use separate-types.

Maybe the eslint-plugin-import has an option for this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CleanShot.2023-05-28.at.10.00.03.mp4

now only top-level are allowed

@juliusmarminge juliusmarminge merged commit 5e88dd3 into main May 28, 2023
@juliusmarminge juliusmarminge deleted the ts-sourcemaps branch November 9, 2023 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants