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.

docs(rules): usage argumentation

See original GitHub issue

1. Summary

It would be nice, if HTMLHint documentation will contain arguments, why HTMLHint users must use specific rules.

2. Argumentation

“Must” in The script tag can not be used in head., Id and class value must meet some rules: underline, dash, hump. is not argument. The documentation does not show the reasons. Users should know “Why must”?

3. Example of expected behavior

As for CSSLint wiki. Examples:

HTMLHint wiki doesn’t contain similar argumentation.

4. Specific rules

At first, I want to know argumentation for these rules.

4.1. head-script-disabled

Most popular Stack Overflow answer with 1608 stars at March 2019:

The current state-of-the-art is to put scripts in the <head> tag and use the async or defer attributes. This allows your scripts to be downloaded asap without blocking your browser.

Script tag must be used in head.

4.2. id-class-value

BEM — the most popular CSS methodology use underlines and dashes both. Example from BEM quick-start:

<!-- `search-form` block -->
<form class="search-form">
    <!-- `input` element in the `search-form` block -->
    <input class="search-form__input">

    <!-- `button` element in the `search-form` block -->
    <button class="search-form__button">Search</button>
</form>

Users don’t need use underlines or dashes.

5. Do not offer

Yes, I know, that I can enable/disable/modify specific HTMLHint rules. My question not about it.

Thanks.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Shinigami92commented, Jul 13, 2020

@Kristinita Also some parts has maybe changed since your initial post 🙂

https://github.com/htmlhint/HTMLHint/blob/beta/src/core/rules/id-class-value.ts#L12

e.g. we can define a regex to support bem notation

2reactions
Shinigami92commented, Jul 13, 2020

@Kristinita Thank you very much and please be patient with us We are currently working intensively on the release of version 1.0.0 When we publish it, we also have new documentation

Would be great if you could watch the new documentation and contribute after the 1.0.0 release

Read more comments on GitHub >

github_iconTop Results From Across the Web

Document command-line syntax - Google Developers
Key Point: Recommendations for documenting command-line tools. This page shows how to document command-line commands and their arguments.
Read more >
AND function - Google Docs Editors Help
The AND function returns true if all of the provided arguments are logically true, and false if any of the provided arguments are...
Read more >
The Principles of Argumentation
The key concept here is "to convince the audience," that is, you must make them believe your position, accept your logic and evidence....
Read more >
Structuring Cloud Firestore Security Rules | Firebase - Google
Cloud Firestore Security Rules allow you to control access to documents and collections in your database. ... Maximum number of function arguments, 7....
Read more >
Rules: Argument entry highlighting - Orderful Developer Hub
To make rule creation easier we've added more contextual highlighting. Now as you enter arguments to a function we'll highlight the argument in...
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