Closed KevinGhadyani-minted closed 3 years ago
Hi @KevinGhadyani-minted Try v2.2.0
If the problem persists using a v2.3.0 version, reopen this
Just to be clear, is the fix included in the lintDirtyModulesOnly
prop or is it now part of standard operation?
This now only runs on the import graph generated by webpack. All that lintDirtyModulesOnly
does is skip linting on the initial build. Only files altered that trigger a rebuild will be linted on subsequent runs.
Expected Behavior
This only runs on changed files like
eslint-loader
did.Actual Behavior
This runs on all files in the context and matching the extensions of the files on your drive.
Code
webpack.config.js
eslintrc.js
src1/someFile1.js
src2/someFile2.js
How Do We Reproduce?
someFile2.js
that should normally trigger an ESLint auto-fix (like removing a semi-colon) and save. This won't cause anything to trigger from Webpack because it's not being imported in an entrypoint.someFile1.js
andsomeFile2.js
will be ESLint auto-fixed.This also occurs when starting Webpack as well as on-change. For instance, if I ran this to make a production build, it would still lint all changed files; even ones not included in an entrypoint.
When using the now-deprecated
eslint-loader
, this behavior only worked on files either included in the rule or part of an entrypoint. Sadly,eslint-webpack-plugin
globally re-runs on all modified files when a change comes through on files that are imported from an entrypoint.Either, it should only update files watched by an entrypoint or it should run on-file-change for any valid files in its context. It should not do both.