Skip to content

Add --max-warnings flag to tsdx lint#858

Merged
agilgur5 merged 8 commits into
jaredpalmer:masterfrom
georgevarghese185:add-max-warnings-flag
Sep 17, 2020
Merged

Add --max-warnings flag to tsdx lint#858
agilgur5 merged 8 commits into
jaredpalmer:masterfrom
georgevarghese185:add-max-warnings-flag

Conversation

@georgevarghese185

@georgevarghese185 georgevarghese185 commented Sep 16, 2020

Copy link
Copy Markdown
Contributor

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.

@agilgur5 agilgur5 left a comment

Copy link
Copy Markdown
Collaborator

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

Comment thread test/e2e/fixtures/lint/file-with-lint-warnings.ts Outdated
Comment thread test/e2e/tsdx-lint.test.ts
Comment thread src/index.ts Outdated
Comment thread src/index.ts Outdated
Comment thread src/index.ts Outdated
@georgevarghese185

Copy link
Copy Markdown
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.

@agilgur5 agilgur5 left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

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

@allcontributors

Copy link
Copy Markdown
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