mirror of
https://github.com/remarkjs/remark-lint.git
synced 2024-10-27 11:47:47 +03:00
.. | ||
index.js | ||
package.json | ||
readme.md |
remark-lint-no-shell-dollars
Warn when shell code is prefixed by dollar-characters.
Ignored indented code blocks and fenced code blocks without language flag.
Install
npm install --save remark-lint-no-shell-dollars
Example
When this rule is turned on, the following file
valid.md
is ok:
```sh
echo a
echo a > file
```
```zsh
$ echo a
a
$ echo a > file
```
It’s fine to use dollars in non-shell code.
```js
$('div').remove();
```
When this rule is turned on, the following file
invalid.md
is not ok:
```bash
$ echo a
$ echo a > file
```
1:1-4:4: Do not use dollar signs before shell-commands