{"_id":"remark-lint-mdx-jsx-attribute-sort","_rev":"1-4669e9c45a79bb8d08e00bfa597b3be0","name":"remark-lint-mdx-jsx-attribute-sort","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"remark-lint-mdx-jsx-attribute-sort","version":"1.0.0","keywords":["attribute","compare","jsx","lint","mdx","order","remark","remark-lint","remark-lint-rule","rule","sort"],"author":{"url":"https://wooorm.com","name":"Titus Wormer","email":"tituswormer@gmail.com"},"license":"MIT","_id":"remark-lint-mdx-jsx-attribute-sort@1.0.0","maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"homepage":"https://github.com/remarkjs/remark-lint/tree/main#readme","bugs":{"url":"https://github.com/remarkjs/remark-lint/issues"},"xo":{"rules":{"max-depth":"off","capitalized-comments":"off","unicorn/prefer-switch":"off","unicorn/prefer-code-point":"off"},"prettier":true},"dist":{"shasum":"d325076a6f081b4464f86daf5fce6ecf5b680416","tarball":"https://registry.npmjs.org/remark-lint-mdx-jsx-attribute-sort/-/remark-lint-mdx-jsx-attribute-sort-1.0.0.tgz","fileCount":5,"integrity":"sha512-Mhwa00SHxJYimKBxYZ3mZFOTTuucPVDb26T8DPteVMCmdoU6HAbq7Qyrq1Jbr34JQnnHNy7lTK1Joulddjw4Ww==","signatures":[{"sig":"MEYCIQCelcwQnHZXQ5jmvHuPe9zqXE3vE04bi0ioKcnQBKS/IQIhANx74VJNASk18rq3+3hx1Aa0I9XIAjtUAsjh0+IGxn9M","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14647},"type":"module","types":"./index.d.ts","exports":"./index.js","funding":{"url":"https://opencollective.com/unified","type":"opencollective"},"gitHead":"04c0a3599cd7fb0b1ff8898bb046bcb8e92aa019","scripts":{},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"repository":{"url":"git+https://github.com/remarkjs/remark-lint.git#main","type":"git"},"_npmVersion":"11.0.0","description":"remark-lint rule to check mdx jsx attribute order","directories":{},"sideEffects":false,"_nodeVersion":"23.1.0","dependencies":{"devlop":"^1.0.0","@types/mdast":"^4.0.0","vfile-message":"^4.0.0","mdast-util-mdx":"^3.0.0","unified-lint-rule":"^3.0.0","unist-util-visit-parents":"^6.0.0"},"typeCoverage":{"strict":true,"atLeast":100},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/remark-lint-mdx-jsx-attribute-sort_1.0.0_1737979086839_0.08963564422712755","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"bugs":{"url":"https://github.com/remarkjs/remark-lint/issues"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"dependencies":{"@types/mdast":"^4.0.0","devlop":"^1.0.0","mdast-util-mdx":"^3.0.0","unified-lint-rule":"^3.0.0","unist-util-visit-parents":"^6.0.0","vfile-message":"^4.0.0"},"description":"remark-lint rule to check mdx jsx attribute order","exports":"./index.js","funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"keywords":["attribute","compare","jsx","lint","mdx","order","remark","remark-lint","remark-lint-rule","rule","sort"],"license":"MIT","name":"remark-lint-mdx-jsx-attribute-sort","repository":{"type":"git","url":"git+https://github.com/remarkjs/remark-lint.git#main"},"scripts":{},"sideEffects":false,"typeCoverage":{"atLeast":100,"strict":true},"type":"module","version":"1.0.1","xo":{"prettier":true,"rules":{"capitalized-comments":"off","max-depth":"off","unicorn/prefer-code-point":"off","unicorn/prefer-switch":"off"}},"_id":"remark-lint-mdx-jsx-attribute-sort@1.0.1","gitHead":"46ccbcd49deaada0172ad10425a2cd6b5f21a2c2","types":"./index.d.ts","homepage":"https://github.com/remarkjs/remark-lint/tree/main#readme","_nodeVersion":"23.1.0","_npmVersion":"11.0.0","dist":{"integrity":"sha512-vLvh7zJLvPMw0D1jAYTbdouxlkB0535v1MH7Q6YyaSd/WWUriXzeqanhRC1atZZa+RofKKBqPr67CoBY+PQthg==","shasum":"63ae2ebfd7f1116981d9a547484f566826f057c3","tarball":"https://registry.npmjs.org/remark-lint-mdx-jsx-attribute-sort/-/remark-lint-mdx-jsx-attribute-sort-1.0.1.tgz","fileCount":5,"unpackedSize":14647,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAWclfrhSKbqiawjArmSCn9aWItmGqINzqYAm7/NMxgDAiADX0EYuKl+0nz3CfpOqKaasfUIplQuNkA27BMWphXPgg=="}]},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/remark-lint-mdx-jsx-attribute-sort_1.0.1_1737981150721_0.13419316215635968"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-27T11:58:06.838Z","modified":"2025-01-27T12:32:31.080Z","1.0.0":"2025-01-27T11:58:07.016Z","1.0.1":"2025-01-27T12:32:30.911Z"},"bugs":{"url":"https://github.com/remarkjs/remark-lint/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"license":"MIT","homepage":"https://github.com/remarkjs/remark-lint/tree/main#readme","keywords":["attribute","compare","jsx","lint","mdx","order","remark","remark-lint","remark-lint-rule","rule","sort"],"repository":{"type":"git","url":"git+https://github.com/remarkjs/remark-lint.git#main"},"description":"remark-lint rule to check mdx jsx attribute order","contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"readme":"<!--This file is generated-->\n\n# remark-lint-mdx-jsx-attribute-sort\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 attributes are not sorted.\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(remarkLintMdxJsxAttributeSort)`](#unifieduseremarklintmdxjsxattributesort)\n* [Examples](#examples)\n* [Compatibility](#compatibility)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis package checks MDX JSX attribute order.\n\n## When should I use this?\n\nYou can use this package to check MDX JSX attribute order.\n\n## Presets\n\nThis plugin is not included in presets maintained here.\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-mdx-jsx-attribute-sort\n```\n\nIn Deno with [`esm.sh`][esm-sh]:\n\n```js\nimport remarkLintMdxJsxAttributeSort from 'https://esm.sh/remark-lint-mdx-jsx-attribute-sort@1'\n```\n\nIn browsers with [`esm.sh`][esm-sh]:\n\n```html\n<script type=\"module\">\n  import remarkLintMdxJsxAttributeSort from 'https://esm.sh/remark-lint-mdx-jsx-attribute-sort@1?bundle'\n</script>\n```\n\n## Use\n\nOn the API:\n\n```js\nimport remarkLint from 'remark-lint'\nimport remarkLintMdxJsxAttributeSort from 'remark-lint-mdx-jsx-attribute-sort'\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(remarkLintMdxJsxAttributeSort)\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-mdx-jsx-attribute-sort .\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-mdx-jsx-attribute-sort\",\n     …\n   ]\n }\n …\n```\n\n## API\n\nThis package exports no identifiers.\nIt exports no additional [TypeScript][typescript] types.\nThe default export is\n[`remarkLintMdxJsxAttributeSort`][api-remark-lint-mdx-jsx-attribute-sort].\n\n### `unified().use(remarkLintMdxJsxAttributeSort)`\n\nWarn when attributes are not sorted.\n\nThis package does not differentiate between what values attributes have,\nor whether they are shorthand or not.\n\nSpreads must come first.\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\nTransform ([`Transformer` from `unified`][github-unified-transformer]).\n\n## Examples\n\n##### `ok.mdx`\n\n###### In\n\n> 👉 **Note**: this example uses\n> MDX ([`remark-mdx`][github-remark-mdx]).\n\n```mdx\n<Saturn\n  aphelion={1514.50}\n  largest={false}\n  perihelion={1352.55}\n  satellites={146}\n/>\n```\n\n###### Out\n\nNo messages.\n\n##### `not-ok.mdx`\n\n###### In\n\n> 👉 **Note**: this example uses\n> MDX ([`remark-mdx`][github-remark-mdx]).\n\n```mdx\n<Saturn\n  largest={false}\n  perihelion={1352.55}\n  satellites={146}\n  aphelion={1514.50}\n/>\n```\n\n###### Out\n\n```text\n2:3-2:18: Unexpected attribute `largest` in 1st place, expected alphabetically sorted attributes, move it to 2nd place\n3:3-3:23: Unexpected attribute `perihelion` in 2nd place, expected alphabetically sorted attributes, move it to 3rd place\n4:3-4:19: Unexpected attribute `satellites` in 3rd place, expected alphabetically sorted attributes, move it to 4th place\n5:3-5:21: Unexpected attribute `aphelion` in 4th place, expected alphabetically sorted attributes, move it to 1st place\n```\n\n##### `spread.mdx`\n\n###### In\n\n> 👉 **Note**: this example uses\n> MDX ([`remark-mdx`][github-remark-mdx]).\n\n```mdx\n<Earth\n  {...animals}\n  symbol=\"🜨\"\n  {...humans}\n/>\n```\n\n###### Out\n\n```text\n4:3-4:14: Unexpected spread attribute after named attribute, expected spread attributes to come first\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-mdx-jsx-attribute-sort@1`,\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-remark-lint-mdx-jsx-attribute-sort]: #unifieduseremarklintmdxjsxattributesort\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-mdx-jsx-attribute-sort.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark-lint-mdx-jsx-attribute-sort\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-mdx-jsx-attribute-sort\n\n[badge-size-url]: https://bundlejs.com/?q=remark-lint-mdx-jsx-attribute-sort\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-mdx]: https://mdxjs.com/packages/remark-mdx/\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","readmeFilename":"readme.md"}