Skip to content

no unix double ampersand

tannerbaum edited this page Feb 26, 2020 · 3 revisions

no-unix-double-ampersand

This rule is not fixable ✖︎

Why?

Using && as a way of serializing commands is a *nix bash idiom. It will not work the same way on for example Windows machines.

Examples

{
    "build": "npm run build:clean && npm run build:ts" 🚨
}

yields

Use of unix double ampersand (&&) in script 'build' is not allowed, consider using npm-run-all/run-s (no-unix-double-ampersand)

Solution

Use npm-run-all:

{
    "build": "run-s build: build:ts" 🟢
}


scriptlint status
npm version badge
dependency badge
Issue badge
CI badge

Clone this wiki locally