{"library":"remark-lint-directive-attribute-sort","title":"remark-lint-directive-attribute-sort","description":"remark-lint rule to lint and enforce alphabetical ordering of attributes on Markdown directives (e.g., :planet[Saturn]{attr1=\"val1\" attr2=\"val2\"). Stable version 1.0.1 is ESM-only for Node.js 16+. Part of the remark-lint ecosystem, it checks attribute order but does not differentiate attribute values or collapsed syntax. It requires remark-directive to parse directives. Unlike generic linters, it integrates seamlessly into remark pipelines via unified. Released as part of the remark-lint monorepo with TypeScript types included.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install remark-lint-directive-attribute-sort"],"cli":null},"imports":["import remarkLintDirectiveAttributeSort from 'remark-lint-directive-attribute-sort'","import remarkLintDirectiveAttributeSort from 'remark-lint-directive-attribute-sort'","import type { Plugin } from 'unified';\nimport remarkLintDirectiveAttributeSort from 'remark-lint-directive-attribute-sort'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { unified } from 'unified';\nimport remarkParse from 'remark-parse';\nimport remarkStringify from 'remark-stringify';\nimport remarkDirective from 'remark-directive';\nimport remarkLint from 'remark-lint';\nimport remarkLintDirectiveAttributeSort from 'remark-lint-directive-attribute-sort';\nimport { reporter } from 'vfile-reporter';\nimport { read } from 'to-vfile';\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkDirective)\n  .use(remarkLint)\n  .use(remarkLintDirectiveAttributeSort)\n  .use(remarkStringify)\n  .process(await read('example.md'));\n\nconsole.error(reporter(file));","lang":"typescript","description":"Configure unified pipeline with remark-parse, remark-directive, remark-lint, and the rule; lint example.md and report errors to stderr.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}