{"id":26255,"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.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","dash","file","hyphen","lint","name","remark","remark-lint","remark-lint-rule","typescript"],"install":[{"cmd":"npm install remark-lint-no-file-name-outer-dashes","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-file-name-outer-dashes","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-file-name-outer-dashes","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Needed as the processor framework","package":"unified","optional":false},{"reason":"Required to use lint rules","package":"remark-lint","optional":false},{"reason":"Used for parsing Markdown in API usage","package":"remark-parse","optional":true},{"reason":"Used for serializing Markdown in API usage","package":"remark-stringify","optional":true}],"imports":[{"note":"Package is ESM-only since v3; CJS require() will fail.","wrong":"const remarkLintNoFileNameOuterDashes = require('remark-lint-no-file-name-outer-dashes')","symbol":"remarkLintNoFileNameOuterDashes","correct":"import remarkLintNoFileNameOuterDashes from 'remark-lint-no-file-name-outer-dashes'"}],"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."},"warnings":[{"fix":"Use import instead of require. For older Node.js, use dynamic import or migrate to ESM.","message":"ESM-only: Package is ESM-only since v3. require() will throw an error.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade Node.js to version 16 or higher.","message":"Node.js 16+ required: As of v3, the package requires Node.js 16 or later.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade Node.js to 16+.","message":"No longer supports Node.js <16: Dropped support for Node.js versions below 16.","severity":"deprecated","affected_versions":">=3.0.0"}],"env_vars":null,"search_vec":"'16':32 '3.0.1':28 'across':88 'collect':82 'compat':29 'consist':51 'convent':54 'current':24 'dash':8,23,92 'ecosystem':41 'end':21 'enforc':50 'esm':45 'esm-on':44 'file':5,17,52,93 'flag':56 'follow':79 'guid':76 'help':49 'hyphen':60,94 'includ':67 'javascript':91 'lead':57 'lint':3,12,40,73,95,100,103 'markdown':74 'name':6,18,53,96 'node.js':31 'occasion':86 'often':63 'outer':7 'packag':90 'part':35 'patch':87 'preset':72,77 'releas':78 'remark':2,11,39,71,97,99,102 'remark-lint':10,38,98 'remark-lint-no-file-name-outer-dash':1 'remark-lint-rul':101 'remark-preset-lint-markdown-style-guid':70 'rule':13,48,104 'schedul':84 'stabl':25 'start':19 'style':75 'trail':59 'typescript':105 'unifi':81 'unintend':64 'version':26 'warn':15","created_at":"2026-05-01T13:49:02.260091+00:00","updated_at":"2026-05-01T13:49:02.260091+00:00","problems":[{"fix":"Run 'npm install remark-lint-no-file-name-outer-dashes' and ensure correct import statement.","cause":"Package not installed or wrong import path.","error":"Cannot find module 'remark-lint-no-file-name-outer-dashes'"},{"fix":"Change to import statement: import remarkLintNoFileNameOuterDashes from 'remark-lint-no-file-name-outer-dashes'","cause":"Using require() with an ESM-only package.","error":"ERR_REQUIRE_ESM: require() of ES Module"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"remark","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/remarkjs/remark-lint.git#main","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/remark-lint-no-file-name-outer-dashes","openapi_spec":null,"status_page":null,"smithery":null,"categories":[],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}