Skip to content

Tooling: Ensure consistent formatting in all scripts #30795

@gziolo

Description

@gziolo

What problem does this address?

Follow-up for #30714.

I tested npm run fixtures:regenerate with all the formatting applied and it looks like it uses different formatting so definitely something to look at:

Screen Shot 2021-04-13 at 10 45 25

It is not only ranges that is formatted differently but it also uses spaces for indentation ...

Follow-up for #30715.

npx prettier --write **/*.md doesn't play nicely with npm run docs:build. @nosolosw, is it possible to include formatting in the process of generating automated docs with @wordpress/docgen or is better to run code formatting as the post-processing step inside the shell script we use?

What is your proposed solution?

It looks like npm run fixtures:regenerate command conflicts with what npx prettier --write **/*.json does for all JSON files. We should update npm run fixtures:regenerate to produce output that is aligned with Prettier formatting.

npx prettier --write **/*.md doesn't play nicely with npm run docs:build. We should update @wordpress/docgen to align both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueAn issue that's suitable for someone looking to contribute for the first timeNeeds DevReady for, and needs developer efforts[Type] Automated TestingTesting infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.[Type] Build ToolingIssues or PRs related to build tooling[Type] Code QualityIssues or PRs that relate to code quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions