Registry / testing / remark-lint-checkbox-content-indent

remark-lint-checkbox-content-indent

JSON →
library5.0.1jsnpmunverified

remark-lint rule to warn when GFM tasklist checkboxes are followed by more than one space. Current stable version is 5.0.1 (as of early 2025), part of the remark-lint ecosystem. Unlike general Markdown linters, this rule is narrowly scoped to enforce consistent indentation after `[ ]` or `[x]` in task list items. It is ESM-only, ships TypeScript types, and integrates with remark's unified pipeline and CLI. No options. Alternatives like markdownlint have similar rules but remark-lint rules are composable with the remark ecosystem.

npm install remark-lint-checkbox-content-indent
INSTALL
IMPORT
SIG · REMARK-LINT-CHECKB
R
remark-lint-checkbox-content-indent
testingjavascriptv5.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.

remarkLintCheckboxContentIndent
import remarkLintCheckboxContentIndent from 'remark-lint-checkbox-content-indent'
const remarkLintCheckboxContentIndent = require('remark-lint-checkbox-content-indent')
ESM-only since initial release. CommonJS require is not supported.

Lints a Markdown string for excessive whitespace after GFM tasklist checkboxes using remark. Shows how to set up unified pipeline with GFM support, lint rule, and report messages.

import { unified } from 'unified'; import remarkParse from 'remark-parse'; import remarkStringify from 'remark-stringify'; import remarkLint from 'remark-lint'; import remarkLintCheckboxContentIndent from 'remark-lint-checkbox-content-indent'; import remarkGfm from 'remark-gfm'; import { reporter } from 'vfile-reporter'; const file = await unified() .use(remarkParse) .use(remarkGfm) .use(remarkLint) .use(remarkLintCheckboxContentIndent) .use(remarkStringify) .process('- [x] Too many spaces after checkbox\n'); console.error(reporter(file)); // Output: 1:8: Unexpected `2` spaces between checkbox and content, expected `1` space, remove `1` space
remark --version
Debug
Known issues
breakingPackage is ESM-only; no CommonJS support
fix
Use import syntax or dynamic import, or use a CJS bundler transformation.
affects: >=1.0.0
gotchaRequires remark-gfm to parse task lists; without it, rule does not apply
fix
Install remark-gfm and add .use(remarkGfm) before .use(remarkLintCheckboxContentIndent)
affects: >=1.0.0
gotchaRule has no options; all configuration must be done via remark-lint's options mechanism
fix
Pass options to remark-lint plugin, not directly to this rule.
affects: >=1.0.0
deprecatedNone at this time
Errors
Common errors & fixes
Cannot find module 'remark-lint-checkbox-content-indent'
Package not installed or misconfigured in Node.js (especially with ESM imports)
fix
Run 'npm install remark-lint-checkbox-content-indent' and ensure package.json has 'type': 'module' or use .mjs extension.
Cannot use import statement outside a module
Trying to use ESM import in a CommonJS context
fix
Add 'type': 'module' to package.json or use .mjs file extension.
Upgrade
Version history
5.0.1latest on npm
Audit
Dependencies
unifiedrequiredCore unified processor infrastructure required
remark-lintrequiredProvides the linting framework and message reporting
remark-parseoptionalParses Markdown into AST for linting
remark-stringifyoptionalSerializes AST back to Markdown; required for fixing
remark-gfmoptionalSupports GFM task list items; required for proper parsing of checkbox content
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-checkbox-content-indent — npm install remark-lint-checkbox-content-indent · libregistry