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

Add maxWarnings option to eslint #69

Merged
merged 2 commits into from
Oct 7, 2021

Conversation

mikew
Copy link
Contributor

@mikew mikew commented Aug 21, 2021

Closes #68

return ['eslint', ['--ext', ext.join(','), ...files]]
maxWarnings ??= -1

return ['eslint', ['--ext', ext.join(','), `--max-warnings=${maxWarnings}`, ...files]]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to use = here, as eslint --max-warnings -1 fails because it tries to parse -1 as a flag.

@fi3ework
Copy link
Owner

Thanks for your PR! I'll take a closer look over the weekend ASAP.

@codecov-commenter
Copy link

Codecov Report

Merging #69 (14bebd1) into main (df4917e) will decrease coverage by 0.11%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #69      +/-   ##
==========================================
- Coverage   34.52%   34.40%   -0.12%     
==========================================
  Files          13       13              
  Lines         588      590       +2     
  Branches      114      115       +1     
==========================================
  Hits          203      203              
- Misses        384      386       +2     
  Partials        1        1              
Impacted Files Coverage Δ
...es/vite-plugin-checker/src/checkers/eslint/main.ts 0.00% <0.00%> (ø)
packages/vite-plugin-checker/src/types.ts 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df4917e...14bebd1. Read the comment docs.

@fi3ework fi3ework force-pushed the eslint-max-warnings branch from 14bebd1 to c09ece4 Compare October 7, 2021 15:59
@fi3ework fi3ework merged commit 8fc5d7f into fi3ework:main Oct 7, 2021
@fi3ework
Copy link
Owner

fi3ework commented Oct 7, 2021

@mikew Thanks for your PR! Sorry to be so late in responding. I'll add some test cases and refactor some code then release a new version. Thanks!

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

Successfully merging this pull request may close these issues.

Allow eslint warnings to fail a build
3 participants