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: Run prettier to format all JS code #41

Merged
merged 1 commit into from
Oct 26, 2023
Merged

chore: Run prettier to format all JS code #41

merged 1 commit into from
Oct 26, 2023

Conversation

stbrody
Copy link
Collaborator

@stbrody stbrody commented Oct 26, 2023

No description provided.

@stbrody stbrody self-assigned this Oct 26, 2023
Copy link
Collaborator

@smrz2001 smrz2001 left a comment

Choose a reason for hiding this comment

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

Minor typo but otherwise LGTM!

const ceramic = new CeramicClient(apiUrl, { syncInterval: 500 })
if (!did.authenticated) {
await did.authenticate()
;(metadata.controllers as string[]) = [did.id]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Huh, the semicolon at the start looks weird...

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 can't get rid of it. The semicolon is required to avoid a compiler error, and prettier wants to put it at the start of this line not the end of the last one. I think we'd need to change the ceramic eslint config to try to figure out how to fix that. Maybe @ukstv knows if this is possible to fix.

But for now I'm going to go ahead with this as-is, this is just a quirk of prettier

@stbrody stbrody added this pull request to the merge queue Oct 26, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 26, 2023
@@ -39,5 +41,6 @@
"ts-jest": "^29.1.1",
"typescript": "^4.9.5"
},
"prettier": "eslint-config-3box/prettier.config",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this mean you can run npm prettier to run it? Or do we need an explicit script entry for the prettier?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We would need to add an explicit script entry. I can do so if you'd like, we have such a script already in the js-ceramic repo I can just copy. I usually just rely on my IDE to run prettier on save though

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 line is providing prettier the configuration we want it to use when it runs.

@stbrody stbrody added this pull request to the merge queue Oct 26, 2023
Merged via the queue into main with commit 9d59527 Oct 26, 2023
17 checks passed
@stbrody stbrody deleted the prettier branch October 26, 2023 20:34
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