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: use prettier more #1109

Merged
merged 3 commits into from
May 31, 2023
Merged

chore: use prettier more #1109

merged 3 commits into from
May 31, 2023

Conversation

tatomyr
Copy link
Contributor

@tatomyr tatomyr commented May 30, 2023

What/Why/How?

Ran Prettier on yaml and json files.
I believe we'll benefit from enforcing consistency wherever we can automate it.
Changes mostly located in test files, so I also updated the snapshots.

Also I'd suggest covering .md files after merging large docs MRs.

Reference

Testing

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested with redoc/reference-docs/workflows
  • All new/updated code is covered with tests

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

@tatomyr tatomyr requested a review from a team as a code owner May 30, 2023 16:35
@tatomyr tatomyr self-assigned this May 30, 2023
@tatomyr tatomyr requested a review from lornajane May 30, 2023 16:37
@github-actions
Copy link
Contributor

github-actions bot commented May 30, 2023

Command Mean [s] Min [s] Max [s] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 1.759 ± 0.035 1.695 1.819 1.02 ± 0.04
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1.716 ± 0.054 1.662 1.834 1.00

@github-actions
Copy link
Contributor

github-actions bot commented May 30, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 73.29% 3506/4784
🟡 Branches 64.93% 2003/3085
🟡 Functions 65.66% 589/897
🟡 Lines 73.35% 3264/4450

Test suite run success

587 tests passing in 85 suites.

Report generated by 🧪jest coverage report action from 4d9df11

@lornajane
Copy link
Collaborator

I really like this! But how can we maintain the standards on the project? I think having it as a precommit requirement might be too much for a public project, do we or could we run the check task in CI?

@tatomyr
Copy link
Contributor Author

tatomyr commented May 31, 2023

@lornajane yeah, the same task in CI we're currently running for ts/js files, but extended for yaml/json. See the changes in package.json: https://github.com/Redocly/redocly-cli/pull/1109/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R18

Copy link
Collaborator

@lornajane lornajane left a comment

Choose a reason for hiding this comment

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

Thank you @tatomyr (and prettier!). A good quality improvement IMO.

@tatomyr tatomyr merged commit fb47a20 into main May 31, 2023
7 checks passed
@tatomyr tatomyr deleted the chore/use-prettier-more branch May 31, 2023 10:01
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.

None yet

3 participants