[Feature] Document need for `exclude_path` input
clintonb opened this issue · 7 comments
Is your feature request related to a problem? Please describe.
The exclude_path
input is essentially required if ESLint is configured to ignore a path/file. Otherwise, if the file is modified, ESLint and the action will fail with a message like:
{"fatal":false,"severity":1,"message":"File ignored because of a matching ignore pattern. Use "--no-ignore" to override."}
Describe the solution you'd like?
Update the documentation to reflect the need to duplicate ignored patterns.
Describe alternatives you've considered?
No response
Anything else?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Thanks for reporting this issue.
The exclude_path
is only required for excluding certain files that match the extensions
input but you don't want to run eslint
on.
I see the confusion with .eslintignore
But they are made to work either together or completely separate. i.e
eslintignore
: Don't run eslint on these files
exclude_path
: Don't pass these list of files to eslint which could also be added to your .eslintignore
but again not a requirement for exclude_path
which removes to overhead by eslint of determining if the file should be ignored.
The log line I posted was the result of using only .eslintignore
. The action doesn't seem to respect that file, and passes an ignored file to eslint
. eslint
raises an error because it's been asked to run on an ignored file.
Okay strange but I’ll try to replicate this, I assumed that eslint
would ignore the file
Unable to replicate this but updated the README to highlight the differences.