Comments (5)
Hi, recently I've been working a lot with this plugin, and I think I have a solution to this issue but I don't know what are your thoughts on this:
change the module retrieving hook:
eslint-webpack-plugin/src/index.js
Line 114 in cef4f74
to:
compilation.hooks.finishModules.tap(ESLINT_PLUGIN, processModules) // function processModules needs to be written
now we retrieve all modules at once, so we can filter them after striping resource query:
function processModules(modules) {
const resources = modules.map((module) => module.resource.split('?')[0]);
const resourcesUnique = new Set(resources);
// TODO: process resourcesUnique
}
now when we are sure that every file if processed only once, we can remove all logic involving resultStorage:
eslint-webpack-plugin/src/linter.js
Line 21 in f819203
eslint-webpack-plugin/src/linter.js
Lines 291 to 297 in f819203
as far as I understand it was created to filter the results:
eslint-webpack-plugin/src/linter.js
Lines 79 to 83 in f819203
from eslint-webpack-plugin.
Don't think we should keep cache for compiler, we have modules
, i.e. we can use module
as key for weak map
from eslint-webpack-plugin.
I'm not sure if I understand your point. My idea is to completely remove everything involving our cache (called resultStorage)
from eslint-webpack-plugin.
@watjurk When you change one file, it will invalidate whole cache, it is not effective
from eslint-webpack-plugin.
This plugin as it is right now (in my understanding) doesn't use resultStorage as cache, every time lint (in src/linter.js) is called every file from files is linted again no matters what crossRunResultStorage says
from eslint-webpack-plugin.
Related Issues (20)
- Error with eslint error detection HOT 1
- in webpack-dev-server, rule `@typescript-eslint/no-unsafe-assignment` throws an error when an imported type changed HOT 5
- Error if package.json is not in parent directory to the linted code HOT 2
- Build error in ci tool. HOT 4
- Lint Errors Kill Webpack Watch HOT 2
- Add support to the new eslint.config.js format HOT 6
- Checking/validating json files HOT 4
- v4.0.0 much slower than v3.2.0, potentially due to linting cached webpack files 🤷 HOT 3
- Performance: 4.0 Hot Module Replacement build very slow HOT 5
- Enable `cache` eslint HOT 4
- Can Nuxt2 use eslint-webpack-plugin? HOT 2
- lintDirtyModulesOnly relies on a populated cache, and lints all files if cache is not present HOT 2
- Angular 15+16 compile gets stuck at "70% sealing finish module graph ESLintWebpackPlugin_1" HOT 5
- detect new file issues HOT 2
- TS files that contain only typings are not linted HOT 1
- Run ESLint only on modified files HOT 1
- Add new option `flatConfigFile` HOT 2
- Update for ESLint 9 HOT 2
- 'extensions' has been removed HOT 3
- Update the eslint version to 9 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-webpack-plugin.