Registry / testing / remark-lint-no-file-name-consecutive-dashes

remark-lint-no-file-name-consecutive-dashes

JSON →
library3.0.1jsnpmunverified

A remark-lint rule to warn when file names contain consecutive dashes. Part of the remark-lint ecosystem for linting Markdown. Current stable version 3.0.1, ESM-only, requires Node.js 16+. No options. Ships TypeScript types. Released under the unified collective. Release cadence follows remark-lint monorepo updates.

npm install remark-lint-no-file-name-consecutive-dashes
INSTALL
IMPORT
SIG · REMARK-LINT-NO-FIL
R
remark-lint-no-file-name-consecutive-dashes
testingjavascriptv3.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.

remarkLintNoFileNameConsecutiveDashes
import remarkLintNoFileNameConsecutiveDashes from 'remark-lint-no-file-name-consecutive-dashes'
import { remarkLintNoFileNameConsecutiveDashes } from 'remark-lint-no-file-name-consecutive-dashes'
This package has only a default export; named import will fail.
remarkLintNoFileNameConsecutiveDashes
const remarkLintNoFileNameConsecutiveDashes = await import('remark-lint-no-file-name-consecutive-dashes')
const remarkLintNoFileNameConsecutiveDashes = require('remark-lint-no-file-name-consecutive-dashes')
ESM-only since v3; CommonJS require() will throw.
remarkLintNoFileNameConsecutiveDashes
import remarkLintNoFileNameConsecutiveDashes from 'https://esm.sh/remark-lint-no-file-name-consecutive-dashes@3'
For Deno or browser via esm.sh.

Shows how to use the rule in a unified pipeline to lint a file with consecutive dashes in its name.

import { unified } from 'unified'; import remarkParse from 'remark-parse'; import remarkStringify from 'remark-stringify'; import remarkLint from 'remark-lint'; import remarkLintNoFileNameConsecutiveDashes from 'remark-lint-no-file-name-consecutive-dashes'; import { read } from 'to-vfile'; import { reporter } from 'vfile-reporter'; const file = await read('plug--ins.md'); await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintNoFileNameConsecutiveDashes) .use(remarkStringify) .process(file); console.error(reporter(file)); // Output: 1:1: Unexpected consecutive dashes in a file name, expected `-`
Debug
Known issues
breakingPackage is ESM-only since v3. CommonJS require() will throw an error.
fix
Use dynamic import() or switch to ESM.
affects: >=3.0.0
deprecatedNo deprecated features known.
gotchaThe rule has no options; passing any configuration will be ignored.
fix
Do not pass any options; usage is .use(remarkLintNoFileNameConsecutiveDashes) only.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'remark-lint-no-file-name-consecutive-dashes'
Package not installed or incorrect import path.
fix
Run `npm install remark-lint-no-file-name-consecutive-dashes` and ensure import path matches.
import { remarkLintNoFileNameConsecutiveDashes } from 'remark-lint-no-file-name-consecutive-dashes'
Trying named import, but package exports default only.
fix
Use `import remarkLintNoFileNameConsecutiveDashes from 'remark-lint-no-file-name-consecutive-dashes'`
require() of ES Module not supported
Package is ESM-only; using require() in CommonJS context.
fix
Use dynamic import() or convert project to ESM.
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies
unifiedrequiredpeer dependency for remark-lint plugin system
remark-lintrequiredrequired to register the lint rule
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-no-file-name-consecutive-dashes — npm install remark-lint-no-file-name-consecutive-dashes · libregistry