Skip to content

πŸ”° HTML/Markup (Vue and Angular template) linter

License

Notifications You must be signed in to change notification settings

Marcisbee/marklint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

marklint (Markup Lint)

HTML lint tool that works well with Angular and Vue templates too

CI Snyk npm version gzip bundle size discord

Features

  • ⚑️ Fast html parsing
  • πŸ“ Uses editorconfig
  • πŸ– Prints beautiful code frames
  • πŸ›  Fixes auto fixable issues
  • 🎭 Works with Vue and Angular too
  • πŸ—‚ No dependencies

Example screenshots

image

image

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

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