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

fix: Disallow trailing commas in cli template code to match the generated prettier config #1493

Merged
merged 5 commits into from
Jun 28, 2023

Conversation

dcottr
Copy link
Contributor

@dcottr dcottr commented Jun 27, 2023

Closes #1492

✅ Checklist

  • I have followed every step in the contributing guide (updated 2022-10-06).
  • The PR title follows the convention we established conventional-commit
  • I performed a functional test on my final commit

Changelog

  • Disallow trailing commas in cli template code to match the generated prettier config

Screenshots

N/A

💯

@vercel
Copy link

vercel bot commented Jun 27, 2023

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

Name Status Preview Comments Updated (UTC)
create-t3-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2023 11:05pm
t3-upgrade 🔄 Building (Inspect) Jun 27, 2023 11:05pm

@changeset-bot
Copy link

changeset-bot bot commented Jun 27, 2023

🦋 Changeset detected

Latest commit: 6ed21f2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-t3-app Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link

vercel bot commented Jun 27, 2023

@dcottr is attempting to deploy a commit to the t3-oss Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 27, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 99
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100
🔴 PWA 30

Lighthouse ran on https://create-t3-app-git-fork-dcottr-next-t3-oss.vercel.app/

@dcottr
Copy link
Contributor Author

dcottr commented Jun 27, 2023

I feel like this got out of hand in terms of diff size, lmk if the preference is to just allow trailing commas on the generated project (that would make the diff smaller). I assumed the preference is to keep the generated app as simple and with as barebone configs as possible

Copy link
Member

@juliusmarminge juliusmarminge left a comment

Choose a reason for hiding this comment

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

@dcottr
Copy link
Contributor Author

dcottr commented Jun 27, 2023

The default should be ES5: https://prettier.io/docs/en/options.html#trailing-commas

Good call thanks, switched it to override to es5 & re-ran prettier.

@juliusmarminge juliusmarminge added this pull request to the merge queue Jun 28, 2023
Merged via the queue into t3-oss:next with commit a230d9f Jun 28, 2023
24 of 25 checks passed
devvianto605 pushed a commit to devvianto605/create-devviantex-nextjs-app that referenced this pull request Jun 9, 2024
…ated prettier config (t3-oss#1493)

* fix: Make the prettier config in template consistent with generated prettier config (disallow trailing newlines)

* chore: add changeset

* For some reason pnpm format didn't catch these

* Override  trailing commaconfig to the  true default value (es5, not none)

* chore: Make the changelog describe the change more clearly now that it's changed to es5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📌 area: cli Relates to the CLI 📌 area: t3-app Relates to the generated T3 App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Prettier strips trailing commas in default generated index.tsx NextAuth function
2 participants