documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Consider linting line length in code blocks

Open Eric-Arellano opened this issue 1 year ago • 1 comments

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.

Don't apply this to API docs.

Eric-Arellano avatar Aug 07 '24 21:08 Eric-Arellano

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

frankharkins avatar Sep 17 '24 14:09 frankharkins