-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
ESLintPlugin not working consistently with cache.type = 'filesystem' #130
Comments
@ricardogobbosouza we should save our warnins/errors in cache and restore it for cached files/modules |
Is there any progress with this issue? |
@alexander-akait |
oh, don't see, let's open an issue in webpack docs site, anyway it is easy, here simple example https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/src/index.js#L334 asset - > |
In your case you need store module (resourcePath maybe?) and associated errors/warnings |
Thanks, i will analyze |
Any update on this or ideas for a workaround? This is blocking us from moving to Webpack v5 and we aren't able to come up with a way around it. Edit: Came up with a gross workaround - if you force ESLintPlugin to run for all files (ignoring the webpack cache) and enable its built in caching, you can get similar build speed without losing the initial lints:
Sadly this setup really chugs if you enable threads and relies so much on ESLintPlugin's internals that it could easily be broken by an update, but it seems to be working well enough for now. |
Hi @kowsen |
Any progress on this one? |
Has the problem been solved |
If webpack is setup with cache type `filesystem`, the `succeedModule` hook is not called for cached modules and no linting is run for them. Tap the `stillValidModule` hook to lint cached modules. Fixes webpack-contrib#130
Any chage! |
If webpack is setup with cache type `filesystem`, the `succeedModule` hook is not called for cached modules and no linting is run for them. Tap the `stillValidModule` hook to lint cached modules. Fixes #130 Co-authored-by: Alexander Akait <[email protected]> Co-authored-by: Ricardo Gobbo de Souza <[email protected]>
Bug report
Actual Behavior
With webpack cache turned on and set to 'filesystem' ESLintPlugin reports errors only after first build. If files are unchanged and build is started again ESLintPlugin will not report any errors/warnings.
Expected Behavior
ESLintPlugin should always report same errors/warnings for same input files consistently regardless of the webpack cache.
How Do We Reproduce?
Minimal repo: https://github.com/durad/webpack-eslint-caching-issue
Clone, run
yarn install
and then runyarn build
twice. Warning will be shown only the first time.Please paste the results of
npx webpack-cli info
here, and mention other relevant informationSame happens with both development and production mode.
The text was updated successfully, but these errors were encountered: