Registry / testing / remark-lint-definition-case

remark-lint-definition-case

JSON →
library4.0.1jsnpmunverified

A remark-lint rule that warns when definition labels in Markdown are not lowercase, helping enforce consistent casing. Current stable version is 4.0.1, published as part of the remark-lint monorepo. The plugin is ESM-only, supports Node.js 16+, and is compatible with remark-lint presets like remark-preset-lint-markdown-style-guide. It works with regular definitions and GFM footnote definitions. No options are required.

npm install remark-lint-definition-case
INSTALL
IMPORT
SIG · REMARK-LINT-DEFINI
R
remark-lint-definition-case
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.

remarkLintDefinitionCase
import remarkLintDefinitionCase from 'remark-lint-definition-case'
const remarkLintDefinitionCase = require('remark-lint-definition-case')
ESM-only since v4; CJS require will throw an error.
default export
import remarkLintDefinitionCase from 'remark-lint-definition-case'
import { remarkLintDefinitionCase } from 'remark-lint-definition-case'
The package has a default export, not a named export.
unified .use()
.use(remarkLintDefinitionCase)
.use(remarkLintDefinitionCase())
The rule is a plugin function, not a factory; do not call it.

Shows how to use remark-lint-definition-case in a unified pipeline to lint a Markdown file and output messages.

import { read } from 'to-vfile' import { reporter } from 'vfile-reporter' import { unified } from 'unified' import remarkParse from 'remark-parse' import remarkStringify from 'remark-stringify' import remarkLint from 'remark-lint' import remarkLintDefinitionCase from 'remark-lint-definition-case' const file = await read('example.md') await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintDefinitionCase) .use(remarkStringify) .process(file) console.error(reporter(file))
Debug
Known issues
breakingv4.0.0: Package became ESM-only; removed CommonJS support.
fix
Use import syntax instead of require(). Ensure Node.js version 16+.
affects: >=4.0.0
gotchaThe rule checks definition labels (e.g., [label]: url) but does not affect reference labels (e.g., [label]) which are matched case-insensitively.
fix
No action needed; this is by design. Ensure definition labels are lowercase to avoid warnings.
affects: >=1.0.0
gotchaThe rule does not accept any options; passing options will be ignored silently.
fix
Do not pass options to the plugin.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'remark-lint-definition-case'
Missing npm install or incorrect import path.
fix
Run 'npm install remark-lint-definition-case' and ensure import path is correct.
remarkLintDefinitionCase is not a function
Attempting to call the imported default export as a factory (e.g., remarkLintDefinitionCase()).
fix
Use the import directly: .use(remarkLintDefinitionCase), not .use(remarkLintDefinitionCase()).
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
unifiedrequiredRequired for integration with the unified processing pipeline
remark-lintrequiredProvides the linting infrastructure and message formatting
Agent activity
8 hits · last 30 days
node
6
OpenAI (training)
2
Resources
remark-lint-definition-case — npm install remark-lint-definition-case · libregistry