From 4affefc68d51963018335883181b3ebec6e1eba1 Mon Sep 17 00:00:00 2001 From: David Anson Date: Thu, 10 Mar 2022 06:07:07 +0000 Subject: [PATCH] Add proper-names rule to .markdownlint.json, update tests to use that file, fix resulting issues. --- .markdownlint.json | 14 +++++++++++--- doc/Rules.md | 4 ++-- example/typescript/type-check.ts | 5 ----- test/markdownlint-test.js | 8 +++----- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.markdownlint.json b/.markdownlint.json index 8382174a2..d43fa8c87 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,8 +1,16 @@ { "line-length": false, - "no-inline-html": { - "allowed_elements": [ - "a" + "no-duplicate-heading": false, + "proper-names": { + "code_blocks": false, + "names": [ + "Cake.Markdownlint", + "CommonMark", + "JavaScript", + "Markdown", + "markdown-it", + "markdownlint", + "Node.js" ] } } diff --git a/doc/Rules.md b/doc/Rules.md index fea46c8e5..c0f23c5fa 100644 --- a/doc/Rules.md +++ b/doc/Rules.md @@ -331,7 +331,7 @@ Rationale: Indenting by 2 spaces allows the content of a nested list to be in line with the start of the content of the parent list when a single space is used after the list marker. Indenting by 4 spaces is consistent with code blocks and simpler for editors to implement. Additionally, this can be a compatibility -issue for multi-markdown parsers, which require 4-space indents. More information: +issue for other Markdown parsers, which require 4-space indents. More information: and . @@ -1360,7 +1360,7 @@ The use of quotes around a bare link will *not* trigger this rule, either: ``` Rationale: Without angle brackets, the URL isn't converted into a link by many -markdown parsers. +Markdown parsers. diff --git a/example/typescript/type-check.ts b/example/typescript/type-check.ts index 052290669..fdc73a2da 100644 --- a/example/typescript/type-check.ts +++ b/example/typescript/type-check.ts @@ -11,11 +11,6 @@ assert(/^\d+\.\d+\.\d+$/.test(version)); function assertConfiguration(config: markdownlint.Configuration) { assert(!!config); assert.equal(config["line-length"], false); - assert.deepEqual(config["no-inline-html"], { - "allowed_elements": [ - "a" - ] - }); // config assignment is covered by markdownlint.Options } diff --git a/test/markdownlint-test.js b/test/markdownlint-test.js index 392ebfbaf..fef63213e 100644 --- a/test/markdownlint-test.js +++ b/test/markdownlint-test.js @@ -83,10 +83,7 @@ test.cb("projectFilesNoInlineConfig", (t) => { "doc/Prettier.md", "helpers/README.md" ], - "config": { - "line-length": { "line_length": 150 }, - "no-duplicate-heading": false - }, + "config": require("../.markdownlint.json"), "customRules": [ require("markdownlint-rule-github-internal-links") ], "noInlineConfig": true }; @@ -109,7 +106,8 @@ test.cb("projectFilesInlineConfig", (t) => { const options = { "files": [ "doc/Rules.md" ], "config": { - "no-inline-html": false + "no-inline-html": false, + ...require("../.markdownlint.json") } }; markdownlint(options, function callback(err, actual) {