{"library":"remark-lint-no-file-name-outer-dashes","title":"remark-lint-no-file-name-outer-dashes","description":"A remark-lint rule that warns when file names start or end with dashes. Current stable version is 3.0.1, compatible with Node.js 16+. It is part of the remark-lint ecosystem and is ESM-only. This rule helps enforce consistent file naming conventions by flagging leading or trailing hyphens, which are often unintended. It is included in the `remark-preset-lint-markdown-style-guide` preset. Releases follow the unified collective's schedule with occasional patches across all packages.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install remark-lint-no-file-name-outer-dashes"],"cli":{"name":"remark","version":null}},"imports":["import remarkLintNoFileNameOuterDashes from 'remark-lint-no-file-name-outer-dashes'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { unified } from 'unified';\nimport remarkParse from 'remark-parse';\nimport remarkStringify from 'remark-stringify';\nimport remarkLint from 'remark-lint';\nimport remarkLintNoFileNameOuterDashes from 'remark-lint-no-file-name-outer-dashes';\nimport { read } from 'to-vfile';\nimport { reporter } from 'vfile-reporter';\n\nconst file = await read('-mercury.md');\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoFileNameOuterDashes)\n  .use(remarkStringify)\n  .process(file);\n\nconsole.error(reporter(file));\n// Output: 1:1: Unexpected initial or final dashes in file name, expected dashes to join words","lang":"typescript","description":"Shows how to use the rule in Node.js with unified to detect leading dashes in a filename.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}