Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

A few warnings/errors from markdownlint #100

Open
pdehaan opened this issue Mar 19, 2019 · 2 comments
Open

A few warnings/errors from markdownlint #100

pdehaan opened this issue Mar 19, 2019 · 2 comments

Comments

@pdehaan
Copy link

pdehaan commented Mar 19, 2019

I'm sure a few of these are somewhat moot with refactorings in WIP pull requests, or not all of these markdown files being used to build the front end, but figured this may be the "best place"(tm) for me to stash my .markdownlint.json config file.

$ cat .markdownlint.json
{
  "header-style": false,
  "line-length": false,
  "no-inline-html": false,
  "ul-indent": false,
  "ul-style": false
}
$ npx markdownlint-cli (rework|privacy|faq).md

faq.md: 19: MD002/first-heading-h1/first-header-h1 First heading should be a top level heading [Expected: h1; Actual: h4]
faq.md: 80: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "#### On Desktop"]
faq.md: 89: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "#### On iOS"]
faq.md: 98: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "#### On Android"]
faq.md: 105: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "#### On iOS"]
faq.md: 127: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "#### On Android"]
privacy.md: 12: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]

The duplicate header issue is an interesting one. It looks like Jekyll (or whatever is ultimately processing these) is smartly converting potential duplicate IDs to "is-ios", "is-ios-1", and "is-ios-2" respectively, so isn't exactly a problem. But we do have some odd <a id=""> tags in addition to the automatically generated heading IDs which can cause duplicate IDs to be a potential issue:

<a id="how-do-i-enable-sync-on-firefox">
### How do I enable sync on Firefox?

Which then compiles to:

<p><a id="how-do-i-enable-sync-on-firefox"></a></p>
<h3 id="how-do-i-enable-sync-on-firefox">How do I enable sync on Firefox?</h3>

NOTE: Here was the original list, which showed all root *.md files vs just the ones that get served via the website:

$ npx markdownlint-cli *.md
faq.md: 19: MD002/first-heading-h1/first-header-h1 First heading should be a top level heading [Expected: h1; Actual: h4]
faq.md: 80: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "#### On Desktop"]
faq.md: 89: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "#### On iOS"]
faq.md: 98: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "#### On Android"]
faq.md: 105: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "#### On iOS"]
faq.md: 127: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "#### On Android"]
index.md: 23: MD045/no-alt-text Images should have alternate text (alt text)
index.md: 26: MD045/no-alt-text Images should have alternate text (alt text)
index.md: 29: MD045/no-alt-text Images should have alternate text (alt text)
privacy.md: 12: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
process.md: 13: MD010/no-hard-tabs Hard tabs [Column: 1]
process.md: 14: MD010/no-hard-tabs Hard tabs [Column: 1]
process.md: 15: MD010/no-hard-tabs Hard tabs [Column: 1]
process.md: 16: MD010/no-hard-tabs Hard tabs [Column: 1]
process.md: 17: MD010/no-hard-tabs Hard tabs [Column: 1]
process.md: 26: MD002/first-heading-h1/first-header-h1 First heading should be a top level heading [Expected: h1; Actual: h2]
process.md: 50: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
process.md: 61: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 4]
process.md: 81: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 4]
process.md: 83: MD010/no-hard-tabs Hard tabs [Column: 1]
process.md: 89: MD010/no-hard-tabs Hard tabs [Column: 1]
process.md: 91: MD010/no-hard-tabs Hard tabs [Column: 1]
process.md: 93: MD010/no-hard-tabs Hard tabs [Column: 1]
process.md: 116: MD005/list-indent Inconsistent indentation for list items at the same level [Expected: 4; Actual: 2]
process.md: 146: MD036/no-emphasis-as-heading/no-emphasis-as-header Emphasis used instead of a heading [Context: "Priorities"]
process.md: 152: MD036/no-emphasis-as-heading/no-emphasis-as-header Emphasis used instead of a heading [Context: "Issue Types"]
process.md: 162: MD036/no-emphasis-as-heading/no-emphasis-as-header Emphasis used instead of a heading [Context: "Closed Issue Resolutions"]
process.md: 170: MD036/no-emphasis-as-heading/no-emphasis-as-header Emphasis used instead of a heading [Context: "Open Questions or Help Needed"]
@pdehaan
Copy link
Author

pdehaan commented Mar 19, 2019

Oops, I just noticed that my glob was only checking root files and not subdirectories, so this should catch things in the architecture/*.md folder as well:

$ git ls-files **/*.md

README.md
architecture/data-storage.md
architecture/fxa.md
architecture/index.md
architecture/lock-unlock.md
architecture/sync.md
code_of_conduct.md
contributing.md
faq.md
index.md
privacy.md
process.md
rework.md


$ npx markdownlint-cli architecture/*.md

architecture/data-storage.md: 6: MD002/first-heading-h1/first-header-h1 First heading should be a top level heading [Expected: h1; Actual: h2]
architecture/data-storage.md: 6: MD041/first-line-h1 First line in file should be a top level heading [Context: "## Overview"]
architecture/fxa.md: 8: MD002/first-heading-h1/first-header-h1 First heading should be a top level heading [Expected: h1; Actual: h2]
architecture/fxa.md: 47: MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "* **Existing User** - If the F..."]
architecture/fxa.md: 73: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
architecture/fxa.md: 78: MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
architecture/fxa.md: 92: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
architecture/fxa.md: 161: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
architecture/fxa.md: 168: MD038/no-space-in-code Spaces inside code span elements [Context: "`Bearer `"]
architecture/fxa.md: 242: MD036/no-emphasis-as-heading/no-emphasis-as-header Emphasis used instead of a heading [Context: "Tee bee Dee"]
architecture/fxa.md: 246: MD036/no-emphasis-as-heading/no-emphasis-as-header Emphasis used instead of a heading [Context: "Tee bee Dee"]
architecture/index.md: 16: MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
architecture/index.md: 54: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
architecture/index.md: 55: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
architecture/index.md: 57: MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
architecture/lock-unlock.md: 16: MD002/first-heading-h1/first-header-h1 First heading should be a top level heading [Expected: h1; Actual: h2]
architecture/lock-unlock.md: 111: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Lock Status"]
architecture/lock-unlock.md: 123: MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Unlocking"]
architecture/sync.md: 8: MD002/first-heading-h1/first-header-h1 First heading should be a top level heading [Expected: h1; Actual: h2]
architecture/sync.md: 58: MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
architecture/sync.md: 93: MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
architecture/sync.md: 114: MD030/list-marker-space Spaces after list markers [Expected: 1; Actual: 2]
architecture/sync.md: 131: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 4]
architecture/sync.md: 178: MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "2. A request is made for the u..."]
architecture/sync.md: 179: MD006/ul-start-left Consider starting bulleted lists at the beginning of the line [Expected: 0; Actual: 2]
architecture/sync.md: 179: MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- If this request fails with a..."]
architecture/sync.md: 266: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 4]
architecture/sync.md: 273: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 4]
architecture/sync.md: 365: MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 4]
architecture/sync.md: 456: MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]

@pdehaan
Copy link
Author

pdehaan commented Mar 19, 2019

Also, I didn't find any typos using markdown-spellcheck (against master branch):

$ npx markdown-spellcheck -n -a -x --en-us (rework|privacy|faq).md

It did bring up an odd inconsistency between "Autofill" and "AutoFill", but looking at the included repo screenshots, that seems more like a spelling diff between Android and iOS.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant