remark-lint/packages/remark-lint-no-shell-dollars/readme.md
Titus Wormer 4a380fca27 Rewrite so that rules are published to npm individually
Additionally, this updates for remark@7.0.0, unified@6.0.0.
2017-02-23 18:07:52 +01:00

962 B
Raw Blame History

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