-
Notifications
You must be signed in to change notification settings - Fork 671
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
CLI not locating .hintrc in user's home directory #1142
Comments
@jgarber623 that's the current expected behavior. Our way of thinking is that if you are inside a project folder (aka something with a package.json) then sonarwhal should be installed/search things locally. In general we would like users to install it locally instead of globally. That said, there are a couple things we could do to improve the experience:
@sonarwhal/core thoughts? |
Works for me. If, for example, you run
|
We've moved away from recommending installing webhint globally in 9f13687 because of issues like this one. Going to close this as the scenario is not supported. |
Hello!
There appears to be a small issue when running the
sonarwhal
CLI under the following conditions:sonarwhal
is installed globally (consistent with the official documentation),.sonarwhalrc
configuration file in the user's home directory (~/.sonarwhalrc
),sonarwhal [url]
in a folder other than the user's home directory, andpackage.json
,node_modules/
, etc.I would expect that, regardless of the presence or absence of
package.json
,node_modules/
, etc. in the current working directory that runningsonarwhal [url]
would first look in the current working directory for a configuration file then look in the user's home directory for the configuration file.Note that running
sonarwhal [url]
in an arbitrary directory withoutpackage.json
,node_modules/
, etc. functions as expected, correctly locating and using the~/.sonarwhalrc
configuration file.This issue is related to PR #718.
Environment
sonarwhal
version: 1.11.2Node.js
version: 10.4.1npm
version: 6.1.0sonarwhal
configurationsonarwhal’s configuration
URL for which
sonarwhal
failedOutput
Please include the raw output generated by
sonarwhal
, or if possible,the raw output from running
sonarwhal
in debug mode:sonarwhal --debug <URL>
.sonarwhal’s raw output
The text was updated successfully, but these errors were encountered: