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

refactor: removing code formatting + upgrading to prettier 3 #688

Merged
merged 5 commits into from
Aug 4, 2023

Conversation

erunion
Copy link
Member

@erunion erunion commented Aug 4, 2023

🧰 Changes

This upgrades our codebase to utilize Prettier 3. Unfortunately because Prettier 3 is now an ESM project, and though they still export CJS, I am having extreme troubles getting it working in our stack so I'm opting to remove it from our codegen SDKs where it was auto-formatting all code we generate.1

I would love to bring this back at some point because I think there's value in having a generated SDK that looks nice, but because these SDKs are still functional it's fine to remove it for now.

Footnotes

  1. Having prettier@3 as a dependency in api was also causing problems with projects that are still using prettier@2 as NPM didn't like to have them installed alongside each other.

@erunion erunion added the refactor Issues about tackling technical debt label Aug 4, 2023
@@ -1,5 +1,5 @@
import type * as types from './types';
import type { ConfigOptions, FetchResponse } from 'api/dist/core';
import type { ConfigOptions, FetchResponse } from 'api/dist/core'
Copy link
Member Author

Choose a reason for hiding this comment

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

It's kinda funky that these type imports are no longer getting codegenerated with a ; but it seems like they do if there's three types being imported here. This might be resolved in the latest ts-morph releases, which we're a couple majors behind.

But since this code still works I'm not going to fret over it now.

@erunion erunion requested a review from kanadgupta August 4, 2023 19:21
@erunion erunion marked this pull request as ready for review August 4, 2023 19:21
Copy link
Member

@kanadgupta kanadgupta left a comment

Choose a reason for hiding this comment

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

tiny prettier CI suggestion below, otherwise LGTM!

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
erunion and others added 3 commits August 4, 2023 13:09
@erunion erunion merged commit 2f14d54 into main Aug 4, 2023
7 checks passed
@erunion erunion deleted the feat/prettier-3 branch August 4, 2023 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues about tackling technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants