Skip to main content

Command line interface

Usage

$ markuplint target.html
$ markuplint target.html target2.html
$ markuplint "**/*.html"

The CLI takes target HTML files as variadic arguments. Or it accepts glob formats.

It returns the exit code 0 when it succeeded. And returns 1 if the result has problems one or more.

Options

Long OptionShort OptionArgumentDefaultDescription
--config-cFile pathnoneA configuration file path
--fixnonenonefalseFix target files if the rule supports.
--format-fJSON, Simple, GitHub or StandardStandardSelect output format.
--no-search-confignonenonefalseNo search a configure file automatically.
--ignore-extnonenonefalseEvaluate files that are received even though the type of extension.
--no-import-preset-rulesnonenonefalseNo import preset rules.
--localenoneLanguage code (example: en)OS settingLocale of the message of violation.
--no-colornonenonefalseOutput no color.
--problem-only-pnonefalseOutput only problems.
--allow-warningsnonenonefalseReturn status code 0 even if there are warnings.
--no-allow-empty-inputnonenonefalseReturn status code 1 even if there are no input files.
--verbosenonenonefalseOutput with detailed information.
--include-node-modulesnonenonefalseInclude files in node_modules directory.

Particular run

--help

Show help. (Short option: -h)

--version

Show installed version. (Short option: -v)

--init

Initialization; Create a configuration file and install dependencies.

$ npx markuplint --init

Answer questions interactively. Then it installs modules needed.