-
Notifications
You must be signed in to change notification settings - Fork 15
Ignoring nested .jshint files #30
Comments
If i'm honest the implementation for finding the correct config file to use and how it uses it isn't quite right at the moment. Will get around to sorting this out though if nobody puts in a pull request :) |
Is it supposed to be |
It is supposed to be .jshintrc files— On Fri, May 9, 2014 at 7:45 AM, Adam Tuttle notifications@github.com
|
@Joezo I see how config is searched for and loaded here I wouldn't mind taking a stab at trying to improve it. Did you have anything specific in mind? |
Ideally when a file is saved (or being edited) a search would start from the directory of the file open and continue up the tree until a |
But this loading and searching for configuration would need to occur each time the active file is changed or saved, not just when atom opens. |
I'm not sure the search for config would need to happen each time a file is saved, just when is it opened would suffice? We could keep a hash of what config file is relevant to each open file so that we don't even need to search every time we switch file. Obviously we would need to if a new file was opened. The only concern there is if a file is moved, or a new config file is placed in the folder after the we've already searched. I'm really open to suggestions though and as long as the code works and doesn't slow things down i'd be happy to accept PRs. Please do have a go! |
Keeping the hash is a good call. If the hash has a full file path to a config to use then when a file is moved it would be invalidated and a new config would need to be found for it. And when a new .jshintrc is created somewhere in he project the cache could just be invalidated so that searches could take this into account. |
Sounds like a good plan to me 👍 |
Just found this: https://github.com/tkellen/node-liftoff -- maybe it would be useful here? |
This is now resolved and will be usable in the next release |
I have a .jshint file in my root, and also one in the root of my test folder. The files inside the test folder should respect the .jshint inside the test folder, but instead it looks like its going for the one another level up on the project root. The default behavior should be to use the first .jshint file it encounters. If this is what current behavior is believed to be, then I believe there is a bug
The text was updated successfully, but these errors were encountered: