Registry /
testing / remark-lint-directive-quote-style
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
remarkLintDirectiveQuoteStyle
✓ import remarkLintDirectiveQuoteStyle from 'remark-lint-directive-quote-style'
✗ const remarkLintDirectiveQuoteStyle = require('remark-lint-directive-quote-style')
ESM-only since v1.0.0. Using require() will throw ERR_REQUIRE_ESM.
inferAttributes
✓ import { inferAttributes } from 'remark-lint-directive-quote-style'
✗ import inferAttributes from 'remark-lint-directive-quote-style'
Named export, not default. Only needed if writing other lint rules that inspect directive attributes.
Attribute
✓ import type { Attribute } from 'remark-lint-directive-quote-style'
✗ import { Attribute } from 'remark-lint-directive-quote-style'
TypeScript type export, import with `import type` to avoid runtime error.
Set up remark-lint with directive-quote-style rule to require double quotes, process a markdown file, and report lint results.
import remarkLint from 'remark-lint'
import remarkLintDirectiveQuoteStyle from 'remark-lint-directive-quote-style'
import remarkParse from 'remark-parse'
import remarkStringify from 'remark-stringify'
import { read } from 'to-vfile'
import { unified } from 'unified'
import { reporter } from 'vfile-reporter'
const file = await read('example.md')
await unified()
.use(remarkParse)
.use(remarkLint)
.use(remarkLintDirectiveQuoteStyle, { style: 'double' })
.use(remarkStringify)
.process(file)
console.error(reporter(file))
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module from project/node_modules/remark-lint-directive-quote-style/index.js not supported.
Package is ESM-only, but code attempts to require() it.
fixSwitch to import syntax: `import remarkLintDirectiveQuoteStyle from 'remark-lint-directive-quote-style'`
TypeError: Cannot read properties of undefined (reading 'type')
Missing or misconfigured remark-lint plugin; directive-quote-style rule requires remark-lint to be used before it.
fixEnsure `remark-lint` is added to unified chain: `.use(remarkLint).use(remarkLintDirectiveQuoteStyle)`
Audit
Dependencies
remark-lintoptionalpeer dependency required for plugin to work as a remark-lint rule