Registry / testing / remark-lint-haiku

remark-lint-haiku

JSON →
library0.3.0jsnpmunverified

A remark-lint plugin that validates haiku code blocks follow the 5-7-5 syllable pattern. Version 0.3.0 is the latest stable release; no regular release cadence. Uses the 'syllable' library for syllable counting. Differentiates from general linters by targeting haiku structure specifically within Markdown documents.

npm install remark-lint-haiku
INSTALL
IMPORT
SIG · REMARK-LINT-HAIKU
R
remark-lint-haiku
testingjavascriptv0.3.0
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.

remarkLintHaiku
import remarkLintHaiku from 'remark-lint-haiku'
const remarkLintHaiku = require('remark-lint-haiku').default
Package has a default export; CommonJS require works with require('remark-lint-haiku') directly.

Shows how to use remark-lint-haiku to validate a haiku code block's syllable count.

import { remark } from 'remark'; import remarkLintHaiku from 'remark-lint-haiku'; const processor = remark().use(remarkLintHaiku); const markdown = `# My haiku \`\`\`haiku Parallelogram I tried to cut from fabric I cut a rhombus \`\`\` `; processor.process(markdown).then((vfile) => { console.log(vfile.messages); // [] });
Debug
Known issues
gotchaThe plugin only checks fenced code blocks with the language 'haiku'.
fix
Ensure haiku text is inside a \`\`\`haiku code block.
affects: >=0.0.0
gotchaSyllable counting may not be 100% accurate for all words (e.g., technical jargon)
fix
Manually verify syllable counts for non-standard words.
affects: >=0.0.0
gotchaThe plugin does not validate line order or total lines; only each line's syllable count.
fix
Ensure the haiku has exactly three lines with 5-7-5 syllables.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'remark-lint-haiku'
Package not installed or imported incorrectly.
fix
Run npm install remark-lint-haiku and ensure import path is correct.
TypeError: remarkLintHaiku is not a function
Importing a named export instead of default export.
fix
Use import remarkLintHaiku from 'remark-lint-haiku' (default import).
Upgrade
Version history
0.3.0latest on npm
Audit
Dependencies
unified-lint-rulerequiredUsed to define the lint rule for remark-lint.
unified-message-controlrequiredProvides message control utilities for lint rules.
syllablerequiredCounts syllables for haiku validation.
Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
remark-lint-haiku — npm install remark-lint-haiku · libregistry