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

eslint emitWarning option #374

Closed
olee opened this issue Jan 12, 2020 · 4 comments
Closed

eslint emitWarning option #374

olee opened this issue Jan 12, 2020 · 4 comments

Comments

@olee
Copy link

olee commented Jan 12, 2020

eslint-loader has an option named emitWarning to make all errors warnings instead, to help during development so hot-updates etc. do not fail.
It would be great to allow setting this option in fork ts checker as well.

@johnnyreilly
Copy link
Member

Is that configurable using eslintOptions? Possible dupe of #346

@piotr-oles piotr-oles mentioned this issue Apr 18, 2020
26 tasks
@piotr-oles
Copy link
Collaborator

@olee
Please try fork-ts-checker-webpack-plugin@alpha - I've published a new version which should resolve this issue 🚀 (there is an option to pass eslint options and another option to set issues predicates)
I will close this issue to clean-up the backlog. If this release didn't solve the issue, we can re-open this :)

@danylkaaa
Copy link

Hello! As I found, you just pass eslint options to eslint CLI. So, eslint does not have build-in CLI option to emit all errors as warnings.
eslint-webpack-plugin does this with custom processor for CLI errors
https://github.com/webpack-contrib/eslint-webpack-plugin/blob/c12e7be0be49f95fa8f2d9ae354acba3bd412b5c/src/linter.js#L202

Could you pls add some kind of preprocessor for eslint errors, that will allow to work with HMR even if there is eslint error?

@piotr-oles
Copy link
Collaborator

Hi! :) You can use issues hook: https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#plugin-hooks . This is SyncWaterfallHook so you can return modified list of issues. You can for example map all eslint issues to be with severity = 'warning'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants