How do you run eslint for only a specific rule or set of rules – command line only

I don’t know if this is the best way, but I was able to get this working:

$ eslint helpme.js --no-eslintrc --env "es6" --env "node" --parser-options "{ecmaVersion: 2018}" --rule "{some-important-rule: error}"

Note: With this method (ignoring .eslintrc completeley) you still have to add some stuff from .eslintrc like your environment and parser options.

Leave a Comment

tech