Looking for a way to only target a particular error command I've researched and run across "How do you run eslint for only a specific rule or set of rules - command line only" but in the attempts of:
"scripts": {
"lint": "eslint ./ --ext .js,.jsx,.ts,.tsx --ignore-pattern *.test.js",
"lint:target": "eslint ./ --ext .js,.jsx,.ts,.tsx --ignore-pattern *.test.js --rule \"{react/no-unstable-nested-components: error}\"",
"lint:silent": "eslint ./ --ext .js,.jsx,.ts,.tsx || exit 0"
}
and running:
yarn lint:target
I still get a log of every error and warning. Modified to:
"lint:target": "eslint ./ --ext .js,.jsx,.ts,.tsx --ignore-pattern *.test.js | egrep \"(react/no-unstable-nested-components)\"",
I just get the error message back.
Research
- How to list files being linted by ESLint
- How to get a list of all eslint rules that errored during linting?
- Why eslint can't detect all files in the directory but can detect single file?
Is there a way in my scripts or a terminal command to get all files with a particular error message? I do not want to modify my .eslintrc.js
or install any dependencies but I'd like to resolve all files pertaining to an error message so it would make a pull request review easier.