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: local prettier run #8040

Closed
wants to merge 6 commits into from
Closed

chore: local prettier run #8040

wants to merge 6 commits into from

Conversation

wlee221
Copy link
Contributor

@wlee221 wlee221 commented Apr 7, 2021

Description of changes

  • Make .prettierrc extendable.

I changed .prettierrc to .prettierrc.js. Packages that needs extra prettier config can extend the root level prettier config using this pattern:

 module.exports = { 
 	...require('../../.prettierrc.js'), // extend the root-level prettier config
 	printWidth: 120, 
 }; 
  • Add printWidth: 120 prettier setting to package/ui-components

This was the previous prettier setting before #7790 was merged. I think it makes sense to have longer printWidth for ui-components because the tsx files tends to be longer width (due to tag names, stencil decorator patterns, nested html trees, and so on).

  • Run prettier on packages/*.[ts,tsx,vue,js] files

Checklist

  • PR description included
  • yarn test passes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@wlee221
Copy link
Contributor Author

wlee221 commented Apr 7, 2021

closing as local prettier run has unexpected side effect in aws-amplify-vue package due to whitespaces changes inside strings. Will reopen at a smaller scope.

@wlee221 wlee221 closed this Apr 7, 2021
@github-actions
Copy link

github-actions bot commented Apr 8, 2022

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2022
@jimblanc jimblanc deleted the local-prettier-run branch November 23, 2022 15:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant