[GH-ISSUE #83] Split rules into their own files? #1915

Closed
opened 2026-03-07 20:02:44 +03:00 by kerem · 7 comments
Owner

Originally created by @JoshuaKGoldberg on GitHub (Oct 22, 2017).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/83

https://github.com/DavidAnson/markdownlint/blob/master/lib/rules.js is huge. It would be easier to develop if the rules were in their own files.

Originally created by @JoshuaKGoldberg on GitHub (Oct 22, 2017). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/83 https://github.com/DavidAnson/markdownlint/blob/master/lib/rules.js is huge. It would be easier to develop if the rules were in their own files.
kerem 2026-03-07 20:02:44 +03:00
Author
Owner

@DavidAnson commented on GitHub (Oct 22, 2017):

See https://github.com/DavidAnson/markdownlint/issues/42 for some context. This has not been an issue yet, but will be naturally fixed when that’s supported.

<!-- gh-comment-id:338508972 --> @DavidAnson commented on GitHub (Oct 22, 2017): See https://github.com/DavidAnson/markdownlint/issues/42 for some context. This has not been an issue yet, but will be naturally fixed when that’s supported.
Author
Owner

@JoshuaKGoldberg commented on GitHub (Oct 23, 2017):

Would you be upset if I sent a PR?

<!-- gh-comment-id:338538205 --> @JoshuaKGoldberg commented on GitHub (Oct 23, 2017): Would you be upset if I sent a PR?
Author
Owner

@DavidAnson commented on GitHub (Oct 23, 2017):

I learn/remember a lot by revisiting the complete set of rules regularly in the process of maintaining things and find it convenient to search across all rules at once. Similarly, it’s easy to share helper methods within the same file. Neither is a deal breaker, but I worry that a change like this would make my life harder without significant benefit to offset that.

<!-- gh-comment-id:338550432 --> @DavidAnson commented on GitHub (Oct 23, 2017): I learn/remember a lot by revisiting the complete set of rules regularly in the process of maintaining things and find it convenient to search across all rules at once. Similarly, it’s easy to share helper methods within the same file. Neither is a deal breaker, but I worry that a change like this would make my life harder without significant benefit to offset that.
Author
Owner

@braebot commented on GitHub (Oct 23, 2017):

I'm 👍 to splitting them up into separate files. I found it hard to read the existing rules with the current file structure.

<!-- gh-comment-id:338752140 --> @braebot commented on GitHub (Oct 23, 2017): I'm 👍 to splitting them up into separate files. I found it hard to read the existing rules with the current file structure.
Author
Owner

@JoshuaKGoldberg commented on GitHub (Oct 29, 2017):

I worry that a change like this would make my life harder without significant benefit to offset that.

Fun story: one of my early projects was something like 500 global constructs (functions, variables) across maybe a dozen files. It felt nice having things all together... but in actuality it became a huge unorganized mess of helper utilities thrown all over the place. Eventually it became impossible to work on because you'd need three tabs open of the same file, lint/compile rebuilds were horrendously slow, and I'd repeatedly get lost. markdownlint certainly isn't there (phew!) but I would be scared to slip down that path.

I'll send a PR for this and if you hate it, no worries. 😄

<!-- gh-comment-id:340313405 --> @JoshuaKGoldberg commented on GitHub (Oct 29, 2017): > I worry that a change like this would make my life harder without significant benefit to offset that. Fun story: one of my early projects was something like 500 global constructs (functions, variables) across maybe a dozen files. It felt nice having things all together... but in actuality it became a huge unorganized mess of helper utilities thrown all over the place. Eventually it became impossible to work on because you'd need three tabs open of the same file, lint/compile rebuilds were horrendously slow, and I'd repeatedly get lost. markdownlint certainly isn't there (phew!) but I would be scared to slip down that path. I'll send a PR for this and if you hate it, no worries. 😄
Author
Owner

@JoshuaKGoldberg commented on GitHub (Jan 16, 2018):

Re the PR: I ended up not having time to dig into the coverage failures. Issue's still open!

<!-- gh-comment-id:358144402 --> @JoshuaKGoldberg commented on GitHub (Jan 16, 2018): Re the PR: I ended up not having time to dig into the coverage failures. Issue's still open!
Author
Owner

@DavidAnson commented on GitHub (Jan 17, 2018):

It should happen as part of my refactoring to support custom rules.

<!-- gh-comment-id:358174949 --> @DavidAnson commented on GitHub (Jan 17, 2018): It should happen as part of my refactoring to support custom rules.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#1915
No description provided.