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

Issues with eslint usage #3

Closed
gauntface opened this issue Dec 4, 2015 · 3 comments
Closed

Issues with eslint usage #3

gauntface opened this issue Dec 4, 2015 · 3 comments

Comments

@gauntface
Copy link

I've pretty much always had trouble with extending eslint configs so this could easily just be me.

When attempting to use this config (either in eslintrc or in package.json I was getting this error:

$ eslint ./src 1 ↵
/home/matt/.npm-packages/lib/node_modules/eslint/lib/config/config-file.js:332
throw e;
^

Error: Cannot read config package: eslint-config-google
Error: Cannot find module 'eslint-config-google'
Referenced from: /home/matt/Projects/Code/sw-precache/app-shell-demo/package.json
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at loadPackage (/home/matt/.npm-packages/lib/node_modules/eslint/lib/config/config-file.js:168:16)
at loadConfigFile (/home/matt/.npm-packages/lib/node_modules/eslint/lib/config/config-file.js:212:18)
at load (/home/matt/.npm-packages/lib/node_modules/eslint/lib/config/config-file.js:385:18)
at /home/matt/.npm-packages/lib/node_modules/eslint/lib/config/config-file.js:326:36
at Array.reduceRight (native)
at applyExtends (/home/matt/.npm-packages/lib/node_modules/eslint/lib/config/config-file.js:309:28)

When I use the gulp task that uses eslint there is no issue. Could it be a problem with attempting to use global eslint?

cc @addyosmani @sindresorhus

@sindresorhus
Copy link
Contributor

I think you need to install it globally if you use the global ESLint.

@gauntface
Copy link
Author

That would make sense.

@addyosmani worth adding something to the README or just close?

@sindresorhus
Copy link
Contributor

For reference: eslint/eslint#4822 (comment)

I don't think every shareable config should have to document this. It's just how ESLint works and is better documented there. Open an issue on ESLint if you think it could be clearer in its docs.

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

No branches or pull requests

2 participants