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

Consider linting line length in code blocks #1806

Open
Eric-Arellano opened this issue Aug 7, 2024 · 1 comment
Open

Consider linting line length in code blocks #1806

Eric-Arellano opened this issue Aug 7, 2024 · 1 comment

Comments

@Eric-Arellano
Copy link
Collaborator

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
Copy link
Member

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

github-merge-queue bot pushed a commit that referenced this issue Nov 4, 2024
Follow-up to #2197. Draft until that PR is merged, then I'll rebase
this.

Also a partial fix for #1806 depending if we want to also lint code
examples in MDX.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants