{"name":"unified-lint-rule","version":"1.0.3","description":"Create a linting rule for a unified processors","license":"MIT","keywords":["unified","lint","rule"],"repository":{"type":"git","url":"https://github.com/remarkjs/remark-lint/tree/master/packages/unified-lint-rule"},"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":{"wrapped":"^1.0.1"},"xo":false,"_id":"unified-lint-rule@1.0.3","_npmVersion":"6.0.1","_nodeVersion":"10.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"integrity":"sha512-6z+HH3mtlFdj/w3MaQpObrZAd9KRiro370GxBFh13qkV8LYR21lLozA4iQiZPhe7KuX/lHewoGOEgQ4AWrAR3Q==","shasum":"e302b0c4a7ac428c0980e049a500e59528001299","tarball":"http://registry-npm.ywwl.com/unified-lint-rule/download/unified-lint-rule-1.0.3.tgz","fileCount":3,"unpackedSize":3429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbFUqYCRA9TVsSAnZWagAAW2oP/RIl0nPJQSZmCbkC4ry8\nddDi9TLTVEGmVdoDpxKyBj/xFKjMxuBF+TdGtOgAFdt5NcAxu1KiK2lxQ+dG\nn0uPM9sBYZ7L08kkNSfbCBzLRwfgawfNY2OXepkoe06N3NxT+4Zuh/LgC6qj\nEiamv+3EE4egpzq3ouiGE3PeqF5czB032ekc/g6tHxiwuM18HE/aTcHsf01l\nMXNPX1CRailke89fFsP0vHy1PZOUQUudmMlAY7CTTG5fyLfw+S2yWcZaUaLk\nGaEM/DUbLRP2Saa0DjofIwSainnbzOymW6fbRE14klc27qRwTITn49Lv7CjB\nw1ZGJ5SH/SO9Tb3QhKZJWjpOr1JsQ9N7xGcm6QdLIne89ELypAFIEJ6HiYLf\nYipu10InE59NBIr5dlsiPtjL2wzox+OGV75HJkhFE8+Q21YGzrBHkeevM6qk\nueSgaYXuyFNZVtiQhW68+wKQ4e6S/Enim1ABT/TQYJJiVnKPaPgCPSDA/XES\niydtmom89l/a8YtqI4z7aztnoO/vfKc4itoaMQ1XbQEUrEA4Jmm/u17CVDsd\nYlST1/YK/wMJrCFz1//hVbyrhKzfFXDQQB0iX7/2lDDuDroGh0pKExZEWUfP\nTj0CwrRlF7URQ3lqsn6HGacxDZ0sk2IsfVygJtXbL7aSJerFoKsJ2DRniGCW\naSPg\r\n=VUbl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/fiKMacPN2YyZe9k4kKw0+kUqZ6uHg4uOIzzI8mn5qQIgEv6DXATzpJL5XHnbyKqFgU6n8SUBsEzn6iNCBTsNrws="}],"size":1501,"noattachment":false,"key":"/unified-lint-rule/-/unified-lint-rule-1.0.3.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unified-lint-rule_1.0.3_1528122007727_0.3494003018827496"},"_hasShrinkwrap":false,"readme":"<!--This file is generated-->\n\n# unified-lint-rule\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**[unified][github-unified]** helper to help make lint rules.\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`lintRule(meta, rule)`](#lintrulemeta-rule)\n  * [`Label`](#label)\n  * [`Meta`](#meta)\n  * [`Rule`](#rule)\n  * [`Severity`](#severity)\n* [Compatibility](#compatibility)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis package is a helper that makes it a bit easier to create linting rules.\n\n## When should I use this?\n\nYou can use this package when you want to make custom lint rules.\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 unified-lint-rule\n```\n\nIn Deno with [`esm.sh`][esm-sh]:\n\n```js\nimport {lintRule} from 'https://esm.sh/unified-lint-rule@3'\n```\n\nIn browsers with [`esm.sh`][esm-sh]:\n\n```html\n<script type=\"module\">\n  import {lintRule} from 'https://esm.sh/unified-lint-rule@3?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {lintRule} from 'unified-lint-rule'\n\nconst remarkLintFileExtension = lintRule(\n  'remark-lint:file-extension',\n  function (tree, file, options) {\n    const ext = file.extname\n    const option = options || 'md'\n\n    if (ext && ext.slice(1) !== option) {\n      file.message('Incorrect extension: use `' + option + '`')\n    }\n  }\n)\n\nexport default remarkLintFileExtension\n```\n\n## API\n\nThis package exports the identifier\n[`lintRule`][api-lint-rule].\nIt exports the [TypeScript][typescript] types\n[`Label`][api-label],\n[`Meta`][api-meta], and\n[`Severity`][api-severity].\nThere is no default export.\n\n### `lintRule(meta, rule)`\n\nCreate a plugin.\n\n###### Parameters\n\n* `meta` ([`Meta`][api-meta] or `string`)\n  — info or origin\n* `rule` ([`Rule`][api-rule])\n  — rule\n\n###### Returns\n\nPlugin ([`Plugin` from `unified`][github-unified-plugin]).\n\n### `Label`\n\nSeverity label (TypeScript type);\n`'off'`: `0`, `'on'` and `warn`: `1`, `'error'`: `2`.\n\n###### Type\n\n```ts\ntype Label = 'error' | 'on' | 'off' | 'warn'\n```\n\n### `Meta`\n\nRule metadata (TypeScript type).\n\n###### Fields\n\n* `origin` (`string`)\n  — name of the lint rule\n* `url` (`string`, optional)\n  — link to documentation\n\n### `Rule`\n\nRule (TypeScript type).\n\n###### Parameters\n\n* `tree` ([`Node` from `unist`][github-unist-node])\n  — tree\n* `file` ([`VFile`][github-vfile])\n  — file\n* `options` (`any`, optional)\n  — parameter\n\n###### Returns\n\nNothing (`Promise<undefined>` or `undefined`).\n\n### `Severity`\n\nSeverity number (TypeScript type);\n`0`: `'off'`, `1`: `'on'` and `warn`, `2`: `'error'`.\n\n###### Type\n\n```ts\ntype Severity = 0 | 1 | 2\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`unified-lint-rule@3`,\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-label]: #label\n\n[api-lint-rule]: #lintrulemeta-rule\n\n[api-meta]: #meta\n\n[api-rule]: #rule\n\n[api-severity]: #severity\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/unified-lint-rule.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/unified-lint-rule\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/unified-lint-rule\n\n[badge-size-url]: https://bundlejs.com/?q=unified-lint-rule\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-unified]: https://github.com/unifiedjs/unified\n\n[github-unified-plugin]: https://github.com/unifiedjs/unified#plugin\n\n[github-unist-node]: https://github.com/syntax-tree/unist#node\n\n[github-vfile]: https://github.com/vfile/vfile\n\n[npm-install]: https://docs.npmjs.com/cli/install\n\n[typescript]: https://www.typescriptlang.org\n","publish_time":1528122007776,"_cnpm_publish_time":1528122007776,"dist-tags":{"latest":"3.0.1"}}