{"name":"remark-lint-link-title-style","version":"1.0.2","description":"remark-lint rule to warn when link and definition titles occur with incorrect quotes","license":"MIT","keywords":["remark","lint","rule","link","image","definition","style"],"repository":{"type":"git","url":"https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-link-title-style"},"bugs":{"url":"https://github.com/remarkjs/remark-lint/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"files":["index.js"],"dependencies":{"unified-lint-rule":"^1.0.0","unist-util-generated":"^1.1.0","unist-util-position":"^3.0.0","unist-util-visit":"^1.1.1","vfile-location":"^2.0.1"},"xo":false,"_id":"remark-lint-link-title-style@1.0.2","_npmVersion":"6.0.1","_nodeVersion":"10.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"integrity":"sha512-0yoaSeLek5hWAQM8WETpi7/pY8kAVOOC/G1ZZFKmIQ0LPeWIzbIlPKJVV0vCiW97J3Bpv8PL0TMTwhXeP0KH2w==","shasum":"f96f424ce90c79a7344e72078ca51f8461f4c3bc","tarball":"http://registry-npm.ywwl.com/remark-lint-link-title-style/download/remark-lint-link-title-style-1.0.2.tgz","fileCount":3,"unpackedSize":9996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbFUWUCRA9TVsSAnZWagAAa0cP/iW59oW7h8cUwi5Ik+MC\nF7TxVSqOHRGLT1UPJZwmyuIY1i+UecACmshOikgpdLSjMXffcKHJ8dSbg2SQ\nfTr6T1HtmG8zCqdWHVrm8PgSLz5q/rTuO1MeCb82YS6IHrNZD4tSVpranee5\nJR2cNZ6q27ANh/yHrN+zIF7bYX4MHkwHwJIyK2B3EZrub1DwY+Z7XKp12+6R\n4+dth1kUzSAQZub4n1KBl20e19lkT6ZQQ6t2JjbJLXr4cUCJTFYROTxGTqPY\nSJbJhgQtqnSmRgRVqSHQEsoxQyYJK/K4HjECyl0MsCA2+Bwww9gFSduBIaOi\nP8DazAQsksLUe/97ZcQhvtZvZ8rcUMcNUDj+sGHbcn8zT927n4NDbqGu+Eri\nctG3RmCysR4kwl1OdvTxwCPjTsTRltdXq5/DInDhV/7se14hmwDrCFHL2K6u\nCZu8KBVSDJCXv8L36eR6f4VXtX7OIlWglIZixhR4gTsdgbM74v8AUTvJbIUg\natyy9vuZmQGGwMGAivYW9W/zKP3H1XivCw7arr7h3ZN80pL2cx/rYPJp5wkf\nPvaOocTYvOcsTeQ1ovNubDCwz4NhbEeT5+tMzvI/0DriJlDXlC0O5P3kl4qK\nBFE7j+o3bnXI9UgB98CgyH2RHoS0sxiBboSsK5dfbh0J/j20v5G7CkO2Mr/O\nC6DK\r\n=Q+Vb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDr4Sqn+w+ZgGl8zyBM6MP2Q44QtozG6ih8fMwqq9cyIAIgbaObkuwT/076ZCJnhw+wcvdEuevj3UdPTkIEKg2wIkw="}],"size":2743,"noattachment":false,"key":"/remark-lint-link-title-style/-/remark-lint-link-title-style-1.0.2.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-lint-link-title-style_1.0.2_1528120723303_0.027219515471026856"},"_hasShrinkwrap":false,"readme":"<!--This file is generated-->\n\n# remark-lint-link-title-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 link title markers violate a given style.\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(remarkLintLinkTitleStyle[, options])`](#unifieduseremarklintlinktitlestyle-options)\n  * [`Options`](#options)\n  * [`Style`](#style)\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 style of link (*and* image and definition) title\nmarkers.\n\n## When should I use this?\n\nYou can use this package to check that the style of link title markers is\nconsistent.\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-link-title-style\n```\n\nIn Deno with [`esm.sh`][esm-sh]:\n\n```js\nimport remarkLintLinkTitleStyle from 'https://esm.sh/remark-lint-link-title-style@4'\n```\n\nIn browsers with [`esm.sh`][esm-sh]:\n\n```html\n<script type=\"module\">\n  import remarkLintLinkTitleStyle from 'https://esm.sh/remark-lint-link-title-style@4?bundle'\n</script>\n```\n\n## Use\n\nOn the API:\n\n```js\nimport remarkLint from 'remark-lint'\nimport remarkLintLinkTitleStyle from 'remark-lint-link-title-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(remarkLintLinkTitleStyle)\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-link-title-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-link-title-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[`Style`][api-style].\nThe default export is\n[`remarkLintLinkTitleStyle`][api-remark-lint-link-title-style].\n\n### `unified().use(remarkLintLinkTitleStyle[, options])`\n\nWarn when link title markers violate a given style.\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###### Returns\n\nTransform ([`Transformer` from `unified`][github-unified-transformer]).\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Type\n\n```ts\ntype Options = Style | 'consistent'\n```\n\n### `Style`\n\nStyle (TypeScript type).\n\n###### Type\n\n```ts\ntype Style = '\"' | '\\'' | '()'\n```\n\n## Recommendation\n\nBefore CommonMark, parens for titles were not supported in markdown.\nThey should now work in most places.\nParens do look a bit weird as they’re inside more parens:\n`[text](url (title))`.\n\nIn HTML, attributes are commonly written with double quotes.\nDue to this, titles are almost exclusively wrapped in double quotes in\nmarkdown, so it’s recommended to configure this rule with `'\"'`.\n\n## Fix\n\n[`remark-stringify`][github-remark-stringify] formats titles with double\nquotes by default.\nPass `quote: \"'\"` to use single quotes.\nThere is no option to use parens.\n\n## Examples\n\n##### `ok-consistent.md`\n\n###### In\n\n```markdown\n[Mercury](http://example.com/mercury/),\n[Venus](http://example.com/venus/ \"Go to Venus\"), and\n![Earth](http://example.com/earth/ \"Go to Earth\").\n\n[Mars]: http://example.com/mars/ \"Go to Mars\"\n```\n\n###### Out\n\nNo messages.\n\n##### `not-ok-consistent.md`\n\n###### In\n\n```markdown\n[Mercury](http://example.com/mercury/ \"Go to Mercury\") and\n![Venus](http://example.com/venus/ 'Go to Venus').\n\n[Earth]: http://example.com/earth/ (Go to Earth)\n```\n\n###### Out\n\n```text\n2:1-2:50: Unexpected title markers `'`, expected `\"`\n4:1-4:49: Unexpected title markers `'('` and `')'`, expected `\"`\n```\n\n##### `ok-double.md`\n\nWhen configured with `'\"'`.\n\n###### In\n\n```markdown\n[Mercury](http://example.com/mercury/ \"Go to Mercury\").\n```\n\n###### Out\n\nNo messages.\n\n##### `not-ok-double.md`\n\nWhen configured with `'\"'`.\n\n###### In\n\n```markdown\n[Mercury](http://example.com/mercury/ 'Go to Mercury').\n```\n\n###### Out\n\n```text\n1:1-1:55: Unexpected title markers `'`, expected `\"`\n```\n\n##### `ok-single.md`\n\nWhen configured with `\"'\"`.\n\n###### In\n\n```markdown\n[Mercury](http://example.com/mercury/ 'Go to Mercury').\n```\n\n###### Out\n\nNo messages.\n\n##### `not-ok-single.md`\n\nWhen configured with `\"'\"`.\n\n###### In\n\n```markdown\n[Mercury](http://example.com/mercury/ \"Go to Mercury\").\n```\n\n###### Out\n\n```text\n1:1-1:55: Unexpected title markers `\"`, expected `'`\n```\n\n##### `ok-paren.md`\n\nWhen configured with `'()'`.\n\n###### In\n\n```markdown\n[Mercury](http://example.com/mercury/ (Go to Mercury)).\n```\n\n###### Out\n\nNo messages.\n\n##### `not-ok-paren.md`\n\nWhen configured with `'()'`.\n\n###### In\n\n```markdown\n[Mercury](http://example.com/mercury/ \"Go to Mercury\").\n```\n\n###### Out\n\n```text\n1:1-1:55: Unexpected title markers `\"`, expected `'('` and `')'`\n```\n\n##### `not-ok.md`\n\nWhen configured with `'🌍'`.\n\n###### Out\n\n```text\n1:1: Unexpected value `🌍` for `options`, expected `'\"'`, `\"'\"`, `'()'`, or `'consistent'`\n```\n\n##### `ok-parens-in-url.md`\n\nWhen configured with `'\"'`.\n\n###### In\n\n```markdown\nParens in URLs work correctly:\n\n[Mercury](http://example.com/(mercury) \"Go to Mercury\") and\n[Venus](http://example.com/(venus)).\n```\n\n###### Out\n\nNo messages.\n\n##### `ok-whitespace.md`\n\nWhen configured with `'\"'`.\n\n###### In\n\n```markdown\nTrailing whitespace works correctly:\n\n[Mercury](http://example.com/mercury/␠\"Go to Mercury\"␠).\n```\n\n###### Out\n\nNo messages.\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-link-title-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-link-title-style]: #unifieduseremarklintlinktitlestyle-options\n\n[api-style]: #style\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-link-title-style.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark-lint-link-title-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-link-title-style\n\n[badge-size-url]: https://bundlejs.com/?q=remark-lint-link-title-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[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":1528120723395,"_cnpm_publish_time":1528120723395,"dist-tags":{"latest":"4.0.1"}}