cfjedimaster / brackets-jshint

Adds JSHint support to Brackets
MIT License
130 stars 41 forks source link

Async linting/.jshintrc config lookup #48

Closed busykai closed 10 years ago

busykai commented 10 years ago

Fixes #47.

@cfjedimaster, this PR passes JSHint extension to use async-linting and implements .jshintrc lookup (only within project root). Please take a look and test, I will continue my testing as well. Thanks!

cfjedimaster commented 10 years ago

Can you describe the .jshintrc look up changes a bit more?

busykai commented 10 years ago

The main change is that there were no lookup before. It used to be that it could be located in the project root only. Now it could be located anywhere in the project root. It is especially useful if your project contains submodules. This is what JHint docs (see Configuration section) has to say:

In case of .jshintrc, JSHint will start looking for this file in the same directory as the file that's being linted. If not found, it will move one level up the directory tree all the way up to the filesystem root. (Note that if the input comes from stdin, JSHint doesn't attempt to find a configuration file)

This setup allows you to have different configuration files per project. Place your file into the project root directory and, as long as you run JSHint from anywhere within your project directory tree, the same configuration file will be used.

Is this what you're looking for? As far as I know jshint (it's node-cli version) wouldn't stop at project root (because it does not have project, really). This version will not go any further (upper) than the project root.

cfjedimaster commented 10 years ago

That sounds perfect - I just wanted to be sure I understood the change well. :) Publishing this asap.

On Fri, May 9, 2014 at 9:37 AM, busykai notifications@github.com wrote:

The main change is that there were no lookup before. It used to be that it could be located in the project root only. Now it could be located anywhere in the project root. It is especially useful if your project contains submodules. This is what JHint docs (see Configuration section)http://www.jshint.com/docs/has to say:

In case of .jshintrc, JSHint will start looking for this file in the same directory as the file that's being linted. If not found, it will move one level up the directory tree all the way up to the filesystem root. (Note that if the input comes from stdin, JSHint doesn't attempt to find a configuration file)

This setup allows you to have different configuration files per project. Place your file into the project root directory and, as long as you run JSHint from anywhere within your project directory tree, the same configuration file will be used.

Is this what you're looking for? As far as I know jshint (it's node-cli version) wouldn't stop at project root (because it does not have project, really). This version will not go any further (upper) than the project root.

— Reply to this email directly or view it on GitHubhttps://github.com/cfjedimaster/brackets-jshint/pull/48#issuecomment-42672918 .

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

busykai commented 10 years ago

Thanks! :) If there will be issue reports, please let me know. I am watching this repo anyways, but just in case I miss something.

cfjedimaster commented 10 years ago

Thank you - you have taken my simple extension and added about 99% of all the cool stuff recently. It is MUCH appreciated.

On Fri, May 9, 2014 at 11:15 AM, busykai notifications@github.com wrote:

Thanks! :) If there will be issue reports, please let me know. I am watching this repo anyways, but just in case I miss something.

— Reply to this email directly or view it on GitHubhttps://github.com/cfjedimaster/brackets-jshint/pull/48#issuecomment-42684152 .

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden