{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/6123","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/6123/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/6123/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/6123/events","html_url":"https://github.com/eslint/eslint/issues/6123","id":153882234,"number":6123,"title":"Global ESLint does not resolve local dependencies of a module defined in extends","user":{"login":"gajus","id":973543,"avatar_url":"https://avatars.githubusercontent.com/u/973543?v=3","gravatar_id":"","url":"https://api.github.com/users/gajus","html_url":"https://github.com/gajus","followers_url":"https://api.github.com/users/gajus/followers","following_url":"https://api.github.com/users/gajus/following{/other_user}","gists_url":"https://api.github.com/users/gajus/gists{/gist_id}","starred_url":"https://api.github.com/users/gajus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gajus/subscriptions","organizations_url":"https://api.github.com/users/gajus/orgs","repos_url":"https://api.github.com/users/gajus/repos","events_url":"https://api.github.com/users/gajus/events{/privacy}","received_events_url":"https://api.github.com/users/gajus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/triage","name":"triage","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-09T22:14:13Z","updated_at":"2016-05-09T22:17:54Z","closed_at":null,"body":"**What version of ESLint are you using?**\r\n\r\nv2.9.0\r\n\r\n**What parser (default, Babel-ESLint, etc.) are you using?**\r\n\r\nN/A\r\n\r\n**Please show your full configuration:**\r\n**What did you do? Please include the actual source code causing the issue.**\r\n**What did you expect to happen?**\r\n**What actually happened? Please include the actual, raw output from ESLint.**\r\n\r\n#### Using module path with local install\r\n```sh\r\nnpm install eslint\r\nnpm install eslint-config-canonical\r\necho '{ \"extends\": \"./node_modules/eslint-config-canonical/eslintrc.json\" }' > .eslintrc\r\nnode ./node_modules/.bin/eslint ./src\r\n```\r\n\r\nWorks as expected (produces linting report for files contained in `./src`).\r\n\r\n#### Using module name with local install\r\n\r\n```sh\r\nnpm install eslint\r\nnpm install eslint-config-canonical\r\necho '{ \"extends\": \"eslint-config-canonical\" }' > .eslintrc\r\nnode ./node_modules/.bin/eslint ./src\r\n```\r\n\r\nWorks as expected (produces linting report for files contained in `./src`).\r\n\r\n#### Using module path with global install\r\n\r\n```sh\r\nnpm install eslint\r\nnpm install eslint-config-canonical\r\necho '{ \"extends\": \"eslint-config-canonical\" }' > .eslintrc\r\n/Users/gajus/.nvm/versions/node/v6.1.0/bin/eslint ./src\r\n```\r\n\r\nCannot find dependency of `eslint-config-canonical`:\r\n\r\n```\r\nOops! Something went wrong! :(\r\n\r\nESLint couldn't find the plugin \"eslint-plugin-no-use-extend-native\". This can happen for a couple different reasons:\r\n\r\n1. If ESLint is installed globally, then make sure eslint-plugin-no-use-extend-native is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.\r\n\r\n2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:\r\n\r\n    npm i eslint-plugin-no-use-extend-native@latest --save-dev\r\n\r\nIf you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.\r\n```\r\n\r\nExpected result:\r\n\r\nLint code using `eslint-config-canonical` and its dependencies.\r\n\r\n#### Using module name with global install\r\n\r\n```sh\r\nnpm install eslint\r\nnpm install eslint-config-canonical\r\necho '{ \"extends\": \"eslint-config-canonical\" }' > .eslintrc\r\n/Users/gajus/.nvm/versions/node/v6.1.0/bin/eslint ./src\r\n```\r\n\r\nComplain that module \"eslint-config-canonical\" is not found:\r\n\r\n```\r\nCannot find module 'eslint-config-canonical'\r\nReferenced from: /Users/gajus/Documents/dev/applaudience/forward-proxy/.eslintrc\r\nError: Cannot find module 'eslint-config-canonical'\r\nReferenced from: /Users/gajus/Documents/dev/applaudience/forward-proxy/.eslintrc\r\n    at Object.ModuleResolver.resolve (/Users/gajus/.nvm/versions/node/v6.1.0/lib/node_modules/eslint/lib/util/module-resolver.js:75:19)\r\n    at resolve (/Users/gajus/.nvm/versions/node/v6.1.0/lib/node_modules/eslint/lib/config/config-file.js:473:33)\r\n    at load (/Users/gajus/.nvm/versions/node/v6.1.0/lib/node_modules/eslint/lib/config/config-file.js:490:24)\r\n    at /Users/gajus/.nvm/versions/node/v6.1.0/lib/node_modules/eslint/lib/config/config-file.js:386:36\r\n    at Array.reduceRight (native)\r\n    at applyExtends (/Users/gajus/.nvm/versions/node/v6.1.0/lib/node_modules/eslint/lib/config/config-file.js:363:28)\r\n    at Object.load (/Users/gajus/.nvm/versions/node/v6.1.0/lib/node_modules/eslint/lib/config/config-file.js:525:22)\r\n    at loadConfig (/Users/gajus/.nvm/versions/node/v6.1.0/lib/node_modules/eslint/lib/config.js:64:33)\r\n    at getLocalConfig (/Users/gajus/.nvm/versio%\r\n```\r\n\r\nExpected result:\r\n\r\nLint code using `eslint-config-canonical` and its dependencies."},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/218006804","html_url":"https://github.com/eslint/eslint/issues/6123#issuecomment-218006804","issue_url":"https://api.github.com/repos/eslint/eslint/issues/6123","id":218006804,"user":{"login":"gajus","id":973543,"avatar_url":"https://avatars.githubusercontent.com/u/973543?v=3","gravatar_id":"","url":"https://api.github.com/users/gajus","html_url":"https://github.com/gajus","followers_url":"https://api.github.com/users/gajus/followers","following_url":"https://api.github.com/users/gajus/following{/other_user}","gists_url":"https://api.github.com/users/gajus/gists{/gist_id}","starred_url":"https://api.github.com/users/gajus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gajus/subscriptions","organizations_url":"https://api.github.com/users/gajus/orgs","repos_url":"https://api.github.com/users/gajus/repos","events_url":"https://api.github.com/users/gajus/events{/privacy}","received_events_url":"https://api.github.com/users/gajus/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T22:17:54Z","updated_at":"2016-05-09T22:17:54Z","body":"A possible workaround would be to make global ESLint detect local install and use that to lint the files, i.e. if you run `eslint ./my-project/src/` and there is `./my-project/node_modules/.bin/eslint`, then global ESLint can dedicate linting to the local ESLint program."}}