1 year ago

#72135

test-img

j obe

Does double dash work differently for npm?

I was looking into understanding how -- works recently when I've seen it used on command lines and I learned that it separates a command and it's options from other arguments, so that the command knows not to expect any further options after the -- e.g.

 grep -- --hello data.txt

however I was reading some npm articles and I came across this command in a package.json file:

"lint:fix": "npm run lint -- --fix",

What I'm confused about here is that the --fix option is being passed after the double dashes, isn't this against how the -- syntax is meant to work?

javascript

node.js

npm

package.json

0 Answers

Your Answer

Accepted video resources