mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Add proper-names rule to .markdownlint.json, update tests to use that file, fix resulting issues.
This commit is contained in:
parent
062585e281
commit
4affefc68d
4 changed files with 16 additions and 15 deletions
|
|
@ -1,8 +1,16 @@
|
||||||
{
|
{
|
||||||
"line-length": false,
|
"line-length": false,
|
||||||
"no-inline-html": {
|
"no-duplicate-heading": false,
|
||||||
"allowed_elements": [
|
"proper-names": {
|
||||||
"a"
|
"code_blocks": false,
|
||||||
|
"names": [
|
||||||
|
"Cake.Markdownlint",
|
||||||
|
"CommonMark",
|
||||||
|
"JavaScript",
|
||||||
|
"Markdown",
|
||||||
|
"markdown-it",
|
||||||
|
"markdownlint",
|
||||||
|
"Node.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
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
|
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
|
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>
|
<https://cirosantilli.com/markdown-style-guide#indentation-of-content-inside-lists>
|
||||||
and <http://support.markedapp.com/discussions/problems/21-sub-lists-not-indenting>.
|
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
|
Rationale: Without angle brackets, the URL isn't converted into a link by many
|
||||||
markdown parsers.
|
Markdown parsers.
|
||||||
|
|
||||||
<a name="md035"></a>
|
<a name="md035"></a>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,6 @@ assert(/^\d+\.\d+\.\d+$/.test(version));
|
||||||
function assertConfiguration(config: markdownlint.Configuration) {
|
function assertConfiguration(config: markdownlint.Configuration) {
|
||||||
assert(!!config);
|
assert(!!config);
|
||||||
assert.equal(config["line-length"], false);
|
assert.equal(config["line-length"], false);
|
||||||
assert.deepEqual(config["no-inline-html"], {
|
|
||||||
"allowed_elements": [
|
|
||||||
"a"
|
|
||||||
]
|
|
||||||
});
|
|
||||||
// config assignment is covered by markdownlint.Options
|
// config assignment is covered by markdownlint.Options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,7 @@ test.cb("projectFilesNoInlineConfig", (t) => {
|
||||||
"doc/Prettier.md",
|
"doc/Prettier.md",
|
||||||
"helpers/README.md"
|
"helpers/README.md"
|
||||||
],
|
],
|
||||||
"config": {
|
"config": require("../.markdownlint.json"),
|
||||||
"line-length": { "line_length": 150 },
|
|
||||||
"no-duplicate-heading": false
|
|
||||||
},
|
|
||||||
"customRules": [ require("markdownlint-rule-github-internal-links") ],
|
"customRules": [ require("markdownlint-rule-github-internal-links") ],
|
||||||
"noInlineConfig": true
|
"noInlineConfig": true
|
||||||
};
|
};
|
||||||
|
|
@ -109,7 +106,8 @@ test.cb("projectFilesInlineConfig", (t) => {
|
||||||
const options = {
|
const options = {
|
||||||
"files": [ "doc/Rules.md" ],
|
"files": [ "doc/Rules.md" ],
|
||||||
"config": {
|
"config": {
|
||||||
"no-inline-html": false
|
"no-inline-html": false,
|
||||||
|
...require("../.markdownlint.json")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
markdownlint(options, function callback(err, actual) {
|
markdownlint(options, function callback(err, actual) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue