{"id":26252,"library":"remark-lint-no-file-name-consecutive-dashes","title":"remark-lint-no-file-name-consecutive-dashes","description":"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.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","basename","dash","file","hyphen","lint","name","remark","remark-lint","typescript"],"install":[{"cmd":"npm install remark-lint-no-file-name-consecutive-dashes","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-file-name-consecutive-dashes","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-file-name-consecutive-dashes","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for remark-lint plugin system","package":"unified","optional":false},{"reason":"required to register the lint rule","package":"remark-lint","optional":false}],"imports":[{"note":"This package has only a default export; named import will fail.","wrong":"import { remarkLintNoFileNameConsecutiveDashes } from 'remark-lint-no-file-name-consecutive-dashes'","symbol":"remarkLintNoFileNameConsecutiveDashes","correct":"import remarkLintNoFileNameConsecutiveDashes from 'remark-lint-no-file-name-consecutive-dashes'"},{"note":"ESM-only since v3; CommonJS require() will throw.","wrong":"const remarkLintNoFileNameConsecutiveDashes = require('remark-lint-no-file-name-consecutive-dashes')","symbol":"remarkLintNoFileNameConsecutiveDashes","correct":"const remarkLintNoFileNameConsecutiveDashes = await import('remark-lint-no-file-name-consecutive-dashes')"},{"note":"For Deno or browser via esm.sh.","wrong":null,"symbol":"remarkLintNoFileNameConsecutiveDashes","correct":"import remarkLintNoFileNameConsecutiveDashes from 'https://esm.sh/remark-lint-no-file-name-consecutive-dashes@3'"}],"quickstart":{"code":"import { unified } from 'unified';\nimport remarkParse from 'remark-parse';\nimport remarkStringify from 'remark-stringify';\nimport remarkLint from 'remark-lint';\nimport remarkLintNoFileNameConsecutiveDashes from 'remark-lint-no-file-name-consecutive-dashes';\nimport { read } from 'to-vfile';\nimport { reporter } from 'vfile-reporter';\n\nconst file = await read('plug--ins.md');\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoFileNameConsecutiveDashes)\n  .use(remarkStringify)\n  .process(file);\n\nconsole.error(reporter(file));\n// Output: 1:1: Unexpected consecutive dashes in a file name, expected `-`","lang":"javascript","description":"Shows how to use the rule in a unified pipeline to lint a file with consecutive dashes in its name."},"warnings":[{"fix":"Use dynamic import() or switch to ESM.","message":"Package is ESM-only since v3. CommonJS require() will throw an error.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"","message":"No deprecated features known.","severity":"deprecated","affected_versions":""},{"fix":"Do not pass any options; usage is .use(remarkLintNoFileNameConsecutiveDashes) only.","message":"The rule has no options; passing any configuration will be ignored.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install remark-lint-no-file-name-consecutive-dashes` and ensure import path matches.","cause":"Package not installed or incorrect import path.","error":"Cannot find module 'remark-lint-no-file-name-consecutive-dashes'"},{"fix":"Use `import remarkLintNoFileNameConsecutiveDashes from 'remark-lint-no-file-name-consecutive-dashes'`","cause":"Trying named import, but package exports default only.","error":"import { remarkLintNoFileNameConsecutiveDashes } from 'remark-lint-no-file-name-consecutive-dashes'"},{"fix":"Use dynamic import() or convert project to ESM.","cause":"Package is ESM-only; using require() in CommonJS context.","error":"require() of ES Module not supported"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}