HTML lint tool that works well with Angular and Vue templates too
- β‘οΈ Fast html parsing
- π Uses editorconfig
- π Prints beautiful code frames
- π Fixes auto fixable issues
- π Works with Vue and Angular too
- π No dependencies
npm install marklint -g
Lint a file like so:
marklint
Usage: marklint [file] [options]
file or directory file or directory to parse; otherwise uses '.'
Options:
--fix fixes all auto fixable issues
-v, --version print version and exit
-i, --include array of file paths to include (default: *.html, *.htm)
-e, --exclude array of file paths to exclude (default: node_modules/**)
-c, --config location of config file
- β alt-require
- β attr-closing-bracket
- β attr-format
- β attr-lowercase
- β attr-no-duplication
- β attr-value-not-empty
- β attr-value-double-quotes - WIP
- β comment-format
- β inline-style-disabled
- β no-flow-tag-close
- β no-unclosed-tag
- β no-void-tag-close
- β style-disabled - WIP
- β tag-indent
By the time I started this project there were not many html lint tools and none of them provided features I wanted for my templates to have such as indent attributes based on length of attributes length and none of them really worked with Angular templates, that was my primary target from the start.
And since I hate that JS ecosystem has dependency rabbit hole I wanted to build markup linter that checks and fixes issues in any html markup file as well as Angular and Vue templates with minimum dependency count.
Copyright (C) 2020 Marcis Bergmanis