Closed decademoon closed 3 years ago
Solving it now. =)
My problem is a little different. In my project, there remains a lot of errors & warnings. I only want to lint what is saved by current user in his IDE. Now, when the project starts, all files are linted..about 100+
@WilkinWendy for this you can enable lintDirtyModulesOnly
https://github.com/webpack-contrib/eslint-webpack-plugin#lintdirtymodulesonly
@WilkinWendy for this you can enable
lintDirtyModulesOnly
I’ve tried it,but not work.
@WilkinWendy for this you can enable
lintDirtyModulesOnly
I’ve tried it,but not work.
{ exclude: 'node_modules', extensions: ['.js', '.jsx', '.vue', '.ts', '.tsx'], quiet: true, cache: true, fix: true, lintDirtyModulesOnly: true, formatter: 'codeframe' }
@WilkinWendy for this you can enable
lintDirtyModulesOnly
I’ve tried it,but not work.
In my project, the compilation seems to be triggered in a dead loop, when fix:true
@WilkinWendy for this you can enable
lintDirtyModulesOnly
I’ve tried it,but not work.
In my project, the compilation seems to be triggered in a dead loop, when
fix:true
I‘ve worked out reason of this problem.
If a file is unfixable,which means the output of the fixed file is the same as the source file,
eg: no-console
rule is unfixable.
the outputFixes function will be executed in a dead loop.
Expected Behavior
Only lint modules that were rebuilt after changing a file.
Actual Behavior
Every module is linted after changing a file.
Code
How Do We Reproduce?
It seems there was a recent change to which hooks were used to lint the files. Before
succeedModule
was used which was only called with the rebuilt modules after a file change, but nowfinishModules
is used which passes every module in the compilation, so all files get linted.