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

Format JavaScript, CSS, and Markdown with Prettier #2670

Merged

Conversation

hyperupcall
Copy link
Collaborator

@hyperupcall hyperupcall commented Dec 25, 2022

In the same style as #2255, this adds JavaScript, CSS, and Markdown to be formatted with Prettier (to the .pre-commit-config.yaml file). I would have added TOML to the mix, but the prettier plugin is in an alpha state.

The .prettierrc.json file is based off the Gruntfile.cjs file; I wanted to minimize the impact of the change. In doing this, this solves problems I've had with editing the CONTRIBUTING.md or Gruntfile; saving the file no longer formats the file, which would have messed up the diff.

The first commit adds the config; the second runs Prettier, and the third edits the .git-blame-ignore-revs file

@github-actions github-actions bot added documentation "**/*.md" folder is updated (auto-generated by labeler action) eslintrcjson gruntfile gruntfile.js is updated (auto-generated by labeler action) NodeJS NodeJS files are updated (auto-generated by labeler action) WARNING_AspNetFiles AspNetFiles is updated (auto-generated by labeler action) labels Dec 25, 2022
@hyperupcall hyperupcall force-pushed the pre-commit-add-more-files branch 3 times, most recently from aed9a41 to 4b5d7c6 Compare December 25, 2022 03:43
@hyperupcall hyperupcall marked this pull request as ready for review December 25, 2022 03:46
@hyperupcall
Copy link
Collaborator Author

Sorry for the messy force-pushing; I wanted to keep the commits single-purpose but I forgot to add a newline to .git-blame-ignore-revs and forgot to format CONTRIBUTING.mdin the formatting commit.

@GerryFerdinandus GerryFerdinandus merged commit afc8618 into SchemaStore:master Dec 25, 2022
@GerryFerdinandus
Copy link
Contributor

Thanks

@hyperupcall hyperupcall deleted the pre-commit-add-more-files branch December 25, 2022 09:29
@GerryFerdinandus
Copy link
Contributor

@hyperupcall
https://github.com/SchemaStore/schemastore/blob/master/CONTRIBUTING.md#json-formatter
The json formatter text is deprecated and should link to a "Prettier" plugin, etc. You might be interested in updating it?

@hyperupcall
Copy link
Collaborator Author

@GerryFerdinandus sure thing - i'll send a PR tomorrow

jmatias pushed a commit to jmatias/schemastore that referenced this pull request Jul 19, 2023
* chore: Add config to format JS, CSS, and Markdown with Prettier

* chore: Format files with Prettier

* chore: Add Prettier format commit to `.git-blame-ignore-revs`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation "**/*.md" folder is updated (auto-generated by labeler action) eslintrcjson gruntfile gruntfile.js is updated (auto-generated by labeler action) NodeJS NodeJS files are updated (auto-generated by labeler action) WARNING_AspNetFiles AspNetFiles is updated (auto-generated by labeler action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants