markuplint

4.11.8 • Public • Published

markuplint

npm version Downloads Test Coverage Status GitHub Stars Follow us on Twitter

Peace of mind in your markup - An HTML linter for all markup developers.

Features

  • Conformance checking according to HTML Standard, WAI-ARIA, ARIA in HTML, etc.
  • Supports CSS and SVG values.
  • Supports React, Vue, Svelte, Alpine.js, HTMX, Pug, PHP, and more.
  • Possible to specify the rule for each element if you use CSS Selector.
  • Potential to create a custom rule.

Screenshot: Violation Report CLI output

Instant using

$ npx markuplint target.html

Supported for Node.js v18.18.0 or later.

Usage

Initialization

Create a configuration file and install dependencies.

$ npx markuplint --init
# or
$ yarn run markuplint --init

Answer questions interactively. By doing this, needed modules are installed, including markuplint.

Add a command to the scripts option on package.json:

{
  "scripts": {
    "lint:html": "markuplint **/*.html"
  }
}

If you want to change the target path, you can change it for your project.

Execute the script:

$ npm run lint:html
# or
$ yarn lint:html

Command line options

$ npx markuplint --help

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

Options
	--config,                -c FILE_PATH  A configuration file path.
	--fix,                                 Fix HTML.
	--format,                -f FORMAT     Output format. Support "JSON", "Simple", "GitHub" and "Standard". Default: "Standard".
	--no-search-config                     No search a configure file automatically.
	--ignore-ext                           Evaluate files that are received even though the type of extension.
	--no-import-preset-rules               No import preset rules.
	--locale                               Locale of the message of violation. Default is an OS setting.
	--no-color,                            Output no color.
	--problem-only,          -p            Output only problems, without passeds.
	--allow-warnings                       Return status code 0 even if there are warnings.
	--allow-empty-input                    Return status code 1 even if there are no input files.
	--show-config                          Output computed configuration of the target file. Supports "details" and empty. Default: empty.
	--verbose                              Output with detailed information.
	--include-node-modules                 Include files in node_modules directory. Default: false.
	--severity-parse-error                 Specifies the severity level of parse errors. Supports "error", "warning", and "off". Default: "error".

	--init                                 Initialize settings interactively.
	--search                               Search lines of codes that include the target element by selectors.

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

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

Documentation

Playground

Editor Extensions

License

FOSSA Status

Sponsors

Corporate Sponsors

Velc

Personal Supporters

Tokitake Okuto Oyama miita Yasuo Fukuda shamokit takanorip

Need Sponsors❤️‍🔥

Thanks

This linter is inspired by:

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.9.1-alpha.10next
4.4.1-dev.10canary
4.11.813,712latest

Version History

VersionDownloads (Last 7 Days)Published
4.11.813,712
4.11.7450
4.11.6468
4.11.5160
4.11.42,750
4.11.3309
4.11.2185
4.11.1192
4.11.00
4.10.1269
4.10.00
4.9.4163
4.9.3341
4.9.2523
4.9.1359
4.9.1-alpha.10
4.9.1-alpha.00
4.9.044
4.8.127
4.8.03
4.8.0-alpha.00
4.7.00
4.6.151
4.6.06
4.5.0328
4.4.1-dev.10
4.4.073
4.3.1-alpha.00
4.3.0210
4.2.0527
4.1.10
4.1.00
4.0.30
4.0.20
4.0.120
4.0.00
4.0.0-rc.1257
4.0.0-rc.00
4.0.0-alpha.120
4.0.0-alpha.111
4.0.0-alpha.100
4.0.0-dev.230
4.0.0-dev.120
4.0.0-alpha.90
4.0.0-alpha.80
4.0.0-alpha.70
4.0.0-dev.200
4.0.0-dev.100
3.15.03,314
4.0.0-dev.00
4.0.0-alpha.636
4.0.0-alpha.512
4.0.0-alpha.40
4.0.0-dev.280
3.14.0786
4.0.0-alpha.36
3.0.0-dev.3000
3.0.0-dev.2900
4.0.0-alpha.20
3.13.010
3.12.124
4.0.0-alpha.11
3.12.0262
3.11.0504
3.10.0277
3.9.131
3.0.0-dev.1860
3.9.00
3.0.0-dev.1770
3.0.0-dev.1760
3.8.04
3.7.029
3.6.10
3.6.02
3.5.00
3.4.0150
3.3.10
3.0.0-dev.960
3.0.0-dev.950
3.3.0198
3.2.029
3.1.092
3.0.13
3.0.0-dev.540
3.0.0-dev.510
3.0.00
3.0.0-dev.50.400
3.0.0-dev.430
3.0.0-dev.420
3.0.0-dev.401
3.0.0-dev.380
3.0.0-rc.50
3.0.0-alpha.270
3.0.0-dev.250
3.0.0-dev.240
3.0.0-rc.40
3.0.0-rc.31
3.0.0-rc.20
3.0.0-rc.11
2.11.4686
2.11.4-canary.20
2.11.4-canary.00
3.0.0-canary.30
3.0.0-rc.00
2.11.32
3.0.0-alpha.60
2.11.22
2.11.12
3.0.0-alpha.51
2.11.02
2.10.236
2.10.2-alpha.00
3.0.0-alpha.40
3.0.0-alpha.30
3.0.0-alpha.20
3.0.0-alpha.10
2.10.12,958
2.10.0807
2.9.0341
3.0.0-alpha.00
3.0.0-alpha.660
2.8.015
2.7.12
2.7.02
2.6.33
2.6.22
2.6.12
2.6.02
2.5.02
2.4.0566
2.3.02
2.2.1-dev.20220307.10
2.2.1-dev.20220307.00
2.2.02
2.1.12
2.1.027
2.0.02
2.0.0-rc.62
2.0.0-rc.52
2.0.0-rc.32
2.0.0-rc.20
2.0.0-rc.10
2.0.0-dev.20220112.00
2.0.0-dev.20220111.00
2.0.0-dev.20220110.00
2.0.0-dev.20220107.01
2.0.0-dev.20220106.00
2.0.0-dev.20220105.10
2.0.0-dev.20211227.00
2.0.0-dev.20211213.20
2.0.0-dev.20211213.10
2.0.0-dev.20211213.00
2.0.0-dev.20211209.00
2.0.0-rc.00
2.0.0-dev.2021117.30
2.0.0-dev.2021117.20
2.0.0-dev.2021117.10
2.0.0-dev.2021117.00
2.0.0-dev.2021116.00
2.0.0-dev.20211115.10
2.0.0-dev.20211115.00
2.0.0-alpha.00
2.0.0-alpha.0.230
2.0.0-dev.230
1.11.410
1.11.36
1.11.22
1.11.12
1.11.02
1.10.12
1.10.00
1.9.11
1.9.00
1.8.10
1.8.00
1.7.30
1.7.20
1.7.10
1.7.00
1.7.0-alpha.50
1.6.12
1.6.00
1.5.01
1.4.01
1.3.10
1.3.00
1.2.01
1.1.00
1.0.20
1.0.10
1.0.00
1.0.0-alpha.570
1.0.0-alpha.560
1.0.0-alpha.550
1.0.0-alpha.540
1.0.0-alpha.530
1.0.0-alpha.520
1.0.0-alpha.510
1.0.0-alpha.500
1.0.0-alpha.490
1.0.0-alpha.480
1.0.0-alpha.470
1.0.0-alpha.460
1.0.0-alpha.450
1.0.0-alpha.440
1.0.0-alpha.431
1.0.0-alpha.420
1.0.0-alpha.410
1.0.0-alpha.400
1.0.0-alpha.390
1.0.0-alpha.380
1.0.0-alpha.370
1.0.0-alpha.360
1.0.0-alpha.350
1.0.0-alpha.340
1.0.0-alpha.330
1.0.0-alpha.320
1.0.0-alpha.310
1.0.0-alpha.300
1.0.0-alpha.290
1.0.0-alpha.280
1.0.0-alpha.270
1.0.0-alpha.260
1.0.0-alpha.250
1.0.0-alpha.240
1.0.0-alpha.230
1.0.0-alpha.221
1.0.0-alpha.210
1.0.0-alpha.200
1.0.0-alpha.190
1.0.0-alpha.180
1.0.0-alpha.170
1.0.0-alpha.160
1.0.0-alpha.150
1.0.0-alpha.140
1.0.0-alpha.130
1.0.0-alpha.120
1.0.0-alpha.110
1.0.0-alpha.100
1.0.0-alpha.90
1.0.0-alpha.80
1.0.0-alpha.70
1.0.0-alpha.50
1.0.0-alpha.40
1.0.0-alpha.30
1.0.0-alpha.20
1.0.0-alpha.10
1.0.0-alpha.00
0.32.00
0.31.00
0.30.10
0.30.00
0.29.00
0.28.00
0.27.01
0.26.10
0.26.00
0.25.00
0.24.10
0.24.00
0.23.00
0.22.01
0.21.10
0.21.00
0.20.00
0.19.01
0.18.00
0.17.00
0.16.21
0.16.10
0.16.00
0.15.00
0.14.00
0.13.00
0.12.00
0.11.0-beta.20
0.11.0-beta0
0.10.0-alpha.20
0.10.0-alpha0
0.9.02
0.9.0-alpha.22
0.9.0-alpha2
0.8.0-alpha.61
0.8.0-alpha.52
0.8.0-alpha.42
0.8.0-alpha.30
0.8.0-alpha.20
0.8.0-alpha0
0.7.00
0.6.10
0.6.00
0.5.00
0.4.10
0.4.00
0.3.00
0.2.01
0.1.00

Package Sidebar

Install

npm i markuplint

Weekly Downloads

32,724

Version

4.11.8

License

MIT

Unpacked Size

74.2 kB

Total Files

61

Last publish

Collaborators

  • yusukehirao