[PR #176] [CLOSED] Adding new rule for enforcing new lines at the end of file, fixes #89 #821

Closed
opened 2026-03-03 01:30:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/DavidAnson/markdownlint/pull/176
Author: @kitowiz
Created: 4/5/2019
Status: Closed

Base: masterHead: master


📝 Commits (5)

  • 12a51da Adding new rule for enforcing new lines at the end of file, fixes #89
  • 33eaf0b Renamed rule fore new line at EOF from MD046 to MD047
  • cf259d4 Updated MD047 name, desription and adjusted tests
  • 28dfe09 Regenerated config schema and adjusted tests
  • 9c0554d adjusting fenced code without blank lines test for MD047

📊 Changes

40 files changed (+129 additions, -57 deletions)

View changed files

📝 README.md (+2 -1)
📝 doc/Rules.md (+26 -0)
lib/md047.js (+19 -0)
📝 lib/rules.js (+2 -1)
📝 schema/markdownlint-config-schema.json (+11 -1)
📝 test/atx_heading_spacing.md (+1 -1)
📝 test/break-all-the-rules.md (+1 -1)
📝 test/bulleted_list_4_space_indent.md (+1 -1)
📝 test/bulleted_list_not_at_beginning_of_line.md (+1 -1)
📝 test/consecutive_blank_lines.md (+1 -1)
📝 test/consistent_bullet_styles_asterisk.md (+1 -1)
📝 test/consistent_bullet_styles_dash.md (+1 -1)
📝 test/consistent_bullet_styles_plus.md (+1 -1)
📝 test/detailed-results-MD030-warning-message.md (+1 -1)
📝 test/detailed-results-MD041-MD050.md (+1 -1)
📝 test/detailed-results-MD041-MD050.results.json (+10 -1)
📝 test/fenced_code_without_blank_lines.md (+1 -1)
📝 test/first_heading_bad_atx.md (+1 -1)
📝 test/first_heading_bad_setext.md (+1 -1)
📝 test/first_heading_good_atx.md (+1 -1)

...and 20 more files

📄 Description

Adding new rule MD046 to check for files not ended with new line. Trying to implement new rule issue #89. I also adjusted tests and .md sample files to conform with this rule where necessary.

Please have a look and check if this would be good to merge in. I am happy to get feedback and suggestions.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/DavidAnson/markdownlint/pull/176 **Author:** [@kitowiz](https://github.com/kitowiz) **Created:** 4/5/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (5) - [`12a51da`](https://github.com/DavidAnson/markdownlint/commit/12a51da282b7f365a6790dc6f9529fce4794865d) Adding new rule for enforcing new lines at the end of file, fixes #89 - [`33eaf0b`](https://github.com/DavidAnson/markdownlint/commit/33eaf0bdda80e91875ae8a7b05ea4a6d1da5bf7d) Renamed rule fore new line at EOF from MD046 to MD047 - [`cf259d4`](https://github.com/DavidAnson/markdownlint/commit/cf259d40998f2956ab36158cd11beb5e15636331) Updated MD047 name, desription and adjusted tests - [`28dfe09`](https://github.com/DavidAnson/markdownlint/commit/28dfe099f364c5e78a42eec54d4f86422baf56ad) Regenerated config schema and adjusted tests - [`9c0554d`](https://github.com/DavidAnson/markdownlint/commit/9c0554da737f51adf862d2ae4ea7604e6140b1e4) adjusting fenced code without blank lines test for MD047 ### 📊 Changes **40 files changed** (+129 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+2 -1) 📝 `doc/Rules.md` (+26 -0) ➕ `lib/md047.js` (+19 -0) 📝 `lib/rules.js` (+2 -1) 📝 `schema/markdownlint-config-schema.json` (+11 -1) 📝 `test/atx_heading_spacing.md` (+1 -1) 📝 `test/break-all-the-rules.md` (+1 -1) 📝 `test/bulleted_list_4_space_indent.md` (+1 -1) 📝 `test/bulleted_list_not_at_beginning_of_line.md` (+1 -1) 📝 `test/consecutive_blank_lines.md` (+1 -1) 📝 `test/consistent_bullet_styles_asterisk.md` (+1 -1) 📝 `test/consistent_bullet_styles_dash.md` (+1 -1) 📝 `test/consistent_bullet_styles_plus.md` (+1 -1) 📝 `test/detailed-results-MD030-warning-message.md` (+1 -1) 📝 `test/detailed-results-MD041-MD050.md` (+1 -1) 📝 `test/detailed-results-MD041-MD050.results.json` (+10 -1) 📝 `test/fenced_code_without_blank_lines.md` (+1 -1) 📝 `test/first_heading_bad_atx.md` (+1 -1) 📝 `test/first_heading_bad_setext.md` (+1 -1) 📝 `test/first_heading_good_atx.md` (+1 -1) _...and 20 more files_ </details> ### 📄 Description Adding new rule MD046 to check for files not ended with new line. Trying to implement new rule issue #89. I also adjusted tests and .md sample files to conform with this rule where necessary. Please have a look and check if this would be good to merge in. I am happy to get feedback and suggestions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:30:19 +03:00
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#821
No description provided.