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

Investigate how we can lint or format code blocks inside documentation #474

Open
2 tasks
romaricpascal opened this issue Oct 11, 2024 · 0 comments
Open
2 tasks
Labels

Comments

@romaricpascal
Copy link
Member

romaricpascal commented Oct 11, 2024

What

Investigate which tools we could use to format or lint the code blocks inside our documentation. We have set up Prettier, ESLint and Stylelint for that on GOV.UK Frontend, as well as one the Design System site (with the same Prettier configuration, but a slight variation for ESLint and a slight variation for Stylelint as well).

Using the same set up here would be ideal, but one thing to account for here is that the content is not set up in plain Markdown files, but processed as an ERB template, so may cause issues with ESLint and or Prettier.

Why

This would help pick up typos or when the code has formatting issues (like smart quotes instead of regular ones).

Who needs to know about this

Developers

Done when

  • We've investigated to which extent we can use a similar set up as on GOV.UK Frontend or the Design System site (possibly with configuration changes to account for the use of ERB)
  • If in need of another solution, we've investigated which other tool could help us keep a consisten formatting of our code blocks in the documentation
@romaricpascal romaricpascal added awaiting triage Needs triaging by team tooling and removed awaiting triage Needs triaging by team labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant