marklint
v0.7.0
Published
π³ HTML/Markup (Vue and Angular template) linter
Downloads
42
Readme
marklint (Markup Lint)
HTML lint tool that works well with Angular and Vue templates too
Features
- β‘οΈ Fast html parsing
- π Uses editorconfig
- π Prints beautiful code frames
- π Fixes auto fixable issues
- π Works with Vue and Angular too
- π No dependencies
Example screenshots
Installation
npm install marklint -g
Command line interface
Lint a file like so:
marklint
Options
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
Rules
- β 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
Motivation
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.
MIT License
Copyright (C) 2020 Marcis Bergmanis