0.0.7 • Published 5 years ago

htmlint v0.0.7

Weekly downloads
9
License
ISC
Repository
github
Last release
5 years ago

Build Status

htmlint

Lints HTML snippets.

linting example

Features

  • Detects inconsistent tag structure.

Installation

npm install htmlinter

Usage

From the command line

node node_modules/htmlint path/to/some.html

From a script

Lint strings

const htmlint = require('./htmlint');
htmlint.checkString('<a></b>').then((issues) => {
  issues.forEach((issue) => {
    console.log(issue.print());
  });
});

// Output:
// Closing tag mismatch for <b> detected at line 1, column 4
// Unclosed element for <a> detected at line 1, column 1

Lint files

const htmlint = require('./htmlint');
htmlint.checkString('path/to/some.html').then((issues) => {
  issues.forEach((issue) => {
    console.log(issue.print());
  });
});

VIM integration

See ALE fork.

Planned Features

  • Autoformat according to formatting rules.
0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago