{"id":26269,"library":"remark-lint-no-shell-dollars","title":"remark-lint-no-shell-dollars","description":"remark-lint rule to warn when every line in shell code blocks is prefixed by a `$` sign, which hinders copy/pasting. Current version 4.0.1, part of the remark-lint monorepo. ESM-only, supports Node.js 16+. No configurable options. It is included in the `remark-preset-lint-markdown-style-guide` preset. Differentiates from other lint rules by focusing specifically on shell code readability and usability.","status":"active","version":"4.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","dollar","lint","remark","remark-lint","remark-lint-rule","rule","shel","typescript"],"install":[{"cmd":"npm install remark-lint-no-shell-dollars","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-shell-dollars","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-shell-dollars","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"remark-lint plugins are unified plugins","package":"unified","optional":false},{"reason":"must be used alongside remark-lint core","package":"remark-lint","optional":false}],"imports":[{"note":"Package is ESM-only; CJS require will fail. Default export.","wrong":"const remarkLintNoShellDollars = require('remark-lint-no-shell-dollars')","symbol":"remarkLintNoShellDollars","correct":"import remarkLintNoShellDollars from 'remark-lint-no-shell-dollars'"},{"note":"In package.json or .remarkrc, use the full package name, not a subpath.","wrong":"\"remark-lint/no-shell-dollars\"","symbol":"remark-lint-no-shell-dollars (in config)","correct":"\"remark-lint-no-shell-dollars\""},{"note":"The package only has a default export; named import will be undefined.","wrong":"import { remarkLintNoShellDollars } from 'remark-lint-no-shell-dollars'","symbol":"no named exports","correct":""}],"quickstart":{"code":"import remarkLint from 'remark-lint'\nimport remarkLintNoShellDollars from 'remark-lint-no-shell-dollars'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport {read} from 'to-vfile'\nimport {unified} from 'unified'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await read('example.md')\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoShellDollars)\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))","lang":"typescript","description":"Lint a Markdown file for shell code blocks where every line starts with $, indicating copy-paste issues."},"warnings":[{"fix":"Use import syntax instead of require().","message":"Package is ESM-only since version 4.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade Node.js to version 16 or later.","message":"Node.js 16+ required starting from version 4.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Add remark-lint to your unified pipeline before using this rule.","message":"Package must be used with remark-lint core; standalone use will fail.","severity":"gotcha","affected_versions":"all"},{"fix":"Use without parameters: .use(remarkLintNoShellDollars).","message":"No options are accepted; passing options will be ignored (no error).","severity":"gotcha","affected_versions":"all"},{"fix":"Check preset compatibility when upgrading remark-lint monorepo.","message":"The plugin name remark-lint-no-shell-dollars is stable but presets may change.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Switch to import syntax or use dynamic import().","cause":"Using CommonJS require() on an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Use `import remarkLintNoShellDollars from 'remark-lint-no-shell-dollars'` without braces.","cause":"Using named import instead of default import.","error":"TypeError: remarkLintNoShellDollars is not a function"},{"fix":"Run `npm install remark-lint-no-shell-dollars` and check spelling.","cause":"Package not installed or misspelled.","error":"Cannot find module 'remark-lint-no-shell-dollars'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}