Skip to content

Commit

Permalink
Add proper-names rule to .markdownlint.json, update tests to use that…
Browse files Browse the repository at this point in the history
… file, fix resulting issues.
  • Loading branch information
DavidAnson authored Mar 10, 2022
1 parent 062585e commit 4affefc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
14 changes: 11 additions & 3 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
4 changes: 2 additions & 2 deletions doc/Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>.

Expand Down Expand Up @@ -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>

Expand Down
5 changes: 0 additions & 5 deletions example/typescript/type-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
8 changes: 3 additions & 5 deletions test/markdownlint-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand All @@ -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) {
Expand Down

0 comments on commit 4affefc

Please sign in to comment.