Add proper-names rule to .markdownlint.json, update tests to use that file, fix resulting issues.

This commit is contained in:
David Anson 2022-03-10 06:07:07 +00:00 committed by GitHub
parent 062585e281
commit 4affefc68d
4 changed files with 16 additions and 15 deletions

View file

@ -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"
]
}
}

View file

@ -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:
<https://cirosantilli.com/markdown-style-guide#indentation-of-content-inside-lists>
and <http://support.markedapp.com/discussions/problems/21-sub-lists-not-indenting>.
@ -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.
<a name="md035"></a>

View file

@ -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
}

View file

@ -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) {