posthtml-lint
Changelog
posthtml-lint
is a PostHTML plugin to lint static markup.
Currently supported rules include no-duplicate-ids
, no-duplicate-tags
, no-empty-tags
and no-missing-attributes
.
Before:
Title Title Link
After:
# Output printed to the terminal There are ...
Install
yarn add -D posthtml-lint# OR npm i posthtml-lint
Usage
const fs = ;const posthtml = ;const lint = ; const html = fs; ;
Options
Name | Kind | Description |
---|---|---|
noDuplicateIds |
boolean (default true ) |
Disallow duplicate ids |
noDuplicateTags |
boolean (default true ) |
Disallow duplicate occurrences of the html , head , title and body tags |
noEmptyTags |
boolean (default true ) |
Disallow empty tags for tags that are not self-closing |
noMissingAttributes |
boolean (default true ) |
Disallow tags with missing required attributes. |
Contributing
See PostHTML Guidelines and contribution guide.