Change Request: Remove bogus newline at the end of code in rule examples #17627
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
documentation
Relates to ESLint's documentation
enhancement
This change enhances an existing feature of ESLint
ESLint version
v8.51.0
What problem do you want to solve?
I haven't been able to create an incorrect code example for the rule
eol-last
or for the ruleno-multiple-empty-lines
with option"maxEOF": 0
because the Playground links generated by Eleventy always append a newline at the end of the text.For visual clarity, this markdown code block does not include a visible trailing empty line.
I can copy its content from the rendered page in the browser, and pasting into an empty editor again confirms that there is no trailing line break. By contrast, the code of the Playground link in the rule docs, includes an additional empty line at the end.
What do you think is the correct solution?
There should be no extra newline at the end of the code in Playground links.
Participation
Additional comments
The rules
eol-last
andno-multiple-empty-lines
are scheduled for deprecation in v9 per #17522, so fixing the code examples for those rules is arguably not very important, but I would still recommend removing the trailing newline from all code examples for correctness and consistency.The text was updated successfully, but these errors were encountered: