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 --max-warnings flag to tsdx lint #858

Merged
merged 8 commits into from
Sep 17, 2020

Conversation

georgevarghese185
Copy link
Contributor

@georgevarghese185 georgevarghese185 commented Sep 16, 2020

Fixes #853

Works in a similar way to the --max-warnings flag in ESLint.

If tsdx lint finds more than --max-warnings number of warnings, it exits with a non-zero code. Otherwise, it exits with 0.

Works in a similar way to the --max-warnings flag in ESLint.

If `tsdx lint` finds more than `--max-warnings` number of warnings, it
exits with a non-zero code. Otherwise, it exits with 0
@vercel

This comment has been minimized.

Copy link
Collaborator

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @georgevarghese185 ! Great work and comprehensive testing! Have a few suggestions below to improve this, but is otherwise good.

Was going to add that you need to have the option and example, but I see you figured out that piece yourself.

One thing missing is that the API Reference section in the README needs to be updated with the new output of tsdx lint --help with this change

test/e2e/fixtures/lint/file-with-lint-warnings.ts Outdated Show resolved Hide resolved
test/e2e/tsdx-lint.test.ts Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
@georgevarghese185
Copy link
Contributor Author

Hey, @agilgur5 !

Thanks for the suggestions (and for being super polite 😃)

I think I've addressed everything. Take another look and let me know if I've missed something or if it can be improved further.

Copy link
Collaborator

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

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

Thanks for the iteration, LGTM!

@agilgur5 agilgur5 merged commit dd92fec into jaredpalmer:master Sep 17, 2020
@agilgur5
Copy link
Collaborator

@allcontributors please add @georgevarghese185 for code, docs, test

@allcontributors
Copy link
Contributor

@agilgur5

I've put up a pull request to add @georgevarghese185! 🎉

paul-vd pushed a commit to EezyQuote/tsdx that referenced this pull request Dec 1, 2020
Works the same as ESLint's --max-warnings flag

If `tsdx lint` finds no errors but more than `--max-warnings`
number of warnings, it exits with a non-zero code. Otherwise,
it exits with 0

- Add lint warning tests for this
- Use default value of Infinity for --max-warnings flag
- Update README's API Reference with new flag
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.

lint flag to make warnings exit with non-zero
2 participants