To make the eslint issues more visible on pull requests, especially the warnings, we used to add comments on PR as part of our review process.
This manual process is error-prone and slows down our review process. To make it streamlined, I was looking for a tool which can report the eslint errors/warnings as PR review annotations on the exact line where eslint finds the problems. Thus I came to know about reviewdog. Luckily reviewdog has GitHub actions for eslint which is perfect for us.
Below is the sample GitHub action file we use in our projects.
The permission block in
reviewdog.yml will give the required permissions for the
GITHUB_TOKEN generated for the action.
Here is the reviewdog in action,
I hope you will find it helpful and try it in one of your projects.