Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when eslint doesn't match any files #2

Closed
tobeycodes opened this issue Nov 15, 2019 · 5 comments
Closed

error when eslint doesn't match any files #2

tobeycodes opened this issue Nov 15, 2019 · 5 comments

Comments

@tobeycodes
Copy link

tobeycodes commented Nov 15, 2019

When I delete one file from the repo in PR I get this error. The file I deleted was src/image.png

##[error]No files matching 'src/image.png' were found.
8
##[error]Node run failed with exit code 1

my options

repo-token: ***
files: src/**/*
extensions: .js,.jsx,.ts,.tsx
ignore: **/node_modules/**
@tobeycodes
Copy link
Author

I think this is related eslint/eslint#10587

@a-b-r-o-w-n
Copy link
Owner

This could be fixed in eslint, but is definitely a bug in this action 😅

  1. It shouldn't even attempt to lint the file in your example (extension filtering not working as expected).
  2. It should skip files that were deleted.

Thanks for the report. I will see what I can do to fix it.

@a-b-r-o-w-n
Copy link
Owner

@schrapel After reading through the linked issue, I think you are right. It seems that passing files to eslint takes precedence over the extensions config. I will whip up a PR to ignore deleted files though.

@tobeycodes
Copy link
Author

I think we probably need to run our own filtering to check whether any of the modified files in a PR match our actions files and extensions. If it doesn't then we don't even attempt to run eslint

@a-b-r-o-w-n
Copy link
Owner

@schrapel I just pushed a new version. Hopefully that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants