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

ignoreLintWarnings option #213

Merged
merged 8 commits into from
Feb 20, 2019

Conversation

lizzzp1
Copy link

@lizzzp1 lizzzp1 commented Feb 6, 2019

Attempts to address: #212
Adds a new option ignoreLintWarnings.

Question:
Should this have a test?

Thanks!

@johnnyreilly
Copy link
Member

Should this have a test?

Yes definitely 😄

Take a look at the current tests here: /~https://github.com/Realytics/fork-ts-checker-webpack-plugin/tree/master/test

Hopefully there's a natural place for a new test to "fit" - unit or integration test I'm not sure. Hopefully an obvious candidate should present itself.

@lizzzp1
Copy link
Author

lizzzp1 commented Feb 7, 2019

@johnnyreilly added test. Let me know if it's not correct.

@johnnyreilly
Copy link
Member

Thanks! I'll take a look soon

@johnnyreilly
Copy link
Member

Hey @lizzzp1

I just wanted to check that the functionality in your PR not superseded by this PR:

#214

I kind of think they're different enough but I wanted to double check with you.

@lizzzp1
Copy link
Author

lizzzp1 commented Feb 16, 2019

Hi @johnnyreilly, yeah that does look to have different functionality.

@johnnyreilly
Copy link
Member

Cool - I'd like to get yours in first. Could you update the package.json and CHANGELOG.md please?

src/index.ts Outdated
@@ -838,7 +841,7 @@ class ForkTsCheckerWebpackPlugin {
(this.lints || []).concat(this.diagnostics).forEach(message => {
const formattedMessage = this.formatter(message, this.useColors);

message.isWarningSeverity()
message.isWarningSeverity() && !this.ignoreLintWarnings
? this.logger.warn(formattedMessage)
Copy link
Member

Choose a reason for hiding this comment

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

I think this might be an issue in the case where you have a warning and you are ignoring warnings - it looks like an error would be logged in that case ..

Copy link
Author

Choose a reason for hiding this comment

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

ah. So int that case I would want to do nothing here, right?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I think so

Copy link
Author

Choose a reason for hiding this comment

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

Ok, updated. Let me know if that looks correct to you.

src/index.ts Outdated
@@ -808,6 +811,20 @@ class ForkTsCheckerWebpackPlugin {
return function noopEmitCallback() {};
}

private getLoggerMessage(
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for this change - could I request one more tweak to avoid confusion please?

The name and the return type of the method suggests a logger message is passed back. In reality no value is ever returned I think? Could this be tweaked to make intention a bit clearer please?

Copy link
Author

Choose a reason for hiding this comment

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

Oops yes, you're totally right. Will update.

@lizzzp1
Copy link
Author

lizzzp1 commented Feb 19, 2019

@johnnyreilly what needs to be updated in package.json? I see

@johnnyreilly
Copy link
Member

Awesome - thanks for your work!

Once the CI is happy I'll look to merge this and get a release out. 🤗

@johnnyreilly johnnyreilly merged commit 903d1de into TypeStrong:master Feb 20, 2019
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.

2 participants