{"name":"unified-lint-rule","version":"2.0.0","description":"unified plugin to make it a bit easier to create linting rules","license":"MIT","keywords":["unified","unified-plugin","plugin","lint","rule"],"repository":{"type":"git","url":"git+https://github.com/remarkjs/remark-lint.git#main"},"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"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/unist":"^2.0.0","trough":"^2.0.0","unified":"^10.0.0","vfile":"^5.0.0"},"scripts":{"build":"rimraf \"lib/**/*.d.ts\" && tsc && type-coverage"},"xo":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"homepage":"https://github.com/remarkjs/remark-lint/tree/main#readme","_id":"unified-lint-rule@2.0.0","_nodeVersion":"16.6.1","_npmVersion":"7.20.3","dist":{"integrity":"sha512-3V+eyHZR+PAeKavQrrvSacXq83C3TGVDZJpTZ8+MTlHZmS4arL1ul5U4WRymok0zobAsMiri42bJj0rCHIlIjA==","shasum":"8a4fdcf28eb70fb9d56b1f14af47cfa3c6cb819f","tarball":"http://registry-npm.ywwl.com/unified-lint-rule/download/unified-lint-rule-2.0.0.tgz","fileCount":6,"unpackedSize":8113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFRP/CRA9TVsSAnZWagAAv5sP/iivUs4SoyytxEJ558Ut\nWbIQuTiMPFeLLTLBFDR3TDqztB2/KP4pdtciQEyh6BNnt5QqzEKgFZYC8Fpo\nnU9l5y53lzQh132RKbQ55/NC+gQaK5CuoCHwIg0XXLeZXkF6iyRhn38cFHR8\nZvmQXHVdd03fGtD8mflTGfZ765P8QRdEpe68XHAZ8nJiMUL9Bqwwk/rgrhrk\npfvgipzwsRuuA1dD1ndX7rklzdOqkU2uQfABUNM0G1HlajKIZEKeOFb3sH13\n/FaJ2jGWkfA69KuirhqGBLQbHMZXubZ4klXPLWfbc157qxfglHZ8gXLYu9Ws\n8jAuR/ysfLQHruOWTlxMiJ1Y3JfMMgqiBtFVwNcw7Y9ZYLUjR0f/9aXIjBWo\nnm0Uzrhs/dcvJJdNc2kK72qJzIZKFc2E94CPUFC2bezFlNkpH+1dj/c70C03\neZYQniyh1vawW0UD6dfXMi4XzcLU4JKEvyXJ4EpS9UYGkaULthUehE4POZbq\nu+z9PJZE/aYkrpfRItznTNQWpCzuilQhV1t8ox+W4wGFHR08ycYEEDZnmieY\nPg/eqojVpkHtHGHfhRolC9tqnHvxn+lmPLRFtunTbFyYaYAom18rLHqXKaRA\nvhNL3qqFNUTThtLd2GYVYsgh3EQ/4sUXciV9OlNt7ANd9MnvUlHkRHw++hiQ\n+XBK\r\n=f3jE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmGYGfLJeAlCC0elhvLW0QiwJKubcj89qLfWjCRiRnsQIgCzGwETN6fEbqTJs4D1fhgV2iEwEzUa9ejHGQalxOOyQ="}],"size":3149,"noattachment":false,"key":"/unified-lint-rule/-/unified-lint-rule-2.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unified-lint-rule_2.0.0_1628771327363_0.36334569567645203"},"_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":1628771327550,"_cnpm_publish_time":1628771327550,"dist-tags":{"latest":"3.0.1"}}