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 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.
--localenonenoneOS settingLocale of the message of violation.
--no-colornonenonefalseOutput no color.
--problem-only-pnonefalseOutput only problems.
--verbosenonenonefalseOutput with detailed information.

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.

--create-rule

See Creating custom rule.