{"id":21301739,"url":"https://github.com/funbox/markdown-lint","last_synced_at":"2025-07-11T20:31:22.999Z","repository":{"id":38419028,"uuid":"304628973","full_name":"funbox/markdown-lint","owner":"funbox","description":"Markdown code style linter","archived":false,"fork":false,"pushed_at":"2023-10-02T10:23:27.000Z","size":386,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-06T08:35:29.808Z","etag":null,"topics":["linter","markdown"],"latest_commit_sha":null,"homepage":"","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/funbox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-16T13:02:43.000Z","updated_at":"2023-04-18T21:45:12.000Z","dependencies_parsed_at":"2023-02-08T12:15:27.026Z","dependency_job_id":null,"html_url":"https://github.com/funbox/markdown-lint","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/funbox/markdown-lint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funbox%2Fmarkdown-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funbox%2Fmarkdown-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funbox%2Fmarkdown-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funbox%2Fmarkdown-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funbox","download_url":"https://codeload.github.com/funbox/markdown-lint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funbox%2Fmarkdown-lint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264892200,"owners_count":23679252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["linter","markdown"],"created_at":"2024-11-21T15:50:38.534Z","updated_at":"2025-07-11T20:31:17.990Z","avatar_url":"https://github.com/funbox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⛔ THIS REPO IS UNMAINTAINED\n\nFuture development moved to \u003chttps://github.com/343dev/markdown-lint\u003e.\n\n# @funboxteam/markdown-lint\n\n\u003cimg align=\"right\" width=\"192\" height=\"159\"\n  alt=\"Avatar: Shiny Markdown logo with a sparkle\"\n  src=\"./logo.png\"\u003e\n\n[![npm](https://img.shields.io/npm/v/@funboxteam/markdown-lint.svg)](https://www.npmjs.com/package/@funboxteam/markdown-lint)\n\nMarkdown code style linter that makes your documentation looks nicer.\n\nIt’s based on [Prettier](https://github.com/prettier/prettier),\n[Remark](https://github.com/remarkjs/remark) \u0026\n[Typograf](https://github.com/typograf/typograf).\n\n[По-русски](./README.ru.md)\n\n## Rationale\n\nSome projects have a lot of documentation inside the repos. Once we decided to\nstart linting their grammar and check for spelling errors. For that purpose we\nbuilt [languagetool-node](https://github.com/funbox/languagetool-node).\n\nBut at the same time we decided to lint the Markdown syntax of those files, as\nwe do with our JS, CSS, etc files. And we’ve created this linter.\n\n## Getting Started\n\nTo install the tool and use it globally run:\n\n```bash\nnpm install -g @funboxteam/markdown-lint\n```\n\nTo install the tool into the project and setup pre-commit hook run:\n\n```bash\nnpm install --dev husky lint-staged @funboxteam/markdown-lint\n```\n\n## Project Setup\n\nTo automatically lint Markdown files on precommit you should setup `husky` and\n`lint-staged` to work with `markdown-lint` in your project’s package.json.\n\nExample:\n\n```json\n{\n  \"husky\": {\n    \"hooks\": {\n      \"pre-commit\": \"lint-staged\"\n    }\n  },\n  \"lint-staged\": {\n    \"*.md\": [\n      \"markdown-lint --fix --typograph\"\n    ]\n  }\n}\n```\n\n## CLI Usage\n\nTo check files and directories manually you should run `markdown-lint`:\n\n```bash\n# check the passed file\nmarkdown-lint README.md\n\n# check all the files inside the passed directory (w/o recursive search)\nmarkdown-lint ./docs\n\n# check all the files inside the passed directory (recursively)\nmarkdown-lint -r ./docs\n\n# check the passed file and automatically fix errors\nmarkdown-lint --fix README.md\n```\n\n### Options\n\n- `--fix` — automatically fix errors.\n- `--ext \u003cvalue\u003e` — specify file extensions (default: `md`). It’s possible to\n  set several extensions like this: `--ext apib --ext txt`.\n- `-t, --typograph` — run typograph over the text inside the files.\n- `-r, --recursive` — search for files in the subdirectories of the passed\n  directory.\n- `-c, --config \u003cfile\u003e` — use external config file to extend the default one.\n- `-v, --version` — show current tool version.\n- `-h, --help` — show help.\n\n## Configuration\n\nThe linter works upon the Markdown processor called\n[remark](https://github.com/remarkjs/remark).\n\nThe linting itself works is done by\n[remark-lint](https://github.com/remarkjs/remark-lint) and the set of rules\ndefined in\n[remark-preset-lint-markdown-style-guide](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide#rules).\n\nYou may use your own configuration file by passing the path to that file using\n`--config` option:\n\n```bash\nmarkdown-lint --fix --config ~/.markdownlintrc.js README.md\n```\n\nExample of configuration file:\n\n```javascript\nmodule.exports = {\n  // prettier is used when `--fix` is passed\n  prettier: {\n    // hard wrap lines to 120 characters\n    printWidth: '120'\n  },\n\n  remark: {\n    // plugins for remark-lint\n    plugins: [\n      // print errors when there're lines longer that 120 characters\n      [require('remark-lint-maximum-line-length'), 120],\n\n      // disable rule `no-inline-padding`\n      [require('remark-lint-no-inline-padding'), false],\n\n      // set `*` as the only allowed marker for unordered list\n      [require('remark-lint-unordered-list-marker-style'), '*']\n    ],\n\n    // settings for remark-stringify which is used when `--fix` is passed\n    stringifySettings: {\n      // automatically replace list markers to `*`\n      bullet: '*'\n    }\n  },\n\n  typograf: {\n    // rules API — https://github.com/typograf/typograf/blob/dev/docs/api_rules.md\n    // list of ruls — https://github.com/typograf/typograf/blob/dev/docs/RULES.en-US.md\n    locale: ['ru', 'en-US'],\n    enableRules: [],\n    disableRules: [\n      // these rules have to be turned off to make it possible to use typograph\n      'common/space/delTrailingBlanks',\n      'common/space/trimLeft',\n      'common/space/trimRight'\n    ],\n    rulesSettings: []\n  }\n};\n```\n\n## Example\n\n### Original text\n\n```markdown\nLinux kernel\n============\n\nThere are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.\n\nIn order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``.  The formatted documentation can also be read online at:\n\n    https://www.kernel.org/doc/html/latest/\n\nThere are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation.\n\nPlease read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.\n\n__Useful links__\n\n* [Linux kernel licensing rules](https://www.kernel.org/doc/html/latest/process/license-rules.html#kernel-licensing)\n* [Reporting bugs](https://www.kernel.org/doc/html/latest/admin-guide/reporting-bugs.html)\n```\n\n### The text processed with `--fix` option enabled\n\n````markdown\n# Linux kernel\n\nThere are several guides for kernel developers and users. These guides can be\nrendered in a number of formats, like HTML and PDF. Please read\nDocumentation/admin-guide/README.rst first.\n\nIn order to build the documentation, use `make htmldocs` or `make pdfdocs`. The\nformatted documentation can also be read online at:\n\n```\nhttps://www.kernel.org/doc/html/latest/\n```\n\nThere are various text files in the Documentation/ subdirectory, several of them\nusing the Restructured Text markup notation.\n\nPlease read the Documentation/process/changes.rst file, as it contains the\nrequirements for building and running the kernel, and information about the\nproblems which may result by upgrading your kernel.\n\n**Useful links**\n\n- [Linux kernel licensing rules](https://www.kernel.org/doc/html/latest/process/license-rules.html#kernel-licensing)\n- [Reporting bugs](https://www.kernel.org/doc/html/latest/admin-guide/reporting-bugs.html)\n````\n\n## Credits\n\nShiny picture for the project was made by\n[Igor Garybaldi](https://pandabanda.com/).\n\n[![Sponsored by FunBox](https://funbox.ru/badges/sponsored_by_funbox_centered.svg)](https://funbox.ru)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunbox%2Fmarkdown-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunbox%2Fmarkdown-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunbox%2Fmarkdown-lint/lists"}