You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.
The structure of my app has recently changed so i'm now requiring files in sibling folders to the initial project. Webpack is respecting this setup with some resolve options, but it seems that the jshint-loader is always looking for .jshintrc in the root of the project it's importing from at the time.
| - A
| |- node_modules
| |- app
| |- .jshintrc
|
| - B
| |- app
|
| - C
| |- app
In this instance as the jshint-loader goes to bundle a dependency in B it'll look for a .jshintrc in the root of B and not resolve back to A's .jshintrc
Ideally I don't want to duplicate the same .jshintrc file across multiple projects.
Any suggestions appreciated!
The text was updated successfully, but these errors were encountered:
This should be possible. The loader uses rcloader, which looks for the closest resource file relative to another file. It also allows for an override option to always return the resource file path for every file. We would need to add plumbing for that, but it should be doable.
In the meantime, can you copy .jshintrc to the parent directory of A as part of a build? rcloader will then walk up the tree of the B and find it at the parent of B.
@oller Thanks for the pointer. I took a quick look, and it looks like csslint has a different API than jshint where you can simply passing configFile. I took another look at jshint's API, and part of the difficulty here is that they tied finding .jshintrc into their CLI. That's probably why rcloader was used.
I was leaning towards calling the option configFile also, so that's nice for consistency.
Hi guys,
Is there a way to pass a path to
.jshintrc
?The structure of my app has recently changed so i'm now requiring files in sibling folders to the initial project. Webpack is respecting this setup with some
resolve
options, but it seems that the jshint-loader is always looking for.jshintrc
in the root of the project it's importing from at the time.In this instance as the
jshint-loader
goes to bundle a dependency inB
it'll look for a.jshintrc
in the root ofB
and not resolve back toA
's.jshintrc
Ideally I don't want to duplicate the same
.jshintrc
file across multiple projects.Any suggestions appreciated!
The text was updated successfully, but these errors were encountered: