-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
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.
Minor typo but otherwise LGTM!
const ceramic = new CeramicClient(apiUrl, { syncInterval: 500 }) | ||
if (!did.authenticated) { | ||
await did.authenticate() | ||
;(metadata.controllers as string[]) = [did.id] |
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.
Huh, the semicolon at the start looks weird...
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.
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
@@ -39,5 +41,6 @@ | |||
"ts-jest": "^29.1.1", | |||
"typescript": "^4.9.5" | |||
}, | |||
"prettier": "eslint-config-3box/prettier.config", |
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.
Does this mean you can run npm prettier
to run it? Or do we need an explicit script
entry for the prettier?
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.
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
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.
this line is providing prettier the configuration we want it to use when it runs.
No description provided.