-
Notifications
You must be signed in to change notification settings - Fork 58
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
Added Github action that runs eslint on pull request #109
Conversation
Thanks @aysp-99! Can you push a code change with ESLint warnings just to test? Like remove a line break at the end of a file? Also use 'Fixes' instead of 'Resloves' in the first comment to let Github know which issue this PR fixes. I hope you're following the discussions at https://github.com/RocketMeet/RocketMeet-mailer/pull/23 too. |
Yes, I am following the discussions. Regarding testing the Github action, I created a fork of my RocketMeet-client repository using second account and apparently it is not working. It is not displaying any warnings. Should I make this as a draft pr, so that I can resolve the issues? |
You can create another test branch at your forked repo and open a PR there too.
That's not necessary. You can just keep pushing commits. |
Actually, as mentioned in the original repository of reviewdog there is a limitation regarding displaying error messages when a pull request is created from forked repository. Due to which, I thought to create a fork of my Github repository from a second account to test if it works or not. Though, I created a branch and tested by creating a pull request but it doesn't seem to work I don't understand why. Here's the screen shot of it:
Okay |
Interesting! So it won't work even with a custom token? In that case we might have to go with a different solution. I think you and @mdpial should discuss this here or at our chatroom and find a solution together. :D |
For me it is not even showing errors on pull request created by another branch which I created. |
@aysp-99 You might wanna go with the approach used at the server and mailer. You can check out the comments at those PRs for 'why'. Thanks for persevering! :) |
Yes, sure. Will do it! Just wanted to check one last time if it displays errors as comments/annotations on PR. Thanks. |
Done. Though, it only runs eslint on |
Seems like there are no good solutions available for that, so we'll settle with this one! Btw, in case you didn't notice, the check comments appear here (once it's working).
Oh, did you find any option to run it on all *.ts files or something like that? Also, if the checker was working properly, it should have shown the results here, like on @mdpial's PRs. Can you take a look? You can refer this too! |
@anandbaburajan Sorry for this mistake 😞 . After reading all the comments I have tried to make an ESLint error outside of the @aysp-99 You can try this glob pattern + with:
+ custom-glob: "./**" Updates: This approach has drawbacks. It tries to lint others files too. |
We should only lint .ts and .tsx files actually (at server and mailer too) as mentioned in the readme because our config is setup for Typescript and we're also following the
Sure. |
Got it!
I am still not able to figure out why isn't it displaying the errors as annotations. 😕 |
I tried using this: |
@aysp-99 |
0a49119
to
26eb0ca
Compare
Thanks! I used |
Sorry for the confusion: only .ts files needed for server and mailer. But both .ts and .tsx for the client! Thank you two for the efforts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aysp-99! You can remove the dummy errors and I'll merge! After the PR is merged, please open a test PR with dummy errors just to see if the action works as expected. |
Done.
Sure. Will do it. |
Hey, no need - it works! :D Check #116. |
Fixes #100
Added Github Action to run eslint on pull requests and displays result using annotations-
used this approach
created
linter.yml
file in/github/workflows
folder to create eslint actionruns
eslint
on pull request and displays annotations for errors