{"id":26205,"library":"remark-lint-directive-quote-style","title":"remark-lint-directive-quote-style","description":"remark-lint rule to enforce consistent quoting style (single or double quotes) for directive attribute values. Current version 1.0.1, part of the remark-lint monorepo with monthly releases. ESM-only, ships TypeScript types. Differentiator: provides both default export and exported helper function `inferAttributes` for use by other lint rules.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","attribute","directive","lint","quote","remark","remark-lint","remark-lint-rule","rule","typescript"],"install":[{"cmd":"npm install remark-lint-directive-quote-style","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-directive-quote-style","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-directive-quote-style","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin to work as a remark-lint rule","package":"remark-lint","optional":true}],"imports":[{"note":"ESM-only since v1.0.0. Using require() will throw ERR_REQUIRE_ESM.","wrong":"const remarkLintDirectiveQuoteStyle = require('remark-lint-directive-quote-style')","symbol":"remarkLintDirectiveQuoteStyle","correct":"import remarkLintDirectiveQuoteStyle from 'remark-lint-directive-quote-style'"},{"note":"Named export, not default. Only needed if writing other lint rules that inspect directive attributes.","wrong":"import inferAttributes from 'remark-lint-directive-quote-style'","symbol":"inferAttributes","correct":"import { inferAttributes } from 'remark-lint-directive-quote-style'"},{"note":"TypeScript type export, import with `import type` to avoid runtime error.","wrong":"import { Attribute } from 'remark-lint-directive-quote-style'","symbol":"Attribute","correct":"import type { Attribute } from 'remark-lint-directive-quote-style'"}],"quickstart":{"code":"import remarkLint from 'remark-lint'\nimport remarkLintDirectiveQuoteStyle from 'remark-lint-directive-quote-style'\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(remarkLintDirectiveQuoteStyle, { style: 'double' })\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))","lang":"typescript","description":"Set up remark-lint with directive-quote-style rule to require double quotes, process a markdown file, and report lint results."},"warnings":[{"fix":"Use import syntax or dynamic import() in Node.js 16+.","message":"ESM-only package — CommonJS require() will cause ERR_REQUIRE_ESM error.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use `import { inferAttributes } from 'remark-lint-directive-quote-style'`.","message":"inferAttributes is a named export, not default export. Confusion may lead to importing it incorrectly.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Pin to exact version and monitor release notes.","message":"The package is very new (v1.0.0). API stability not guaranteed; expect potential breaking changes in minor versions.","severity":"deprecated","affected_versions":"<2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Switch to import syntax: `import remarkLintDirectiveQuoteStyle from 'remark-lint-directive-quote-style'`","cause":"Package is ESM-only, but code attempts to require() it.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module from project/node_modules/remark-lint-directive-quote-style/index.js not supported."},{"fix":"Ensure `remark-lint` is added to unified chain: `.use(remarkLint).use(remarkLintDirectiveQuoteStyle)`","cause":"Missing or misconfigured remark-lint plugin; directive-quote-style rule requires remark-lint to be used before it.","error":"TypeError: Cannot read properties of undefined (reading 'type')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}