Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

htmlhint lints all files, not just HTML files #20

Open
tukusejssirs opened this issue Jan 25, 2021 · 2 comments
Open

htmlhint lints all files, not just HTML files #20

tukusejssirs opened this issue Jan 25, 2021 · 2 comments

Comments

@tukusejssirs
Copy link

Describe the bug
htmlhint lints all files, not just HTML files.

To Reproduce
Steps to reproduce the behavior:

  1. Open a non-HTML file (e.g. Markdown, PHP, …)
  2. Open the linter log and see that it raises some errors (e.g. in my case it raises doctype-first and tag-pair errors.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
htmlhint lints only HTML.

Desktop (please complete the following information):

I don’t think this is OS-dependent, however, below is my platform:

  • OS: Fedora 31 x86_64
  • Browser n/a
  • Version SublimeLinter-contrib-htmlhint v2.0.1
@tukusejssirs
Copy link
Author

I was able to work around this by adding the following int SublimeLinter settings (see the docs:

"htmlhint": {
  "selector": "source.html"
}

However, I still think that that should the default setting.

@Monox18
Copy link

Monox18 commented Jun 15, 2023

Thanks for the suggestion, In my case, source.html disabled my linter. Html files report a different source in SublimeText so I modified it to:

"htmlhint": {
  "selector": "text.html.basic"
}

and made a pull request to update the default settings.

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

No branches or pull requests

2 participants