{"library":"remark-lint-directive-unique-attribute-name","title":"remark-lint-directive-unique-attribute-name","description":"remark-lint rule that warns when directive attribute names are reused within the same directive. Version 1.0.1 is current stable, part of the remark-lint ecosystem. It checks that each attribute name in a directive (like `:planet[Venus]{aphelion=0.728213 perihelion=0.718440}`) appears only once. Unlike generic linting, this targets the unique syntax of directives, which are custom containers in markdown. Requires remark-lint and remark-directive to function. Ships TypeScript types. Released under MIT license.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install remark-lint-directive-unique-attribute-name"],"cli":null},"imports":["import remarkLintDirectiveUniqueAttributeName from 'remark-lint-directive-unique-attribute-name'","import remarkLintDirectiveUniqueAttributeName from 'remark-lint-directive-unique-attribute-name'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { unified } from 'unified';\nimport remarkParse from 'remark-parse';\nimport remarkDirective from 'remark-directive';\nimport remarkLint from 'remark-lint';\nimport remarkLintDirectiveUniqueAttributeName from 'remark-lint-directive-unique-attribute-name';\nimport remarkStringify from 'remark-stringify';\nimport { reporter } from 'vfile-reporter';\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkDirective)\n  .use(remarkLint)\n  .use(remarkLintDirectiveUniqueAttributeName)\n  .use(remarkStringify)\n  .process(':planet[Venus]{aphelion=0.728213 perihelion=0.718440 symbol=♀︎}');\n\nconsole.error(reporter(file)); // no warnings\n\nconst file2 = await unified()\n  .use(remarkParse)\n  .use(remarkDirective)\n  .use(remarkLint)\n  .use(remarkLintDirectiveUniqueAttributeName)\n  .use(remarkStringify)\n  .process(':planet[Venus]{aphelion=0.728213 aphelion=0.718440}');\n\nconsole.error(reporter(file2)); // warns about duplicate 'aphelion'","lang":"typescript","description":"Shows how to set up the rule with required plugins and check for duplicate attribute names in directives.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}