Comments (14)
@MoOx I would like to work on this. Could you please help me figure out the approach?
from eslint-loader.
Use nodemon
for this.
Ex: nodemon --watch .eslintrc.js --exec webpack
from eslint-loader.
I'd like to see that too.
from eslint-loader.
PR are always welcome
from eslint-loader.
Have also run into an issue where I need similar functionality to accommodate https://github.com/apollographql/eslint-plugin-graphql. In my case I need to force eslint-loader to reload .eslintrc on every build. I see #151 and am wondering which of the cases described in this issue are satisfied by it. If my case is not covered I'll gladly contribute to that PR or another
from eslint-loader.
#151 still requires webpack to be restarted when changes are made to the rules so doesn't address this issue.
It also needs to be considered that there could be multiple .eslintrc files located anywhere in the project (see #123 and configFile
option) and rules could also be applied directly to the eslint-loader options.
from eslint-loader.
I guess you should somehow watch for the file being used, and reload it in memory. Nothing is made to support this so you will need to handle this from scratch I guess.
from eslint-loader.
With eslint, there may not be just one eslint config file right? Would also need to invalidate cache when the config is modified.
from eslint-loader.
I guess so. Not an easy problem to solve and might open up to lots of bugs. Not sure if that's a good idea. If you work on your config, you should probably more play with eslint cli & files directly.
from eslint-loader.
This is what I have so far.
- Get the eslint config files using
globby
and the pattern["**/.eslintrc.*", "package.json", "!node_modules/**/*"]
. - Hash these files using
hash-files
and use it as part of thecacheIdentifier
. However, this module is a little broken as the glob file resolution does not work correctly(hence the need forglobby
). Maybe I could usehasha
instead.
However, this isn't enough as the eslint.CLIEngine
seems to cache the config as well. How do you suggest I handle this?
from eslint-loader.
@MoOx Could you please help me out a little?
from eslint-loader.
Worth considering is that ESLint can also be configured via package.json
. See Using Configuration Files.
from eslint-loader.
@sudo-suhas sorry I don't know where to start with this. The codebase is pretty small so you should try to understand it, check automated tests and see how you can tackle the problem. Feel free to ask questions if you need some detailed informations about a specific problem/ piece of code.
from eslint-loader.
@ricardogobbosouza that's not ideal - you lose all the benefits you get from running Webpack in watch mode
from eslint-loader.
Related Issues (20)
- Loader reporting syntax errors when dealing with typescript files HOT 10
- TypeError: CLIEngine is not a constructor HOT 1
- Different lint results between webpack and cli HOT 1
- How to now fail the build on error or warning HOT 2
- Combining eslint-loader + vue + typescript causes the build to fail on the first run, but work on the second run HOT 2
- please update minimist due to prototype pollution (CVE-2020-7598) HOT 8
- Cannot read property 'range' of null HOT 3
- vscode integration
- exclude option not working. HOT 12
- Eslint-loader is not using .eslintrc.js configuration HOT 1
- failOnError option doesn't work with ts-loader and webpack-dev-server HOT 8
- CLIEngine has been deprecated HOT 1
- eslint-plugin-import fails to load properties with eslint-loader but works with stand alone eslint HOT 1
- Parsing error: Unexpected token .. HOT 1
- Cannot read property 'getFormatter' of undefined HOT 2
- Missing plugin referenced by .eslintrc file in ignored node_modules folder causes warning HOT 4
- Plugin "import" was conflicted HOT 2
- eslint-laoder failing the build even if the failOnError set to false HOT 2
- relative path is wrong when use eslint-loader in monorepo HOT 1
- Deprecate eslint-loader HOT 4
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-loader.