Questions tagged [htmllint]

Htmllint is a tool to lint (check) html for potential issues. It is typically used as part of a build tool like Gulp or Grunt.

Htmllint is a tool to lint (check) html for potential issues. It parses the DOM inside the fragment and checks for potential problems and style issues. Rules may include things like:

  • Checking for naming conventions on class attributes;
  • Checking for banned tags (e.g. style or blink) and attributes (e.g. style);
  • Line ending format consistency;
  • Etc.

It is typically used as part of a build tool like Gulp (e.g. using the gulp-htmllint plugin) or Grunt (e.g. using grunt-htmllint).

7 questions
10
votes
2 answers

How to enable lint on HTML in vs code?

I am developing angular2 app with visual studio code, I have installed the following extensions, htmllint and htmlhint-ng2 I have the component template as follows, @Component({ selector: 'userprofile', template: `
Sajeetharan
  • 216,225
  • 63
  • 350
  • 396
3
votes
2 answers

how to deprecate a CSS selectors in IDE

I'm looking for a solution, with it i can mark a selector in my scss files as deprecated. Then if i working on a html file and the same time want to use this "deprecated-selector" my IDE should mark the selector and should show a deprecation message…
2
votes
1 answer

Prevent gulp-htmllint from skipping invalid html files

I'm using gulp-htmllint to check files with html fragments. However, to my surprise, it skips files with invalid markup. I'd love to get "as good as possible" linting, but at the very least I want it to fail / report an error on invalid html. Here's…
Jeroen
  • 60,696
  • 40
  • 206
  • 339
1
vote
0 answers

Is there an HTML linter that will make sure attributes are aligned properly on an element?

Is there any type of command line HTML linter that I can use to enforce that attributes are aligned properly? We have a code standard that says you can NOT do this: