Registry / testing / remark-lint-no-shell-dollars

remark-lint-no-shell-dollars

JSON →
library4.0.1jsnpmunverified

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.

npm install remark-lint-no-shell-dollars
INSTALL
IMPORT
SIG · REMARK-LINT-NO-SHE
R
remark-lint-no-shell-dollars
testingjavascriptv4.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.

remarkLintNoShellDollars
import remarkLintNoShellDollars from 'remark-lint-no-shell-dollars'
const remarkLintNoShellDollars = require('remark-lint-no-shell-dollars')
Package is ESM-only; CJS require will fail. Default export.
remark-lint-no-shell-dollars (in config)
"remark-lint-no-shell-dollars"
"remark-lint/no-shell-dollars"
In package.json or .remarkrc, use the full package name, not a subpath.
no named exports
import { remarkLintNoShellDollars } from 'remark-lint-no-shell-dollars'
The package only has a default export; named import will be undefined.

Lint a Markdown file for shell code blocks where every line starts with $, indicating copy-paste issues.

import remarkLint from 'remark-lint' import remarkLintNoShellDollars from 'remark-lint-no-shell-dollars' import remarkParse from 'remark-parse' import remarkStringify from 'remark-stringify' import {read} from 'to-vfile' import {unified} from 'unified' import {reporter} from 'vfile-reporter' const file = await read('example.md') await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintNoShellDollars) .use(remarkStringify) .process(file) console.error(reporter(file))
Debug
Known issues
breakingPackage is ESM-only since version 4.
fix
Use import syntax instead of require().
affects: >=4.0.0
breakingNode.js 16+ required starting from version 4.
fix
Upgrade Node.js to version 16 or later.
affects: >=4.0.0
gotchaPackage must be used with remark-lint core; standalone use will fail.
fix
Add remark-lint to your unified pipeline before using this rule.
affects: all
gotchaNo options are accepted; passing options will be ignored (no error).
fix
Use without parameters: .use(remarkLintNoShellDollars).
affects: all
deprecatedThe plugin name remark-lint-no-shell-dollars is stable but presets may change.
fix
Check preset compatibility when upgrading remark-lint monorepo.
affects: all
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using CommonJS require() on an ESM-only package.
fix
Switch to import syntax or use dynamic import().
TypeError: remarkLintNoShellDollars is not a function
Using named import instead of default import.
fix
Use `import remarkLintNoShellDollars from 'remark-lint-no-shell-dollars'` without braces.
Cannot find module 'remark-lint-no-shell-dollars'
Package not installed or misspelled.
fix
Run `npm install remark-lint-no-shell-dollars` and check spelling.
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
unifiedrequiredremark-lint plugins are unified plugins
remark-lintrequiredmust be used alongside remark-lint core
Agent activity
2 hits · last 30 days
node
2
Resources
remark-lint-no-shell-dollars — npm install remark-lint-no-shell-dollars · libregistry