{"id":13498686,"url":"https://github.com/igorshubovych/markdownlint-cli","last_synced_at":"2026-03-07T23:31:14.156Z","repository":{"id":3539243,"uuid":"49937981","full_name":"igorshubovych/markdownlint-cli","owner":"igorshubovych","description":"MarkdownLint Command Line Interface","archived":false,"fork":false,"pushed_at":"2026-02-19T19:08:15.000Z","size":2502,"stargazers_count":1016,"open_issues_count":23,"forks_count":99,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-02-27T21:56:04.860Z","etag":null,"topics":["markdown","markdownlint"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igorshubovych.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-01-19T08:27:51.000Z","updated_at":"2026-02-27T12:01:15.000Z","dependencies_parsed_at":"2023-09-26T00:40:18.308Z","dependency_job_id":"7fdb93d9-5ce7-45ab-b859-0939626de90f","html_url":"https://github.com/igorshubovych/markdownlint-cli","commit_stats":{"total_commits":448,"total_committers":35,"mean_commits":12.8,"dds":0.5982142857142857,"last_synced_commit":"5024217725517ac3b8715781b6c6a785914fc64f"},"previous_names":[],"tags_count":63,"template":false,"template_full_name":null,"purl":"pkg:github/igorshubovych/markdownlint-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorshubovych%2Fmarkdownlint-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorshubovych%2Fmarkdownlint-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorshubovych%2Fmarkdownlint-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorshubovych%2Fmarkdownlint-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorshubovych","download_url":"https://codeload.github.com/igorshubovych/markdownlint-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorshubovych%2Fmarkdownlint-cli/sbom","scorecard":{"id":482786,"data":{"date":"2025-08-11","repo":{"name":"github.com/igorshubovych/markdownlint-cli","commit":"44645f3a756cd951daa85da198ff2ec5024a10c1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Maintained","score":10,"reason":"19 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 1/5 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/publish-container-image.yml:18","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/publish-container-image.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/igorshubovych/markdownlint-cli/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/igorshubovych/markdownlint-cli/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-container-image.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/igorshubovych/markdownlint-cli/publish-container-image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-container-image.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/igorshubovych/markdownlint-cli/publish-container-image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-container-image.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/igorshubovych/markdownlint-cli/publish-container-image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-container-image.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/igorshubovych/markdownlint-cli/publish-container-image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-container-image.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/igorshubovych/markdownlint-cli/publish-container-image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-container-image.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/igorshubovych/markdownlint-cli/publish-container-image.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating node:lts-alpine to node:lts-alpine@sha256:1b2479dd35a99687d6638f5976fd235e26c5b37e8122f786fcd5fe231d63de5b","Warn: npmCommand not pinned by hash: Dockerfile:7","Warn: npmCommand not pinned by hash: Dockerfile:9","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   1 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish-container-image.yml:15"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T17:02:13.528Z","repository_id":3539243,"created_at":"2025-08-19T17:02:13.532Z","updated_at":"2025-08-19T17:02:13.532Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29956098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T22:53:01.873Z","status":"ssl_error","status_checked_at":"2026-02-28T22:52:50.699Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["markdown","markdownlint"],"created_at":"2024-07-31T21:00:40.923Z","updated_at":"2026-03-07T23:31:14.116Z","avatar_url":"https://github.com/igorshubovych.png","language":"JavaScript","funding_links":[],"categories":["Supported Linters","optional","JavaScript","Tools","CLI Tools","markdown","Uncategorized"],"sub_categories":["Linters","Uncategorized"],"readme":"# markdownlint-cli\n\n[![GitHub Actions Build Status][actions-badge]][actions-url]\n\n\u003e Command Line Interface for [MarkdownLint][markdownlint]\n\n## Installation\n\n```bash\nnpm install -g markdownlint-cli\n```\n\nOn macOS you can install via [Homebrew](https://brew.sh/):\n\n```bash\nbrew install markdownlint-cli\n```\n\n## Usage\n\n```bash\nmarkdownlint --help\n\nUsage: markdownlint [options] [files|directories|globs...]\n\nMarkdownLint Command Line Interface\n\nArguments:\n  files|directories|globs                    files, directories, and/or globs to lint\n\nOptions:\n  -V, --version                              output the version number\n  -c, --config \u003cconfigFile\u003e                  configuration file (JSON, JSONC, JS, YAML, or TOML)\n  --configPointer \u003cpointer\u003e                  JSON Pointer to object within configuration file (default: \"\")\n  -d, --dot                                  include files/folders with a dot (for example `.github`)\n  -f, --fix                                  fix basic errors (does not work with STDIN)\n  -i, --ignore \u003cfile|directory|glob\u003e         file(s) to ignore/exclude (default: [])\n  -j, --json                                 write issues in json format\n  -o, --output \u003coutputFile\u003e                  write issues to file (no console)\n  -p, --ignore-path \u003cfile\u003e                   path to file with ignore pattern(s)\n  -q, --quiet                                do not write issues to STDOUT\n  -r, --rules \u003cfile|directory|glob|package\u003e  include custom rule files (default: [])\n  -s, --stdin                                read from STDIN (does not work with files)\n  --enable \u003crules...\u003e                        Enable certain rules, e.g. --enable MD013 MD041 --\n  --disable \u003crules...\u003e                       Disable certain rules, e.g. --disable MD013 MD041 --\n  -h, --help                                 display help for command\n```\n\nOr run using [Docker](https://www.docker.com) and [GitHub Packages](https://github.com/features/packages):\n\n```bash\ndocker run -v $PWD:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest \"*.md\"\n```\n\n\u003e **Note**\n\u003e Because `--enable` and `--disable` are [variadic arguments that accept multiple values][commander-variadic], it is necessary to end the list by passing `--` before the `\u003cfiles|directories|globs\u003e` argument like so: `markdownlint --disable MD013 -- README.md`.\n\n### Globbing\n\n`markdownlint-cli` supports advanced globbing patterns like `**/*.md` ([more information][globprimer]).\nWith shells like Bash, it may be necessary to quote globs so they are not interpreted by the shell.\nFor example, `--ignore *.md` would be expanded by Bash to `--ignore a.md b.md ...` before invoking `markdownlint-cli`, causing it to ignore only the first file because `--ignore` takes a single parameter (though it can be used multiple times).\nQuoting the glob like `--ignore '*.md'` passes it through unexpanded and ignores the set of files.\n\n#### Globbing examples\n\nTo lint all Markdown files in a Node.js project (excluding dependencies), the following commands might be used:\n\nWindows CMD: `markdownlint **/*.md --ignore node_modules`\n\nLinux Bash: `markdownlint '**/*.md' --ignore node_modules`\n\n### Ignoring files\n\nIf present in the current folder, a `.markdownlintignore` file will be used to ignore files and/or directories according to the rules for [gitignore][gitignore].\nIf the `-p`/`--ignore-path` option is present, the specified file will be used instead of `.markdownlintignore`.\n\nThe order of operations is:\n\n- Enumerate files/directories/globs passed on the command line\n- Apply exclusions from `-p`/`--ignore-path` (if specified) or `.markdownlintignore` (if present)\n- Apply exclusions from any `-i`/`--ignore` option(s) that are specified\n\n### Fixing errors\n\nWhen the `--fix` option is specified, `markdownlint-cli` tries to apply all fixes reported by the active rules and reports any errors that remain.\nBecause this option makes changes to the input files, it is good to make a backup first or work with files under source control so any unwanted changes can be undone.\n\n\u003e Because not all rules include fix information when reporting errors, fixes may overlap, and not all errors are fixable, `--fix` will not usually address all errors.\n\n## Configuration\n\n`markdownlint-cli` reuses [the rules][rules] from `markdownlint` package.\n\nConfiguration is stored in JSON, JSONC, YAML, INI, or TOML files in the same [config format][config].\n\nA sample configuration file:\n\n```json\n{\n  \"default\": true,\n  \"MD003\": { \"style\": \"atx_closed\" },\n  \"MD007\": { \"indent\": 4 },\n  \"no-hard-tabs\": false,\n  \"whitespace\": false\n}\n```\n\nFor more examples, see [.markdownlint.jsonc][markdownlint-jsonc], [.markdownlint.yaml][markdownlint-yaml], [test-config.toml](test/test-config.toml) or the [style folder][style-folder].\n\nThe CLI argument `--config` is not required.\nIf it is not provided, `markdownlint-cli` looks for the file `.markdownlint.jsonc`/`.markdownlint.json`/`.markdownlint.yaml`/`.markdownlint.yml` in current folder, or for the file `.markdownlintrc` in the current or all parent folders.\nThe algorithm is described in detail on the [`rc` package page][rc-standards].\nNote that when relying on the lookup of a file named `.markdownlintrc` in the current or parent folders, the only syntaxes accepted are INI and JSON, and the file cannot have an extension.\nIf the `--config` argument is provided, the file must be valid JSON, JSONC, JS, or YAML.\nJS configuration files contain JavaScript code, must have the `.js` or `.cjs` file extension, and must export (via `module.exports = ...`) a configuration object of the form shown above.\nIf your workspace _(project)_ is [ESM-only] _(`\"type\": \"module\"` set in the root `package.json` file)_, then the configuration file **should end with `.cjs` file extension**.\nA JS configuration file may internally `require` one or more npm packages as a way of reusing configuration across projects.\n\nThe `--configPointer` argument allows the use of [JSON Pointer][json-pointer] syntax to identify a sub-object within the configuration object (per above).\nThis argument can be used with any configuration file type and makes it possible to nest a configuration object within another file like `package.json` or `pyproject.toml` (e.g., via `/key` or `/key/subkey`).\n\n`--enable` and `--disable` override configuration files; if a configuration file disables `MD123` and you pass `--enable MD123`, it will be enabled.\nIf a rule is passed to both `--enable` and `--disable`, it will be disabled.\n\n\u003e - JS configuration files must be provided via the `--config` argument; they are not automatically loaded because running untrusted code is a security concern.\n\u003e - TOML configuration files must be provided via the `--config` argument; they are not automatically loaded.\n\n## Exit codes\n\n`markdownlint-cli` returns one of the following exit codes:\n\n- `0`: Program ran successfully\n- `1`: Linting errors\n- `2`: Unable to write `-o`/`--output` output file\n- `3`: Unable to load `-r`/`--rules` custom rule\n- `4`: Unexpected error (e.g. malformed config)\n\n## Use with pre-commit\n\nTo run `markdownlint-cli` as part of a [pre-commit][pre-commit] workflow, add something like the below to the `repos` list in the project's `.pre-commit-config.yaml`:\n\n```yaml\n- repo: https://github.com/igorshubovych/markdownlint-cli\n  rev: v0.45.0\n  hooks:\n  - id: markdownlint\n```\n\n\u003e Depending on the environment this workflow runs in, it may be necessary to [override the language version of Node.js used by pre-commit][pre-commit-version].\n\n## Related\n\n- [markdownlint][markdownlint] - API for this module\n- [markdownlint-cli2][markdownlint-cli2] - Alternate CLI implementation\n- [glob][glob] - Pattern matching implementation\n- [ignore][ignore] - `.markdownlintignore` implementation\n\n## License\n\nMIT © Igor Shubovych\n\n[actions-badge]: https://github.com/igorshubovych/markdownlint-cli/workflows/CI/badge.svg?branch=master\n[actions-url]: https://github.com/igorshubovych/markdownlint-cli/actions?query=workflow%3ACI\n[commander-variadic]: https://github.com/tj/commander.js#variadic-option\n[json-pointer]: https://datatracker.ietf.org/doc/html/rfc6901\n[markdownlint]: https://github.com/DavidAnson/markdownlint\n[markdownlint-cli2]: https://github.com/DavidAnson/markdownlint-cli2\n[markdownlint-jsonc]: https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.jsonc\n[markdownlint-yaml]: https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml\n[rules]: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md\n[config]: https://github.com/DavidAnson/markdownlint#optionsconfig\n[style-folder]: https://github.com/DavidAnson/markdownlint/tree/main/style\n[rc-standards]: https://www.npmjs.com/package/rc#standards\n[glob]: https://github.com/isaacs/node-glob\n[globprimer]: https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer\n[ignore]: https://github.com/kaelzhang/node-ignore\n[gitignore]: https://git-scm.com/docs/gitignore\n[pre-commit]: https://pre-commit.com/\n[pre-commit-version]: https://pre-commit.com/#overriding-language-version\n[ESM-only]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorshubovych%2Fmarkdownlint-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorshubovych%2Fmarkdownlint-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorshubovych%2Fmarkdownlint-cli/lists"}