Skip to content

Commit

Permalink
Configure all rules that allow style=consistent (or similar) to requi…
Browse files Browse the repository at this point in the history
…re an explicit style for consistency across the project.
  • Loading branch information
DavidAnson committed Nov 14, 2022
1 parent bb1c4d4 commit 2e63bf7
Show file tree
Hide file tree
Showing 33 changed files with 149 additions and 117 deletions.
32 changes: 32 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,36 @@
{
"code-block-style": {
"style": "fenced"
},
"code-fence-style": {
"style": "backtick"
},
"emphasis-style": {
"style": "asterisk"
},
"fenced-code-language": {
"allowed_languages": [
"javascript",
"json",
"markdown"
],
"language_only": true
},
"heading-style": {
"style": "atx"
},
"hr-style": {
"style": "---"
},
"line-length": {
"strict": true
},
"no-duplicate-heading": {
"siblings_only": true
},
"ol-prefix": {
"style": "ordered"
},
"proper-names": {
"code_blocks": false,
"names": [
Expand All @@ -16,5 +42,11 @@
"markdownlint",
"Node.js"
]
},
"strong-style": {
"style": "asterisk"
},
"ul-style": {
"style": "dash"
}
}
2 changes: 1 addition & 1 deletion doc-build/build-rules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ for (const rule of rules) {
JSON.stringify(propData.default) :
propData.default;
const allValues = propData.enum?.sort();
const listItem = `* \`${property}\`: ${propData.description} (` +
const listItem = `- \`${property}\`: ${propData.description} (` +
`\`${propType}\`, default \`${defaultValue}\`` +
(propData.enum ?
`, values ${allValues.map((value) => `\`${value}\``).join(" / ")}` :
Expand Down
4 changes: 2 additions & 2 deletions doc-build/md053.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ unnecessary:

1. If a label is not referenced by any link or image in a document, that
definition is unused and can be deleted.
1. If a label is defined multiple times in a document, the first definition is
2. If a label is defined multiple times in a document, the first definition is
used and the others can be deleted.

This rule considers a reference definition to be used if any link or image
Expand All @@ -21,6 +21,6 @@ be ignored by setting the `ignored_definitions` parameter. The default value of
this parameter ignores the following convention for adding non-HTML comments to
Markdown:

```md
```markdown
[//]: # (This behaves like a comment)
```
2 changes: 1 addition & 1 deletion doc/CustomRules.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ the parsed input and a function to log any violations.

A simple rule implementation looks like:

```js
```javascript
module.exports = {
"names": [ "any-blockquote" ],
"description": "Rule that reports an error for any blockquote",
Expand Down
Loading

0 comments on commit 2e63bf7

Please sign in to comment.