{"name":"remark-lint-rule-style","version":"2.0.0","description":"remark-lint rule to warn when horizontal rules violate a given style","license":"MIT","keywords":["remark","lint","rule","remark-lint-rule","horizontal","thematic","break"],"repository":{"type":"git","url":"https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-rule-style"},"bugs":{"url":"https://github.com/remarkjs/remark-lint/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{"unified-lint-rule":"^1.0.0","unist-util-generated":"^1.1.0","unist-util-position":"^3.0.0","unist-util-visit":"^2.0.0"},"xo":false,"_id":"remark-lint-rule-style@2.0.0","_nodeVersion":"13.10.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-fdRfLUE5AJiFEn9rWTQrHwOUG3UcYtIxbWnR7YFvuPlFmzcMRwRHP5ZOcrj4KIpwCdVtlPI3h08m0kfO7a1KlQ==","shasum":"8e1f750975f931065023eb4ebaf8133b73042837","tarball":"http://registry-npm.ywwl.com/remark-lint-rule-style/download/remark-lint-rule-style-2.0.0.tgz","fileCount":3,"unpackedSize":8523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJege71CRA9TVsSAnZWagAAxvgQAIrCTuu/NyJ1MtH5HBu5\nJ+yALBGCuz3kKcjHakK7rloLW2EDsExgARKM2pjVPitUl74kiqmw6PoEvTQn\nfQWLFgtlwVy6B4zEaYpdhyNxbQgGhKW7yrzKvjsbyc01lmrjQhZvsridGxmm\ndw37+gWKEci+PQ/KJRDCLYGwCc7tLDa1+KVOXAn/O4hSMzpwvo0K0W8YEuYq\n2AZs3Z1XiWKe8h3LFxTG+YxqfJPFR+Ry4b50eSLTaGr5EMtT2BpIKwDDTnoo\nKNTRihA5fbtYU9yA33y2q0GqWrsSH8rsLHSwJTHaHW3YQudhEa3yfc9Q5B5L\n9t7AuM4Y7sc0NEl1G5eahDPwfOxFjZg8RkoydkAmTFCjjRWu82eNUjmxo6Mb\nYRytqKq5jl3D4q4yriF5nLoXCxfojhE6eruwNy7x9Kpc86VWpiYpdtf5uShq\nX5fmmb752vLQ3wH305f/A5FsWAejSOof7fg3l3V+G/P2jA/CgfKOpVW3tpjc\n3NKvvmg/zpqHEsg0NaqAUxFkiIn0wL+l8WqI+D0TNfml2Z5fK2zRb0JBlg0m\nTtWK4gR9wLHKaPMoFscPeauB7EerbPHHazIjNj9VCEetPJb4Q38lv81tqiU6\nrGXWw991Wc7C8JvSfn3bst3dogC5/8+wGSZ8VqhN1zljDi7cTZFPRbC8vrks\nzx9Y\r\n=enpw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCX6IQYSR4C08P/yq7/sHCfypQPEOqwYKJsFqA+NCwnOQIgWm400pXwzTx7fxMP+5uqFHoUmWezyq+S+Zh+WxBLI6I="}],"size":2679,"noattachment":false,"key":"/remark-lint-rule-style/-/remark-lint-rule-style-2.0.0.tgz"},"maintainers":[{"email":"johnotander@gmail.com","name":"johno"},{"email":"tituswormer@gmail.com","name":"wooorm"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-lint-rule-style_2.0.0_1585573620849_0.10503579751053516"},"_hasShrinkwrap":false,"readme":"<!--This file is generated-->\n\n# remark-lint-rule-style\n\n[![Build][badge-build-image]][badge-build-url]\n[![Coverage][badge-coverage-image]][badge-coverage-url]\n[![Downloads][badge-downloads-image]][badge-downloads-url]\n[![Size][badge-size-image]][badge-size-url]\n[![Sponsors][badge-funding-sponsors-image]][badge-funding-url]\n[![Backers][badge-funding-backers-image]][badge-funding-url]\n[![Chat][badge-chat-image]][badge-chat-url]\n\n[`remark-lint`][github-remark-lint] rule to warn when thematic breaks (horizontal rules) are\ninconsistent.\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Presets](#presets)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`unified().use(remarkLintRuleStyle[, options])`](#unifieduseremarklintrulestyle-options)\n  * [`Options`](#options)\n* [Recommendation](#recommendation)\n* [Fix](#fix)\n* [Examples](#examples)\n* [Compatibility](#compatibility)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis package checks markers and whitespace of thematic rules.\n\n## When should I use this?\n\nYou can use this package to check that thematic breaks are consistent.\n\n## Presets\n\nThis plugin is included in the following presets:\n\n| Preset | Options |\n| - | - |\n| [`remark-preset-lint-consistent`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-consistent) | `'consistent'` |\n| [`remark-preset-lint-markdown-style-guide`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide) | `'---'` |\n\n## Install\n\nThis package is [ESM only][github-gist-esm].\nIn Node.js (version 16+),\ninstall with [npm][npm-install]:\n\n```sh\nnpm install remark-lint-rule-style\n```\n\nIn Deno with [`esm.sh`][esm-sh]:\n\n```js\nimport remarkLintRuleStyle from 'https://esm.sh/remark-lint-rule-style@4'\n```\n\nIn browsers with [`esm.sh`][esm-sh]:\n\n```html\n<script type=\"module\">\n  import remarkLintRuleStyle from 'https://esm.sh/remark-lint-rule-style@4?bundle'\n</script>\n```\n\n## Use\n\nOn the API:\n\n```js\nimport remarkLint from 'remark-lint'\nimport remarkLintRuleStyle from 'remark-lint-rule-style'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport {read} from 'to-vfile'\nimport {unified} from 'unified'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await read('example.md')\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintRuleStyle)\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))\n```\n\nOn the CLI:\n\n```sh\nremark --frail --use remark-lint --use remark-lint-rule-style .\n```\n\nOn the CLI in a config file (here a `package.json`):\n\n```diff\n …\n \"remarkConfig\": {\n   \"plugins\": [\n     …\n     \"remark-lint\",\n+    \"remark-lint-rule-style\",\n     …\n   ]\n }\n …\n```\n\n## API\n\nThis package exports no identifiers.\nIt exports the [TypeScript][typescript] type\n[`Options`][api-options].\nThe default export is\n[`remarkLintRuleStyle`][api-remark-lint-rule-style].\n\n### `unified().use(remarkLintRuleStyle[, options])`\n\nWarn when thematic breaks (horizontal rules) are inconsistent.\n\n###### Parameters\n\n* `options` ([`Options`][api-options], default: `'consistent'`)\n  — preferred style or whether to detect the first style and warn for\n  further differences\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n* `'consistent'`\n  — detect the first used style and warn when further rules differ\n* `string` (example: `'** * **'`, `'___'`)\n  — thematic break to prefer\n\n###### Type\n\n```ts\ntype Options = string | 'consistent'\n```\n\n## Recommendation\n\nRules consist of a `*`, `-`, or `_` character,\nwhich occurs at least three times with nothing else except for arbitrary\nspaces or tabs on a single line.\nUsing spaces, tabs, or more than three markers is unnecessary work to type\nout.\nAs asterisks can be used as a marker for more markdown constructs,\nit’s recommended to use that for rules (and lists, emphasis, strong) too.\nSo it’s recommended to pass `'***'`.\n\n## Fix\n\n[`remark-stringify`][github-remark-stringify] formats rules with `***` by\ndefault.\nThere are three settings to control rules:\n\n* `rule` (default: `'*'`) — marker\n* `ruleRepetition` (default: `3`) — repetitions\n* `ruleSpaces` (default: `false`) — use spaces between markers\n\n## Examples\n\n##### `ok.md`\n\n###### In\n\n```markdown\nTwo rules:\n\n* * *\n\n* * *\n```\n\n###### Out\n\nNo messages.\n\n##### `ok.md`\n\nWhen configured with `'_______'`.\n\n###### In\n\n```markdown\n_______\n\n_______\n```\n\n###### Out\n\nNo messages.\n\n##### `not-ok.md`\n\n###### In\n\n```markdown\n***\n\n* * *\n```\n\n###### Out\n\n```text\n3:1-3:6: Unexpected thematic rule `* * *`, expected `***`\n```\n\n##### `not-ok.md`\n\nWhen configured with `'🌍'`.\n\n###### Out\n\n```text\n1:1: Unexpected value `🌍` for `options`, expected thematic rule or `'consistent'`\n```\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line,\n`remark-lint-rule-style@4`,\ncompatible with Node.js 16.\n\n## Contribute\n\nSee [`contributing.md`][github-dotfiles-contributing] in [`remarkjs/.github`][github-dotfiles-health] for ways\nto get started.\nSee [`support.md`][github-dotfiles-support] for ways to get help.\n\nThis project has a [code of conduct][github-dotfiles-coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][file-license] © [Titus Wormer][author]\n\n[api-options]: #options\n\n[api-remark-lint-rule-style]: #unifieduseremarklintrulestyle-options\n\n[author]: https://wooorm.com\n\n[badge-build-image]: https://github.com/remarkjs/remark-lint/workflows/main/badge.svg\n\n[badge-build-url]: https://github.com/remarkjs/remark-lint/actions\n\n[badge-chat-image]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[badge-chat-url]: https://github.com/remarkjs/remark/discussions\n\n[badge-coverage-image]: https://img.shields.io/codecov/c/github/remarkjs/remark-lint.svg\n\n[badge-coverage-url]: https://codecov.io/github/remarkjs/remark-lint\n\n[badge-downloads-image]: https://img.shields.io/npm/dm/remark-lint-rule-style.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark-lint-rule-style\n\n[badge-funding-backers-image]: https://opencollective.com/unified/backers/badge.svg\n\n[badge-funding-sponsors-image]: https://opencollective.com/unified/sponsors/badge.svg\n\n[badge-funding-url]: https://opencollective.com/unified\n\n[badge-size-image]: https://img.shields.io/bundlejs/size/remark-lint-rule-style\n\n[badge-size-url]: https://bundlejs.com/?q=remark-lint-rule-style\n\n[esm-sh]: https://esm.sh\n\n[file-license]: https://github.com/remarkjs/remark-lint/blob/main/license\n\n[github-dotfiles-coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[github-dotfiles-contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[github-dotfiles-health]: https://github.com/remarkjs/.github\n\n[github-dotfiles-support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[github-gist-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[github-remark-lint]: https://github.com/remarkjs/remark-lint\n\n[github-remark-stringify]: https://github.com/remarkjs/remark/tree/main/packages/remark-stringify\n\n[npm-install]: https://docs.npmjs.com/cli/install\n\n[typescript]: https://www.typescriptlang.org\n","publish_time":1585573620973,"_cnpm_publish_time":1585573620973,"dist-tags":{"latest":"4.0.1"}}