Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Commit

Permalink
begin searching for .jshintrc in the same folder the active file is in
Browse files Browse the repository at this point in the history
  • Loading branch information
sharky3112 committed Mar 11, 2014
1 parent 32c6413 commit a1721c0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/atom-jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,14 @@ module.exports = AtomJshint = (function(){
return this.setConfig(packageJson.jshintConfig);
}
}
var workingPath = atom.project.path || '';
var dirs = workingPath.split(path.sep);
var workingPath = '';
var dirs = [''];
if (atom.state.workspace.paneContainer.root.active) {
workingPath = atom.state.workspace.paneContainer.root.activeItemUri || '';
dirs = workingPath.split(path.sep);
// remove active file's name:
dirs.pop();
}
while ( dirs.length >= 1 ) {
var configPath = path.join(dirs.join(path.sep), '/.jshintrc');
if( fs.existsSync(configPath) ){
Expand Down

0 comments on commit a1721c0

Please sign in to comment.