{"_id":"@343dev/markdown-lint","_rev":"2-f587f9ce46b4a8e4efd128a0eed7578b","name":"@343dev/markdown-lint","dist-tags":{"latest":"3.0.1"},"versions":{"2.0.1":{"name":"@343dev/markdown-lint","version":"2.0.1","keywords":["markdown","linter"],"author":{"url":"https://github.com/343dev","name":"Andrey Warkentin"},"license":"MIT","_id":"@343dev/markdown-lint@2.0.1","maintainers":[{"name":"343dev","email":"343dev@gmail.com"}],"homepage":"https://github.com/343dev/markdown-lint#readme","bugs":{"url":"https://github.com/343dev/markdown-lint/issues"},"bin":{"markdown-lint":"cli.js"},"dist":{"shasum":"fdac79f069a2c0e6f7a403d1f36e341489c7a173","tarball":"https://registry.npmjs.org/@343dev/markdown-lint/-/markdown-lint-2.0.1.tgz","fileCount":12,"integrity":"sha512-lFBsYxycCn9h4YpxAP8MNM++YfPKQOfQQSDDIVxYtilrbcnhcXbA2a079ypYjxo3nnW1ZlNFvwkXjB5GxN3AUA==","signatures":[{"sig":"MEUCIGUnSntXaED8JvH241QTFbuvDnA1tjNa3GGyqgbFRlP2AiEA5JYNZkT1QyWa+7jVYQXBiWTzazsVsKC9XOKSkunAMGg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23736},"main":"index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"gitHead":"2a6f4c1678c352e63c42e7d5a7def856b707135b","scripts":{"lint":"npm run lint-js && npm run lint-md","test":"echo \"Error: no test specified\" && exit 1","lint-js":"eslint .","lint-md":"./cli.js -r ."},"_npmUser":{"name":"343dev","email":"343dev@gmail.com"},"repository":{"url":"git+https://github.com/343dev/markdown-lint.git","type":"git"},"_npmVersion":"9.5.0","description":"Markdown code style linter","directories":{},"lint-staged":{"*.js":["eslint --fix"],"*.md":["./cli.js --fix --typograph"]},"_nodeVersion":"18.15.0","dependencies":{"glob":"7.1.6","remark":"13.0.0","prettier":"2.2.1","typograf":"6.11.3","commander":"6.2.0","eyo-kernel":"2.5.6","remark-textr":"4.0.0","vfile-reporter":"6.0.1","remark-preset-lint-markdown-style-guide":"4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"husky":"4.3.8","eslint":"7.32.0","lint-staged":"10.5.2","@funboxteam/eslint-config":"7.3.0"},"_npmOperationalInternal":{"tmp":"tmp/markdown-lint_2.0.1_1693769125858_0.9477580307369304","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@343dev/markdown-lint","version":"3.0.0","keywords":["markdown","linter"],"author":{"url":"https://github.com/343dev","name":"Andrey Warkentin"},"license":"MIT","_id":"@343dev/markdown-lint@3.0.0","maintainers":[{"name":"343dev","email":"cccode@duck.com"}],"homepage":"https://github.com/343dev/markdown-lint#readme","bugs":{"url":"https://github.com/343dev/markdown-lint/issues"},"bin":{"markdown-lint":"cli.js"},"dist":{"shasum":"1e814e1f4dae3ec9fb5d1f3ed38c4eb99f34ddf3","tarball":"https://registry.npmjs.org/@343dev/markdown-lint/-/markdown-lint-3.0.0.tgz","fileCount":12,"integrity":"sha512-L17sS09YnOCC6p10fUQ9/bT2uJYYGDP9LKAyCoHzRoOqY8+Chlud+3YJI7naBaZX10HxhDgGmKR24XP0sd9x2w==","signatures":[{"sig":"MEYCIQD5nQfvucrRcMYBh0E+0vENXkJbuTzRcUpj/4F7EtkoEgIhAImUU98U/8WcnABCwBEBwS8xsNgVLS9cOd2sW1kLL+wf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538},"type":"module","engines":{"node":">=16"},"exports":"./index.js","gitHead":"566282e7486381b868ed9b45cc73ad3a481ad7ce","scripts":{"lint":"npm run lint-js && npm run lint-md","test":"echo \"Error: no test specified\" && exit 1","lint-js":"eslint .","lint-md":"./cli.js .","update-git-hooks":"npx simple-git-hooks"},"_npmUser":{"name":"343dev","email":"cccode@duck.com"},"repository":{"url":"git+https://github.com/343dev/markdown-lint.git","type":"git"},"_npmVersion":"10.2.4","description":"Markdown code style linter","directories":{},"lint-staged":{"*.js":"eslint --fix","*.md":"./cli.js --fix --typograph"},"_nodeVersion":"20.11.1","dependencies":{"fdir":"^6.1.1","remark":"^15.0.1","prettier":"^3.2.5","typograf":"^7.4.0","commander":"^12.0.0","eyo-kernel":"^2.5.6","remark-textr":"^6.1.0","vfile-reporter":"^8.1.0","remark-preset-lint-markdown-style-guide":"^5.1.3"},"eslintConfig":{"env":{"node":true},"rules":{"no-warning-comments":"off","capitalized-comments":"off","object-curly-spacing":["error","always"],"unicorn/no-array-reduce":"off"},"extends":["xo","plugin:unicorn/recommended"],"plugins":["import"]},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.0","lint-staged":"^15.2.2","eslint-config-xo":"^0.44.0","simple-git-hooks":"^2.11.1","eslint-plugin-import":"^2.29.1","eslint-plugin-unicorn":"^51.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/markdown-lint_3.0.0_1711624726798_0.25392591912175133","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"@343dev/markdown-lint","version":"3.0.1","description":"Markdown code style linter","keywords":["markdown","linter"],"license":"MIT","author":{"name":"Andrey Warkentin","url":"https://github.com/343dev"},"repository":{"type":"git","url":"git+https://github.com/343dev/markdown-lint.git"},"type":"module","exports":"./index.js","bin":{"markdown-lint":"cli.js"},"scripts":{"lint-js":"eslint .","lint-md":"./cli.js .","lint":"npm run lint-js && npm run lint-md","test":"echo \"Error: no test specified\" && exit 1","update-git-hooks":"npx simple-git-hooks"},"engines":{"node":">=16"},"dependencies":{"commander":"^12.0.0","eyo-kernel":"^2.5.6","fdir":"^6.2.0","prettier":"^3.3.3","remark":"^15.0.1","remark-preset-lint-markdown-style-guide":"^5.1.3","remark-textr":"^6.1.0","typograf":"^7.4.1","vfile-reporter":"^8.1.1"},"devDependencies":{"@343dev/eslint-config":"^1.0.0","eslint":"^8.57.0","lint-staged":"^15.2.8","simple-git-hooks":"^2.11.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"lint-staged":{"*.js":"eslint --fix","*.md":"./cli.js --fix --typograph"},"eslintConfig":{"extends":"@343dev"},"_id":"@343dev/markdown-lint@3.0.1","gitHead":"a3006a62e461aeef60c4bb142707d47eee265d73","bugs":{"url":"https://github.com/343dev/markdown-lint/issues"},"homepage":"https://github.com/343dev/markdown-lint#readme","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-BeEVGiwmt74xkHKb7faDeAEmlRgN+Vz98YEAgoOen7X17qWTHnnloEUmPlJ7xU8oNDPf1Ydv5yrj3nlYLJSDPQ==","shasum":"8e57cd0a82b4f23a73fcf86e1a49ece00e3300b2","tarball":"https://registry.npmjs.org/@343dev/markdown-lint/-/markdown-lint-3.0.1.tgz","fileCount":12,"unpackedSize":24137,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAt3hTSHZsbs2FOc+mvm2YU0XxW4xogBpwvCLuoWQktbAiAKrVnnu2QTKB7N/fRvRY/ncQK0q826orGCmZQ+kjkjYA=="}]},"_npmUser":{"name":"343dev","email":"343dev@gmail.com"},"directories":{},"maintainers":[{"name":"343dev","email":"343dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-lint_3.0.1_1723019059030_0.30475459974262264"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-03T19:25:25.746Z","modified":"2024-08-07T08:24:19.332Z","2.0.1":"2023-09-03T19:25:26.032Z","3.0.0":"2024-03-28T11:18:47.013Z","3.0.1":"2024-08-07T08:24:19.168Z"},"bugs":{"url":"https://github.com/343dev/markdown-lint/issues"},"author":{"name":"Andrey Warkentin","url":"https://github.com/343dev"},"license":"MIT","homepage":"https://github.com/343dev/markdown-lint#readme","keywords":["markdown","linter"],"repository":{"type":"git","url":"git+https://github.com/343dev/markdown-lint.git"},"description":"Markdown code style linter","maintainers":[{"name":"343dev","email":"343dev@gmail.com"}],"readme":"# @343dev/markdown-lint\n\n<img align=\"right\" width=\"192\" height=\"159\"\nalt=\"Аватар: Яркое градиентное лого Markdown со звёздочкой\"\nsrc=\"./logo.png\">\n\n[![npm](https://img.shields.io/npm/v/@343dev/markdown-lint.svg)](https://www.npmjs.com/package/@343dev/markdown-lint)\n\nКонсольная утилита для проверки Markdown-файлов на соответствие указанным\nстандартам качества.\n\nОснована на [Prettier](https://github.com/prettier/prettier),\n[Remark](https://github.com/remarkjs/remark) и\n[Typograf](https://github.com/typograf/typograf).\n\n## Мотивация\n\nПорой репозитории с проектами содержат большое количество файлов с\nдокументацией. Однажды мы решили начать проверять грамматику и орфографию в\nтаких файлах, и создали для этих целей\n[languagetool-node](https://github.com/343dev/languagetool-node).\n\nВ то же время мы решили проверять синтаксис Markdown-файлов, как мы проверяем\nJS, CSS и иные файлы проекта. Потому создали этот линтер.\n\n## Установка\n\nДля глобальной установки и использования CLI-утилиты:\n\n```bash\nnpm install -g @343dev/markdown-lint\n```\n\nДля установки в проект:\n\n```bash\nnpm install --dev @343dev/markdown-lint\n```\n\n## Работа с CLI\n\nДля ручной проверки файлов или директорий можно обращаться к `markdown-lint` из\nкомандной строки:\n\n```bash\n# проверка файла на наличие ошибок\nmarkdown-lint README.md\n\n# проверка файлов внутри директории (без поиска в поддиректориях)\nmarkdown-lint ./docs\n\n# проверка файлов внутри директории (с поиском в поддиректориях)\nmarkdown-lint -r ./docs\n\n# проверка файла и автоматическое исправление ошибок\nmarkdown-lint --fix README.md\n```\n\n### Доступные флаги\n\n- `--fix` — автоматическое исправление ошибок;\n- `--ext <value>` — указание расширений файлов; допустимо последовательное\n  указание нескольких расширений, например `--ext apib --ext txt`. По умолчанию\n  `md`;\n- `-t, --typograph` — типографирование текста;\n- `-r, --recursive` — поиск файлов не только внутри указанной директории, но и\n  во всех поддиректориях;\n- `-c, --config <file>` — подключение внешнего файла с конфигурацией линтера;\n- `-v, --version` — вывод текущей версии линтера;\n- `-h, --help` — вывод справки.\n\n## Конфигурация линтера\n\nРабота линтера основана на Markdown-процессоре\n[remark](https://github.com/remarkjs/remark).\n\nЛинтинг производится с помощью библиотеки\n[remark-lint](https://github.com/remarkjs/remark-lint) и набора правил\n[remark-preset-lint-markdown-style-guide](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide#rules).\n\nДля тонкой настройки линтера нужно создать файл конфигурации и с помощью флага\n`--config` указать путь до него:\n\n```bash\nmarkdown-lint --fix --config ~/.markdownlintrc.cjs README.md\n```\n\nПример конфигурации:\n\n```javascript\nmodule.exports = {\n  // prettier обрабатывает тексты, когда `--fix` передан\n  prettier: {\n    // автоматически ограничиваем длину строки в 120 символов\n    printWidth: '120'\n  },\n\n  remark: {\n    // применяем настройки для remark-lint\n    plugins: [\n      // объявляем линтеру, что максимальная длина строки теперь равна 120 символам\n      ['remark-lint-maximum-line-length', 120],\n\n      // отключаем правило `no-inline-padding`\n      ['remark-lint-no-inline-padding', false],\n\n      // объявляем линтеру, что мы теперь используем `*` как маркер списка\n      ['remark-lint-unordered-list-marker-style', '*']\n    ],\n\n    // remark-stringify обрабатывает тексты, когда `--fix` передан\n    stringifySettings: {\n      // автоматически заменяем все маркеры списка на `*`\n      bullet: '*'\n    }\n  },\n\n  typograf: {\n    // API настроек — https://github.com/typograf/typograf/blob/dev/docs/api_rules.md\n    // список правил — https://github.com/typograf/typograf/blob/dev/docs/RULES.ru.md\n    locale: ['ru', 'en-US'],\n    enableRules: [],\n    disableRules: [\n      // обязательное отключение следующих правил требуется для правильной работы типографа\n      'common/space/delTrailingBlanks',\n      'common/space/trimLeft',\n      'common/space/trimRight'\n    ],\n    rulesSettings: []\n  }\n};\n```\n\n## Пример работы\n\n### До обработки с флагом `--fix`\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### После обработки\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## Благодарности\n\nЯркую картинку для репозитория нарисовал\n[Игорь Гарибальди](https://pandabanda.com/).\n","readmeFilename":"README.ru.md"}