mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #66] style: sentence per line #57
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @igalic on GitHub (Jul 21, 2017).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/66
A lot of VCS backed writing guidelines state: One sentence per line.
A proper editor configuration can make any line-length easy enough on the eyes. But for being able to read a VCS history to a prose text, this style makes most sense.
Is there any way this could be supported?
@DavidAnson commented on GitHub (Jul 21, 2017):
Seems like this might fit in with #51 as a typography rule.
@andrewrynhard commented on GitHub (Aug 17, 2019):
Is there a way to achieve this with markdownlint today? This issue is a bit dated.
@DavidAnson commented on GitHub (Aug 17, 2019):
I think that’s what this custom rule does: https://github.com/JoshuaKGoldberg/sentences-per-line
@igalic commented on GitHub (Nov 7, 2019):
There's also https://sembr.org/ these days, which formalizes what i'm asking for…!
@Alexander-Serov commented on GitHub (Jun 13, 2022):
I see this issue from 2017 is still open (😀), so I would like to ask a question.
I see a custom rule has been provided above that allows one to achieve the desired behavior.
But it is still unclear to me how this can be integrated into a pre-commit config.
I have tried to provide the --rule argument in the pre-commit config or to provide "rules" or "customRules" property in the
.markdownlint.json, but this seems to have no effect: my sentences are still formatted densely in each paragraph. Could you tell me what am I missing? Is there also a list of all options that.markdownlint.jsonaccepts? I haven't been able to find an exhaustive list.To provide more details, this is the last config of the
.markdownlint.jsonthat I have tried:The pre-commit option I have tried:
But no luck.
Thanks!
@DavidAnson commented on GitHub (Jun 13, 2022):
It looks like you mean to use
.markdownlint-cli2.jsonc. Here's an example of how that is structured: https://github.com/DavidAnson/markdownlint-cli2/blob/main/test/markdownlint-cli2-jsonc-example/.markdownlint-cli2.jsonc@DavidAnson commented on GitHub (Jun 13, 2022):
@Alexander-Serov ... and documentation here: https://github.com/DavidAnson/markdownlint-cli2#markdownlint-cli2jsonc
@aepfli commented on GitHub (Feb 13, 2023):
Although there is already https://github.com/JoshuaKGoldberg/sentences-per-line will there be a chance that this will get integrated into markdown-lint directly (mainly because we're using just the docker image from markdownlint-cli, and it is hard to integrate it without building an own docker-image)?
If yes, and if I have the okay from @JoshuaKGoldberg may I start integrating it into markdown-lint as an optional rule? I do see this requirement more and more often, and I think it would allow a lot of people to use that rule easier more.
I would also make the rule a little bit more configurable, eg.
list-of-line-seperators,ignored-words, to make it easier and more flexible to be used, also for other languages, etc.@JoshuaKGoldberg commented on GitHub (Feb 13, 2023):
Yes, please do! I'd love to not have to maintain
sentences-per-line. Moving it into core has been on my todo list for ages but I just haven't had the time. 😄@DavidAnson commented on GitHub (Feb 13, 2023):
FYI, there are no optional rules built into the library. That may be a policy I have to change someday, but so far everything in the library is on by default. There is a slight caveat here for a couple of rules that are enabled but do nothing in their default configuration. That would be the easiest path here, although I feel kind of like the spirit of this rule belongs as part of the "line length" rule since the two seem mutually exclusive. Unfortunately, I don't think they integrate cleanly from a configuration point of view.
@aepfli commented on GitHub (Feb 14, 2023):
I created a draft pull request (#719 )- where I just played around yesterday and covered many topics. I even added a naive "optional" proposal. I marked the PR as a draft because I don't have much experience with JavaScript/Typescript, and some changes might be controversial (the text for the documentation needs improvement). But I am curious to hear what you think about it. what I should not do, or do instead :)
looking forward to some feedback