rcorp / standard-project-structure

A mission to improve developer productivity. Automate Everything ™ !
Apache License 2.0
5 stars 3 forks source link

Rules for HTML Linting #13

Open gaurav21r opened 8 years ago

gaurav21r commented 8 years ago

@riteshe63 as you had mentioned in #4 I agree https://github.com/yaniswang/HTMLHint seems to be the best.

It seems to be quite difficult to find default configurations for HTML as compared to the variety of options in JS #6 .

With the advent of HTML Web Components and projects focused on HTML its quite surprising none of the big ones use an .htmlhintrc.

Maybe no one just cares how HTML is linted? :(

Tracking info from HTMLHint themselves here https://github.com/yaniswang/HTMLHint/issues/112 Tracking request to Polymer here https://github.com/Polymer/polymer/issues/3490 Tracking request to HTML5 Boilerplate here https://github.com/h5bp/html5-boilerplate/issues/1801

cc @prakash1517 @riteshe63 @nitinmadeshia

gaurav21r commented 8 years ago

@riteshe63 Please use the following rules for the time being:

{
  "tagname-lowercase": true,
  "attr-lowercase": true,
  "attr-value-double-quotes": true,
  "doctype-first": true,
  "tag-pair": true,
  "spec-char-escape": true,
  "id-unique": true,
  "src-not-empty": true,
  "attr-no-duplication": true,
  "title-require": true,
  "tag-self-close": true,
  "alt-require": true,
  "doctype-html5": true,
  "space-tab-mixed-disabled": "space",
  "id-class-ad-disabled": true,
  "attr-unsafe-chars": true
}

There are still more things to be done:

  1. Make an htmlhintrc based on HTML5Bootstrap
  2. Make htmlhint lint indentation errors.

We need to open separate issues for both of these. Lets not close this until we've opened those.

riteshe63 commented 8 years ago

28

Solve this issue

gaurav21r commented 7 years ago

We've got positive response for the h5bp team https://github.com/h5bp/html5-boilerplate/issues/1801#issuecomment-243242065

@divya3103 We should now open a PR there and continue with this issue.