Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async linting/.jshintrc config lookup #48

Merged
merged 3 commits into from
May 9, 2014

Conversation

busykai
Copy link
Contributor

@busykai busykai commented May 9, 2014

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!

busykai added 3 commits May 6, 2014 16:48
For files outside the project root default config is used. For files
inside the project, .jshintrc is looked up as node-cli jshint would.
@cfjedimaster
Copy link
Owner

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

@busykai
Copy link
Contributor Author

busykai commented May 9, 2014

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
Copy link
Owner

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//pull/48#issuecomment-42672918
.

Raymond Camden, Web Developer for Adobe

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

cfjedimaster added a commit that referenced this pull request May 9, 2014
Async linting/.jshintrc config lookup
@cfjedimaster cfjedimaster merged commit 18c2938 into cfjedimaster:master May 9, 2014
@busykai busykai deleted the async-linting branch May 9, 2014 16:15
@busykai
Copy link
Contributor Author

busykai commented May 9, 2014

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
Copy link
Owner

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//pull/48#issuecomment-42684152
.

Raymond Camden, Web Developer for Adobe

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSHint using project .jshintrc file instead of the one in the current folder
2 participants