remark-lint/packages/remark-lint-no-shell-dollars
Titus Wormer 9327e77be3 6.0.0
2017-02-23 18:34:08 +01:00
..
index.js Rewrite so that rules are published to npm individually 2017-02-23 18:07:52 +01:00
package.json 6.0.0 2017-02-23 18:34:08 +01:00
readme.md Rewrite so that rules are published to npm individually 2017-02-23 18:07:52 +01:00

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
        ```

        Its 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

License

MIT © Titus Wormer