markuplint
A Linter for All Markup Languages.
Last updated 3 days ago by yusukehirao .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install markuplint 
SYNC missed versions from official npm registry.

markuplint

npm version Build Status Coverage Status

A Linter for All Markup Languages (for legacy/modern HTML, Web Components, SVG, MathML, AMP HTML and more).

Install

$ npm install -D markuplint
$ yarn add -D markuplint

Supported for Node.js v12.4.0 or later.

Usage

CLI

$ npx markuplint verifyee.html
$ npx markuplint --help

Usage
	$ markuplint <HTML file pathes (glob format)>
	$ <stdout> | markuplint

Options
	--config-file,  -c FILE_PATH  Ruleset file path.
	--fix,                        Fix HTML.
	--format,       -f FORMAT     Output format. Support "JSON", "Simple" and "Standard". Default: "Standard".
	--no-color,                   Output no color.
	--problem-only, -p            Output only problems, without passeds.

	--help,         -h            Show help.
	--version,      -v            Show version.

Examples
	$ markuplint verifyee.html --ruleset path/to/.markuplintrc
	$ cat verifyee.html | markuplint

Screen shot

API

import { verify, fix, exec } from 'markuplint';

// Standard usage
const result = verify(htmlCode, config, rules);

// Standard fix
const fixedCode = fix(htmlCode, config, rules);

// Custom usage
const result = exec({
	files,
	workspaceDir,
	config,
	specs,
	rules,
});

???? API Document

API Document genereated by typedoc.

Configuration

.markuplintrc JSON or YAML format

{
	"extends": "@markuplint/html-ls",
	"rules": {
		"rule__enabled": true,
		"rule__disabled": false,
		"rule__custom-setting": {
			"severity": "error",
			"value": "VALUE"
		},
		"rule__custom-setting-with-detail-option": {
			"value": "VALUE",
			"option": { "OPTIONAL_PROP": "OPTIONAL_VALUE" }
		}
	},
	"nodeRules": [
		{
			"tagName": "div",
			"rules": {
				"rule__disable-for-div-tag": false
			}
		}
	],
	"childNodeRules": [
		{
			"selector": "[data-attr^=\"value\"]",
			"inheritance": true,
			"rules": {
				"rule__overwrite-setting-of-selector-matched-element": {
					"value": "OVERWROTE_VALUE"
				}
			}
		}
	]
}

Details and Documentation ????WIP

Rules

Details and Documentation ????WIP

Rule Customization

Details and Documentation ????WIP

Editor Extensions

Thanks

This linter is inspired by:

Current Tags

  • 1.0.0-alpha.41                                ...           latest (3 days ago)
  • 1.0.0-alpha.3                                ...           next (a year ago)

90 Versions

  • 1.0.0-alpha.41                                ...           3 days ago
  • 1.0.0-alpha.40                                ...           6 days ago
  • 1.0.0-alpha.39                                ...           a month ago
  • 1.0.0-alpha.38                                ...           2 months ago
  • 1.0.0-alpha.37                                ...           3 months ago
  • 1.0.0-alpha.36                                ...           3 months ago
  • 1.0.0-alpha.35                                ...           3 months ago
  • 1.0.0-alpha.34                                ...           5 months ago
  • 1.0.0-alpha.33                                ...           5 months ago
  • 1.0.0-alpha.32                                ...           5 months ago
  • 1.0.0-alpha.31                                ...           5 months ago
  • 1.0.0-alpha.30                                ...           6 months ago
  • 1.0.0-alpha.29                                ...           7 months ago
  • 1.0.0-alpha.28                                ...           7 months ago
  • 1.0.0-alpha.27                                ...           7 months ago
  • 1.0.0-alpha.26                                ...           7 months ago
  • 1.0.0-alpha.25                                ...           7 months ago
  • 1.0.0-alpha.24                                ...           7 months ago
  • 1.0.0-alpha.23                                ...           7 months ago
  • 1.0.0-alpha.22                                ...           7 months ago
  • 1.0.0-alpha.21                                ...           7 months ago
  • 1.0.0-alpha.20                                ...           7 months ago
  • 1.0.0-alpha.19                                ...           8 months ago
  • 1.0.0-alpha.18                                ...           8 months ago
  • 1.0.0-alpha.17                                ...           8 months ago
  • 1.0.0-alpha.16                                ...           8 months ago
  • 1.0.0-alpha.15                                ...           8 months ago
  • 1.0.0-alpha.14                                ...           9 months ago
  • 1.0.0-alpha.13                                ...           9 months ago
  • 1.0.0-alpha.12                                ...           a year ago
  • 1.0.0-alpha.11                                ...           a year ago
  • 1.0.0-alpha.10                                ...           a year ago
  • 1.0.0-alpha.9                                ...           a year ago
  • 1.0.0-alpha.8                                ...           a year ago
  • 1.0.0-alpha.7                                ...           a year ago
  • 1.0.0-alpha.5                                ...           a year ago
  • 1.0.0-alpha.4                                ...           a year ago
  • 1.0.0-alpha.3                                ...           a year ago
  • 1.0.0-alpha.2                                ...           a year ago
  • 1.0.0-alpha.1                                ...           a year ago
  • 1.0.0-alpha.0                                ...           a year ago
  • 0.32.0                                ...           2 years ago
  • 0.31.0                                ...           2 years ago
  • 0.30.1                                ...           2 years ago
  • 0.30.0                                ...           2 years ago
  • 0.29.0                                ...           2 years ago
  • 0.28.0                                ...           2 years ago
  • 0.27.0                                ...           2 years ago
  • 0.26.1                                ...           2 years ago
  • 0.26.0                                ...           2 years ago
  • 0.25.0                                ...           2 years ago
  • 0.24.1                                ...           2 years ago
  • 0.24.0                                ...           2 years ago
  • 0.23.0                                ...           2 years ago
  • 0.22.0                                ...           2 years ago
  • 0.21.1                                ...           2 years ago
  • 0.21.0                                ...           2 years ago
  • 0.20.0                                ...           2 years ago
  • 0.19.0                                ...           2 years ago
  • 0.18.0                                ...           2 years ago
  • 0.17.0                                ...           2 years ago
  • 0.16.2                                ...           2 years ago
  • 0.16.1                                ...           2 years ago
  • 0.16.0                                ...           2 years ago
  • 0.15.0                                ...           2 years ago
  • 0.14.0                                ...           2 years ago
  • 0.13.0                                ...           2 years ago
  • 0.12.0                                ...           2 years ago
  • 0.11.0-beta.2                                ...           2 years ago
  • 0.11.0-beta                                ...           2 years ago
  • 0.10.0-alpha.2                                ...           2 years ago
  • 0.10.0-alpha                                ...           2 years ago
  • 0.9.0                                ...           2 years ago
  • 0.9.0-alpha.2                                ...           2 years ago
  • 0.9.0-alpha                                ...           2 years ago
  • 0.8.0-alpha.6                                ...           2 years ago
  • 0.8.0-alpha.5                                ...           2 years ago
  • 0.8.0-alpha.4                                ...           2 years ago
  • 0.8.0-alpha.3                                ...           2 years ago
  • 0.8.0-alpha.2                                ...           2 years ago
  • 0.8.0-alpha                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 19
This Month 19
Last Day 0
Last Week 0
Last Month 101
Dependencies (15)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |