Registry / testing / remark-lint-definition-spacing

remark-lint-definition-spacing

JSON →
library4.0.1jsnpmunverified

remark-lint rule (v4.0.1, ESM-only) from the remark-lint monorepo that warns when consecutive whitespace (more than one space or non-space whitespace) is used in a definition label. Published as part of the remark-lint ecosystem, it ensures definition label whitespace consistency. Unlike general markdown linters, this rule is specific to definition labels and is included in the remark-preset-lint-markdown-style-guide preset.

npm install remark-lint-definition-spacing
INSTALL
IMPORT
SIG · REMARK-LINT-DEFINI
R
remark-lint-definition-spacing
testingjavascriptv4.0.1
harness data pending
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.

remarkLintDefinitionSpacing
import remarkLintDefinitionSpacing from 'remark-lint-definition-spacing'
import { remarkLintDefinitionSpacing } from 'remark-lint-definition-spacing'
Default export - named import does not exist

Shows how to use the rule with unified: parse markdown, apply the lint rule, stringify, and report messages.

import remarkLint from 'remark-lint' import remarkLintDefinitionSpacing from 'remark-lint-definition-spacing' 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(remarkLintDefinitionSpacing) .use(remarkStringify) .process(file) console.error(reporter(file))
Debug
Known issues
breakingPackage is ESM-only starting from version 4.
fix
Switch to ESM imports (import ... from ...). For CommonJS, use dynamic import() or stick to version 3.x.
affects: >=4.0.0
breakingTypeScript types changed in version 4.0.0: `@import` syntax used; types may require TypeScript 5.0+.
fix
Update TypeScript to 5.0+ or use a version with supported module resolution.
affects: >=4.0.0
deprecatedNo known deprecations in this package.
gotchaThis rule does not affect GFM footnotes; footnote labels cannot contain whitespace.
fix
No fix needed; it's by design.
affects: all
Errors
Common errors & fixes
Cannot find module 'remark-lint-definition-spacing'
Missing package installation or wrong import path (ESM vs CJS).
fix
Run `npm install remark-lint-definition-spacing` and ensure you use ESM import syntax.
TypeError: remarkLintDefinitionSpacing is not a function
Using named import `{ remarkLintDefinitionSpacing }` instead of default import.
fix
Use `import remarkLintDefinitionSpacing from 'remark-lint-definition-spacing'`.
Error: It looks like you are using ESM but your Node.js version does not support it.
Node.js version < 16 or not configured for ESM.
fix
Update Node.js to >=16 or use `--experimental-modules` flag (older versions), or use dynamic import.
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
unifiedrequiredpeer dependency; required to use the unified processor
remark-lintrequiredpeer dependency; must be used together with remark-lint
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-definition-spacing — npm install remark-lint-definition-spacing · libregistry