Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
markdownlint-cli
Advanced tools
The markdownlint-cli package is a command-line interface for the markdownlint library, which is used to lint Markdown files. It helps ensure that Markdown files adhere to a consistent style and are free of common errors.
Linting a single file
This command lints a single Markdown file (README.md) and outputs any issues found according to the default rules.
markdownlint README.md
Linting multiple files
This command lints all Markdown files in the 'docs' directory and its subdirectories, using a glob pattern to match the files.
markdownlint "docs/**/*.md"
Using a custom configuration file
This command lints the README.md file using a custom configuration file (.markdownlint.json) to specify the rules and options.
markdownlint -c .markdownlint.json README.md
Fixing linting issues automatically
This command attempts to automatically fix any linting issues found in the README.md file.
markdownlint --fix README.md
Ignoring specific files or directories
This command lints all Markdown files in the current directory, but ignores the 'node_modules' directory.
markdownlint . --ignore node_modules
remark-cli is a command-line interface for the remark library, which is a Markdown processor powered by plugins. It can be used to lint, format, and transform Markdown files. Compared to markdownlint-cli, remark-cli offers more flexibility through its plugin system, allowing for a wider range of transformations and customizations.
markdown-it is a Markdown parser that can be extended with plugins to add custom rules and transformations. While it is primarily used for parsing and rendering Markdown, it can also be used for linting with the appropriate plugins. markdown-it is more focused on parsing and rendering, whereas markdownlint-cli is specifically designed for linting.
markdown-lint is another linter for Markdown files, similar to markdownlint-cli. It provides a set of rules to enforce consistent style and catch common errors. However, markdown-lint is less feature-rich and less actively maintained compared to markdownlint-cli.
Command Line Interface for MarkdownLint
npm install -g markdownlint-cli
$ markdownlint --help
Usage: markdownlint [options] <files|directories|globs>
MarkdownLint Command Line Interface
Options:
-h, --help output usage information
-V, --version output the version number
-s, --stdin read from STDIN (no files)
-o, --output [outputFile] write issues to file (no console)
-c, --config [configFile] configuration file (JSON or YAML)
-i, --ignore [file|directory|glob] files to ignore/exclude
-r, --rules [file|directory|glob|package] custom rule files
markdownlint-cli
reuses the rules from markdownlint
package.
Configuration is stored JSON or INI files in the same config format.
The example of configuration file:
{
"default": true,
"MD003": { "style": "atx_closed" },
"MD007": { "indent": 4 },
"no-hard-tabs": false,
"whitespace": false
}
See test configuration file or style folder for more examples.
CLI argument --config
is not mandatory. If it is not provided, markdownlint-cli
looks for file .markdownlint.json
in current folder, or for file .markdownlintrc
in current or all upper folders. The algorithm is described in details on rc package page. If --config
argument is provided, the file must be valid JSON or YAML.
MIT © Igor Shubovych
FAQs
MarkdownLint Command Line Interface
The npm package markdownlint-cli receives a total of 259,747 weekly downloads. As such, markdownlint-cli popularity was classified as popular.
We found that markdownlint-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.