-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
🏗📖 Cap line length of Markdown files #26365
🏗📖 Cap line length of Markdown files #26365
Conversation
Hey @estherkim, these files were changed:
Hey @alanorozco, these files were changed:
Hey @wassgha, these files were changed:
Hey @gmajoulet, these files were changed:
Hey @newmuis, these files were changed:
|
IIRC, we didn't initially enforce line width limits for I've added @mrjoro and @CrystalOnScript to comment on whether this is desirable. |
I'd lean towards not enforcing this line length limit. md files often get modified in the web ui and there isn't a good way of knowing when a line goes past 80 chars. |
I see what you're getting at. #21212 already had a 138,754 line diff. Including this would've been a bit much. I guess this can be seen as a continuation of that effort. From a workflow perspective, VS Code's |
/to @mrjoro
Would the CI check be insufficient? Maybe the CI can even auto-format the files and recommit? I'm not sure if that is already happening. |
This doesn't happen, and is not something we plan on supporting.
I think this is the crux of the problem. We don't want to make it even more onerous for folks to edit |
It's a shame the GitHub web UI doesn't infer this based on a repo's |
Is this PR still active? |
|
I guess I will close this. I still stand by it, but it seems like this project doesn't want to do this. I wonder if there was a change of mind since I opened this? Please do tell. :) |
I am in the process of adding Markdown linting to the amp.dev repo (ampproject/amp.dev#3346). During the last wg-outreach meeting I was informed that the same mechanism used in the amphtml repo should be used.
Nice to have: capping the line-length of Markdown files to 80 chars. It would greatly assist with revising proposed changes when looking at the diffs of typo/grammar PRs in GitHub. For example, look at line 75 of this diff. It's difficult to find what was changed.
Problem: running
npx gulp prettify --fix
does not auto-format the max line-length of Markdown files. They should theoretically be maxing 80 chars if this task inherits the default print-width of prettier.Solution: explicitly specify the line-length of Markdown files in
.prettierrc
./cc @rsimha