From 6c46f07676a8e834a33018d00286173521162d4a Mon Sep 17 00:00:00 2001 From: Grace Park Date: Tue, 20 Jun 2023 14:39:21 -0700 Subject: [PATCH] Add rule md047 add new line to end of markdown files (#38198) --- src/content-linter/README.md | 1 + src/content-linter/scripts/markdownlint.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content-linter/README.md b/src/content-linter/README.md index 8bfff265a8..6e4fee9409 100644 --- a/src/content-linter/README.md +++ b/src/content-linter/README.md @@ -22,6 +22,7 @@ We are using the [markdownlint](https://github.com/DavidAnson/markdownlint) fram | [MD039](https://github.com/DavidAnson/markdownlint/blob/main/doc/md039.md) | Remove spacing around image text. | warning | | [MD040](https://github.com/DavidAnson/markdownlint/blob/main/doc/md040.md) | Code fences must have a language specified. | warning | | [MD042](https://github.com/DavidAnson/markdownlint/blob/main/doc/md042.md) | Do not allow empty links. | error | +| [MD047](https://github.com/DavidAnson/markdownlint/blob/main/doc/md047.md) | All files should end with a new line character. | warning | | [MD011](https://github.com/DavidAnson/markdownlint/blob/main/doc/md011.md) | Make sure that link syntax is not reversed. | error | | [MD111](./linting-rules/image-alt-text-length.js) | Images alternate text should be between 40-150 characters. | warning | | [MD112](./linting-rules/image-alt-text-end-punctuation.js) | Images alternate text should end with a punctuation. | error | diff --git a/src/content-linter/scripts/markdownlint.js b/src/content-linter/scripts/markdownlint.js index 3e8a607138..b80a3320e8 100755 --- a/src/content-linter/scripts/markdownlint.js +++ b/src/content-linter/scripts/markdownlint.js @@ -40,6 +40,7 @@ async function main() { MD024: true, MD027: true, MD030: true, + MD039: true, MD040: { allowed_languages: [ 'bash', @@ -73,7 +74,7 @@ async function main() { 'yml', ], }, - MD039: true, + MD047: true, MD111: true, MD112: true, MD113: true,