eslint-annotate-action
eslint-annotate-action copied to clipboard
fix: skip messages without any lines specified
Hi ! Thanks for your awesome action :) We encounter a problem when using the action in a huge monorepo where we lint only modified files. If you lint a file ignored in .eslintignore, ESLint send a warning without any line and endline.
https://eslint.org/docs/user-guide/configuring/ignoring-code#ignored-file-warnings
Action example:
jobs:
lint:
name: Lint
steps:
- id: files
uses: mmagician/get-changed-files@1028587c8596c55a9d03d813a48aa1377f60b087
with:
format: 'json'
- run: |
./node_modules/.bin/eslint -c .eslintrc.js --ext ts \
--output-file eslint_report.json --format json \
`jq -r '.[] | select(. | endswith(".ts")) | ..' <<< '${{ steps.files.outputs.added_modified }}`
Error from eslint-annotate-action:
Error: Empty value for parameter 'output.annotations[1].end_line': undefined
I'm also getting this error when I ignore some files from being linting.
For me, error text is little bit different, but conditions are the same - I have added .eslintignore file, because I don't want to analyze certain files:
Error: Empty value for parameter 'output.annotations[0].end_line': undefined
Hi all,
I am making updates in a v2 refactor #44. Can you test ataylorme/eslint-annotate-action@v2
Also if you provide an ESLint JSON file with an example of these rules I will add a unit test for it.