{"name":"remark-lint-checkbox-character-style","version":"3.0.0","description":"remark-lint rule to warn when list item checkboxes violate a given style","license":"MIT","keywords":["remark","lint","rule","remark-lint-rule","checkbox","style","task","list"],"repository":{"type":"git","url":"https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-checkbox-character-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-checkbox-character-style@3.0.0","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-691OJ5RdBRXVpvnOEiBhMB4uhHJSHVttw83O4qyAkNBiqxa1Axqhsz8FgmzYgRLQbOGd2ncVUcXG1LOJt6C0DQ==","shasum":"3a982c7318ea86f80fe5ee5d6d8711b5b3cad0a2","tarball":"http://registry-npm.ywwl.com/remark-lint-checkbox-character-style/download/remark-lint-checkbox-character-style-3.0.0.tgz","fileCount":3,"unpackedSize":10659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhGkSCRA9TVsSAnZWagAAOBYQAJ80zz09QF21nnLUK56o\nH//xK5/1pW7b33IkB1OwbeTNquGTaEo3A+YKc9TeyKDx+cQmJ2tPCKxxrKpW\noyDJPruQz+EFsQkz7qXWeARyVvoVXPNouNkXe1ILGrV2TTO4fe6x7sgK+LXI\nVcX36kCT1JaHNfvgwq0cmOy6zw6GW9Zx7oCfCblF2MgmZAuTZz/eyoMb8/P3\nheyNU8aUxK32zQ64ffxHKoh14FM9H3Oruc8MTR8yp87jofXrpIlE/dmmLF9v\n91oTfWKXEljcexOtCyDlTes4Uq6rZLc7tuphf4lUuXBlqLcy83JICkd+T0rT\nNr8CGyiVVunpebtp6cK6gy6F+gz5pbcoULql4nQjTFoqZx8sUb25ne83pnR9\nTssg7k3ixXtHSdT6sMpv3GhsEtmH2czwo0ktIsyjll/3mSf6t5iH7ucS/VY6\ndhS6wazM8E0iINu4gdNvk/q8M3qoL3Di6D9fPYqXAY2B7WV569BWnjazKyOm\n0Rx3KabOcHS0Ni9a5JlUalM9exaTYDQxcfcmk8Ydyuc8DPaAj+1fgMZ3WSM8\no01JsUlmDtG8GRJ5anlYxqaxP+wyxklysXEvwr2EpT8tohRiqJiCfo6o04MP\nzaL961zIWSuVI/81SFx1Av+x1yVIm9CkeNIVRGH2KVgQ7wtEvAu4yb+qnNzO\nwmml\r\n=klQy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDrU7Cjt0tHinWLfD3FDGPn+6pGdqPScDFazZi8pmj4pAiAw8z9Cv8K/3/1G6h/V6BBUe2ILFhaVZHTwNhrSXjMhhA=="}],"size":3278,"noattachment":false,"key":"/remark-lint-checkbox-character-style/-/remark-lint-checkbox-character-style-3.0.0.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"},{"name":"johno","email":"johnotander@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-lint-checkbox-character-style_3.0.0_1602513169950_0.19885666504857835"},"_hasShrinkwrap":false,"readme":"<!--This file is generated-->\n\n# remark-lint-checkbox-character-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 list item checkboxes violate a given\nstyle.\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(remarkLintCheckboxCharacterStyle[, options])`](#unifieduseremarklintcheckboxcharacterstyle-options)\n  * [`Options`](#options)\n  * [`Styles`](#styles)\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 the character used in checkboxes.\n\n## When should I use this?\n\nYou can use this package to check that the style of GFM tasklists is\nconsistent.\nTask lists are a GFM feature enabled with\n[`remark-gfm`][github-remark-gfm].\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\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-checkbox-character-style\n```\n\nIn Deno with [`esm.sh`][esm-sh]:\n\n```js\nimport remarkLintCheckboxCharacterStyle from 'https://esm.sh/remark-lint-checkbox-character-style@5'\n```\n\nIn browsers with [`esm.sh`][esm-sh]:\n\n```html\n<script type=\"module\">\n  import remarkLintCheckboxCharacterStyle from 'https://esm.sh/remark-lint-checkbox-character-style@5?bundle'\n</script>\n```\n\n## Use\n\nOn the API:\n\n```js\nimport remarkLint from 'remark-lint'\nimport remarkLintCheckboxCharacterStyle from 'remark-lint-checkbox-character-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(remarkLintCheckboxCharacterStyle)\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-checkbox-character-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-checkbox-character-style\",\n     …\n   ]\n }\n …\n```\n\n## API\n\nThis package exports no identifiers.\nIt exports the [TypeScript][typescript] types\n[`Options`][api-options] and\n[`Styles`][api-styles].\nThe default export is\n[`remarkLintCheckboxCharacterStyle`][api-remark-lint-checkbox-character-style].\n\n### `unified().use(remarkLintCheckboxCharacterStyle[, options])`\n\nWarn when list item checkboxes violate a given style.\n\n###### Parameters\n\n* `options` ([`Options`][api-options], default: `'consistent'`)\n  — either preferred values or whether to detect the first styles\n  and warn for further differences\n\n###### Returns\n\nTransform ([`Transformer` from `unified`][github-unified-transformer]).\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Type\n\n```ts\ntype Options = Styles | 'consistent'\n```\n\n### `Styles`\n\nStyles (TypeScript type).\n\n###### Fields\n\n* `checked` (`'X'`, `'x'`, or `'consistent'`, default: `'consistent'`)\n  — preferred style to use for checked checkboxes\n* `unchecked` (`'␉'` (a tab), `'␠'` (a space), or `'consistent'`, default:\n  `'consistent'`)\n  — preferred style to use for unchecked checkboxes\n\n## Recommendation\n\nIt’s recommended to set `options.checked` to `'x'` (a lowercase X) as it\nprevents an extra keyboard press and `options.unchecked` to `'␠'` (a space)\nto make all checkboxes align.\n\n## Fix\n\n[`remark-stringify`][github-remark-stringify] formats checked checkboxes\nusing `'x'` (lowercase X) and unchecked checkboxes using `'␠'` (a space).\n\n## Examples\n\n##### `ok-x.md`\n\nWhen configured with `{ checked: 'x' }`.\n\n###### In\n\n> 👉 **Note**: this example uses\n> GFM ([`remark-gfm`][github-remark-gfm]).\n\n```markdown\n- [x] Mercury.\n- [x] Venus.\n```\n\n###### Out\n\nNo messages.\n\n##### `ok-x-upper.md`\n\nWhen configured with `{ checked: 'X' }`.\n\n###### In\n\n> 👉 **Note**: this example uses\n> GFM ([`remark-gfm`][github-remark-gfm]).\n\n```markdown\n- [X] Mercury.\n- [X] Venus.\n```\n\n###### Out\n\nNo messages.\n\n##### `ok-space.md`\n\nWhen configured with `{ unchecked: ' ' }`.\n\n###### In\n\n> 👉 **Note**: this example uses\n> GFM ([`remark-gfm`][github-remark-gfm]).\n\n```markdown\n- [ ] Mercury.\n- [ ] Venus.\n- [ ]␠␠\n- [ ]\n```\n\n###### Out\n\nNo messages.\n\n##### `ok-tab.md`\n\nWhen configured with `{ unchecked: '\\t' }`.\n\n###### In\n\n> 👉 **Note**: this example uses\n> GFM ([`remark-gfm`][github-remark-gfm]).\n\n```markdown\n- [␉] Mercury.\n- [␉] Venus.\n```\n\n###### Out\n\nNo messages.\n\n##### `not-ok-default.md`\n\n###### In\n\n> 👉 **Note**: this example uses\n> GFM ([`remark-gfm`][github-remark-gfm]).\n\n```markdown\n- [x] Mercury.\n- [X] Venus.\n- [ ] Earth.\n- [␉] Mars.\n```\n\n###### Out\n\n```text\n2:5: Unexpected checked checkbox value `X`, expected `x`\n4:5: Unexpected unchecked checkbox value `\\t`, expected ` `\n```\n\n##### `not-ok-option.md`\n\nWhen configured with `'🌍'`.\n\n###### Out\n\n```text\n1:1: Unexpected value `🌍` for `options`, expected an object or `'consistent'`\n```\n\n##### `not-ok-option-unchecked.md`\n\nWhen configured with `{ unchecked: '🌍' }`.\n\n###### Out\n\n```text\n1:1: Unexpected value `🌍` for `options.unchecked`, expected `'\\t'`, `' '`, or `'consistent'`\n```\n\n##### `not-ok-option-checked.md`\n\nWhen configured with `{ checked: '🌍' }`.\n\n###### Out\n\n```text\n1:1: Unexpected value `🌍` for `options.checked`, expected `'X'`, `'x'`, 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-checkbox-character-style@5`,\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-checkbox-character-style]: #unifieduseremarklintcheckboxcharacterstyle-options\n\n[api-styles]: #styles\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-checkbox-character-style.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark-lint-checkbox-character-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-checkbox-character-style\n\n[badge-size-url]: https://bundlejs.com/?q=remark-lint-checkbox-character-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-gfm]: https://github.com/remarkjs/remark-gfm\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[github-unified-transformer]: https://github.com/unifiedjs/unified#transformer\n\n[npm-install]: https://docs.npmjs.com/cli/install\n\n[typescript]: https://www.typescriptlang.org\n","publish_time":1602513170080,"_cnpm_publish_time":1602513170080,"dist-tags":{"latest":"5.0.1"}}