Skip to content

Commit dd277ad

Browse files
fix: improve eslint reporting
1 parent f26c16e commit dd277ad

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

.github/workflows/build.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -174,28 +174,20 @@ jobs:
174174
175175
- name: Run lint
176176
shell: bash
177-
id: lint
178-
continue-on-error: true
179177
run: |
180-
npm run lint -- --format=json --output-file reports/lint-report.json
178+
npm run lint -- --format=json --output-file reports/lint-report.json || true
179+
181180
# hack to print results in the console
182181
node --print "require('./node_modules/eslint/lib/cli-engine/formatters/stylish.js')(require('./reports/lint-report.json'))"
183182
184183
- name: Annotate Code Linting Results
185184
uses: ataylorme/eslint-annotate-action@d57a1193d4c59cbfbf3f86c271f42612f9dbd9e9 # 3.0.0
186185
with:
187-
report-json: reports/lint-report.json
188186
fail-on-error: true
189187
fail-on-warning: true
188+
markdown-report-on-step-summary: true
190189
only-pr-files: false
191-
192-
- name: Fail if lint failed
193-
shell: bash
194-
if: |
195-
steps.lint.outcome != 'success'
196-
run: |
197-
echo "Lint failed"
198-
exit 1;
190+
report-json: reports/lint-report.json
199191

200192
npm-test:
201193
name: Test the code

0 commit comments

Comments
 (0)