{"library":"remark-lint-directive-shortcut-attribute","title":"remark-lint-directive-shortcut-attribute","description":"A remark-lint rule that warns when verbose attribute names (e.g., class=\"value\", id=\"value\") are used in directives instead of shortcut syntax (e.g., .value, #value). Version 1.0.1 is the current stable release, part of the unified ecosystem. ESM-only, requires Node 16+. It is a complementary rule to other directive linting rules and is not included in any preset. Active development with frequent releases across the remark-lint monorepo.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install remark-lint-directive-shortcut-attribute"],"cli":null},"imports":["import remarkLintDirectiveShortcutAttribute from 'remark-lint-directive-shortcut-attribute'","import remarkLintDirectiveShortcutAttribute from 'remark-lint-directive-shortcut-attribute'","import remarkLintDirectiveShortcutAttribute from 'remark-lint-directive-shortcut-attribute'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { unified } from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport remarkLint from 'remark-lint'\nimport remarkLintDirectiveShortcutAttribute from 'remark-lint-directive-shortcut-attribute'\nimport { reporter } from 'vfile-reporter'\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintDirectiveShortcutAttribute)\n  .use(remarkStringify)\n  .process(':planet[Jupiter]{class=\"fifth largest\" id=\"jupiter\"}')\n\nconsole.error(reporter(file))\n// Output:\n//   1:18-1:23  warning  Unexpected verbose attribute name `class`, expected shortcut attribute with `.`  directive-shortcut-attribute  remark-lint\n//   1:40-1:42  warning  Unexpected verbose attribute name `id`, expected shortcut attribute with `#`     directive-shortcut-attribute  remark-lint","lang":"typescript","description":"Shows how to set up the rule to warn on verbose attribute names in directive syntax.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}