Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

feat: compatible with eslint-webpack-plugin #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fangbinwei
Copy link

  1. compatible with eslint-webpack-plugin. it seems the plugin groups eslint-loader's errors as Module Error before. So now grouping eslint-webpack-plugin's error as transformers/esLintError.js at least.

eslint-loader will emit multi-errors according to the number of files with errors. eslint-webpack-plugin will gather and throw only one compilation.errors/warnings. It is caused by the difference between loader and plugin in some degree.

  1. change 1 errors to 1 error

when using eslint-loader:
image

When using eslint-webpack-plugin before this pr:
image

When using eslint-webpack-plugin after this pr: :

image

@@ -90,8 +90,6 @@ class Debugger {
this.capture();
fun.call();
return this.capturedMessages;
} catch (e) {
Copy link
Author

Choose a reason for hiding this comment

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

I installed eslint@7, some packages related to eslint rule may be also updated, so I get
error Unnecessary catch clause no-useless-catch

@coreyleelarson
Copy link
Contributor

Is there any update on this PR? It would be nice to have support for eslint-webpack-plugin.

@haoqunjiang
Copy link

I've shipped this feature in my fork of this plugin: https://github.com/sodatea/friendly-errors-webpack-plugin/releases/tag/v1.8.0

@coreyleelarson
Copy link
Contributor

I've shipped this feature in my fork of this plugin: https://github.com/sodatea/friendly-errors-webpack-plugin/releases/tag/v1.8.0

That's great! There are also a few features and necessary bugfixes in the next/2.0.0-beta.2 version that have been sitting in a beta release for a little over a year you might not want to miss.

@binury
Copy link

binury commented Mar 23, 2021

image

I noticed there seem to be [some]* cases where certain rules emit an error that isn't parsed properly. Not exclusive to this branch- but another incompatibility between friendly-errors and the new eslint plugin.

*I think there are several but at least no-unused-vars

@fangbinwei
Copy link
Author

I have no idea, could you provide reproduction repo? @binury

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

Successfully merging this pull request may close these issues.

4 participants