Qiskit / documentation

The documentation content home for https://docs.quantum.ibm.com.
https://docs.quantum.ibm.com
Apache License 2.0
38 stars 81 forks source link

Consider linting line length in code blocks #1806

Open Eric-Arellano opened 3 months ago

Eric-Arellano commented 3 months ago

Long lines are annoying because they result in horizontal scrolling inside the code block. We should consider using a linter (like Ruff or Pylint) to ensure that code blocks are not too long. Although, this would be hard to run on MDX files, so it might be simpler to implement our own linter that uses our markdownReader.ts.

TBD what the line length should be. It'd be helpful to experiment with what is an optimal size when using our docs size, where we avoid scrolling but still use all the real estate. This experiment should consider different screen sizes.

frankharkins commented 2 months ago

For mdx, we could consider mdformat: https://docs.astral.sh/ruff/integrations/#mdformat