-
-
Notifications
You must be signed in to change notification settings - Fork 121
Does not respect .eslintrc files in directory tree #21
Comments
Using this might help: /~https://github.com/eslint/eslint/blob/v0.17.0/lib/config.js#L332 |
The problem is that webpack loaders do not give the filename but only send the input to process. In order to fix that we need first the filename in the loader (poke @sokra) so we can pass to eslint in order to get proper eslintrc file. |
You have access to the filename in the loader function via |
Oh good to know. Thanks @sokra. |
When you do this can you also respect the |
Yes please, a separate issue. Or a separate PR ;) |
@mtscout6 I investigated on this issue. For now this cannot be done properly since method that use text for processing doesn't accept filepath or something that will allow us to adjust the config (
I hope I am clear on this. poke @nzakas |
Experienced the same issue today, thanks for investigating. |
@MoOx please file an issue if you have a request |
+1 seems that |
It depends on your setup. I sucessfuly use .eslintrc on a lot of project using this loader. |
Closed by 1bf9bf9 |
This is awesome! Thanks @MoOx !! |
Do not thank me. Thanks @mgtitimoli |
I have a large app that will be transitioning to es6 over the next few months. Which means I need a different
.eslintrc
configuration for the new es6 javascript and the old es5 scripts. I also have a test directory which has a different configuration. Using eslint from the command line the proper configurations are derived according to the directory structure.Here is a mockup directory structure:
What seems to be happening is that the
.eslintrc
file at the root of my repo is the only one getting picked up. Thoughts?The text was updated successfully, but these errors were encountered: