question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to stop htmlhint from linting markdown files?

See original GitHub issue

Describe the bug

I’m seeing flags raised in readme.md files, such as this:

htmlhint: error
doctype-first - Doctype must be declared first.

And:

htmlhint: error
spec-char-escape - Special characters must be escaped : [ > ].

htmlhint is properly linting *.html files. It’s not mis-linting other files, such as *.css and *.js.

Why is it linting markdown files?

If I’m required to exclude them, how do I? Should I add a file to my machine’s home directory, such as ~/.htmlhint? What should it say? The following don’t work:

{
    "exclude": ["*.md"]
}
{
    "exclude": ["**/*.md"]
}
  • macOS Catalina Version 10.15.4 (19E287)
  • Sublime Text Version 3.2.2, Build 3211
  • htmlhint --version 0.10.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jthelettercommented, Jun 2, 2020
1reaction
thedaviddiascommented, Jun 2, 2020

We’re gonna take a look, thanks @jtheletter!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to stop htmlhint from linting markdown files? #19 - GitHub
Regarding the htmlhint plugin for Sublime, I'm seeing flags raised in readme.md files, such as this: htmlhint: error doctype-first - Doctype ...
Read more >
Prevent gulp-htmllint from skipping invalid html files
Fork the project on github and implement this yourself; Find another gulp plugin that does this (maybe gulp-htmlhint or gulp-html5-lint?)
Read more >
How to disable linting in Markdown script tags.
I use eslint (for js files) and tslint (for ts files) combined. If the script tag is javascript, I guess it takes the...
Read more >
htmlhint - Bountysource
Steps to reproduce the behavior: 1. Open a non-HTML file (e.g. Markdown, PHP, …) 2. Open the linter log and see that it...
Read more >
htmlhint - MegaLinter by OX Security
See How to disable htmlhint rules in files; See Index of problems detected by ... list_of_files : Call the linter with the list...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found