CI/CD
Prettier formatting
We use Prettier to format Docsy and the website files using the following command:
npm run check:format
To fix formatting, run Prettier: npm run fix:format.
i18n workaround
The translation files in the i18n directory are formatted using Prettier. But
Prettier removes the blank line before the # Feedback section heading. This
seems to be a known issue, for example see:
- Bug: Inconsistent newline formatting in YAML when changing scopes #15528
- Bug: New Line before comments at end of YAML files are removed #15720
We’ve worked around this bug, and avoided using prettier-ignore directives, by
formatting the preceding entry in the YAML file to be a block scalar, like this:
community_guideline: >-
Contribution Guidelines
This ensures that the blank line is preserved. Hopefully Prettier will be fixed and we’ll be able to remove this hack.