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

feat(prettier): Format with Prettier on Cmd/Ctrl+S #36

Merged
merged 3 commits into from Dec 6, 2018

Conversation

@jackhurley23
Copy link
Contributor

commented Dec 6, 2018

Adds prettier formatting on save (CTRL/CMD + S) when on the page.

Handles multiple JSX root elements (by first wrapping the JSX in <>{code}</>) and maintains cursor position.

@jackhurley23 jackhurley23 requested a review from markdalgleish Dec 6, 2018

@markdalgleish

This comment has been minimized.

Copy link
Member

commented Dec 6, 2018

@jackhurley23 Just a heads up, I've pushed some small lint and formatting fixes.

@markdalgleish

This comment has been minimized.

Copy link
Member

commented Dec 6, 2018

This PR introduces this warning from webpack: prettier/prettier#4959

Doesn't seem to cause any issues, so maybe we can just suppress the warning for now.

@markdalgleish

This comment has been minimized.

Copy link
Member

commented Dec 6, 2018

@jackhurley23 Just pushed a commit that suppresses the warning, with a comment explaining what it is and when we can remove it.

@markdalgleish markdalgleish changed the title feat(prettier): Add prettier formatting to the code pane feat(prettier): Format with Prettier on Ctrl/Cmd+S Dec 6, 2018

@markdalgleish markdalgleish changed the title feat(prettier): Format with Prettier on Ctrl/Cmd+S feat(prettier): Format with Prettier on Cmd/Ctrl+S Dec 6, 2018

@markdalgleish markdalgleish merged commit 716c3bd into seek-oss:master Dec 6, 2018

12 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/snyk - examples/braid-design-system/package.json (seek-jobs-github-integration) No new issues
Details
license/snyk - examples/material-ui/package.json (seek-jobs-github-integration) No new issues
Details
license/snyk - examples/reakit/package.json (seek-jobs-github-integration) No new issues
Details
license/snyk - examples/seek-style-guide/package.json (seek-jobs-github-integration) No new issues
Details
license/snyk - package.json (seek-jobs-github-integration) No new issues
Details
pullapprove 1 group approved
Details
security/snyk - examples/braid-design-system/package.json (seek-jobs-github-integration) No new issues
Details
security/snyk - examples/material-ui/package.json (seek-jobs-github-integration) No new issues
Details
security/snyk - examples/reakit/package.json (seek-jobs-github-integration) No new issues
Details
security/snyk - examples/seek-style-guide/package.json (seek-jobs-github-integration) No new issues
Details
security/snyk - package.json (seek-jobs-github-integration) No new issues
Details
@markdalgleish

This comment has been minimized.

Copy link
Member

commented Dec 6, 2018

Awesome work. This is so cool. Gave it a trial run before merging and it works great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.