{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/3458","labels_url":"https://api.github.com/repos/eslint/eslint/issues/3458/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/3458/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/3458/events","html_url":"https://github.com/eslint/eslint/issues/3458","id":102077087,"number":3458,"title":"Support having plugins as dependencies in shareable config","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/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":4,"created_at":"2015-08-20T07:09:22Z","updated_at":"2015-08-20T07:40:55Z","closed_at":null,"body":"My shareable config uses rules from an external plugin and I would like to make it a `dependency` so the user doesn't have to manually install the plugin manually. I couldn't find any docs on this, but it doesn't seem to work, so I'll assume it's not currently supported.\r\n\r\n```js\r\nmodule.js:338\r\n    throw err;\r\n          ^\r\nError: Cannot find module 'eslint-plugin-no-use-extend-native'\r\n    at Function.Module._resolveFilename (module.js:336:15)\r\n    at Function.Module._load (module.js:278:25)\r\n    at Module.require (module.js:365:17)\r\n    at require (module.js:384:17)\r\n    at /usr/local/lib/node_modules/eslint/lib/cli-engine.js:106:26\r\n    at Array.forEach (native)\r\n    at loadPlugins (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:97:21)\r\n    at processText (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:182:5)\r\n    at processFile (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:224:12)\r\n    at /usr/local/lib/node_modules/eslint/lib/cli-engine.js:391:26\r\n```\r\n\r\nI assume it's because you only try to load the plugin when the config is finished merging.\r\n\r\nOther shareable configs that depend on a plugin [instructs the users](https://github.com/feross/eslint-config-standard#usage) to manually install the plugin too and they [have it in `peerDependencies`](https://github.com/feross/eslint-config-standard/blob/00fabb06f7622e8762d3a657a7c364993b22d0dd/package.json#L15). I find this sub-optimal though and I don't want the users to have to care what plugins my config uses internally.\r\n\r\nThe whole point of shareable configs is to minimize boilerplate and overhead, so this would be a welcome improvement."},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/132921218","html_url":"https://github.com/eslint/eslint/issues/3458#issuecomment-132921218","issue_url":"https://api.github.com/repos/eslint/eslint/issues/3458","id":132921218,"user":{"login":"lo1tuma","id":169170,"avatar_url":"https://avatars.githubusercontent.com/u/169170?v=3","gravatar_id":"","url":"https://api.github.com/users/lo1tuma","html_url":"https://github.com/lo1tuma","followers_url":"https://api.github.com/users/lo1tuma/followers","following_url":"https://api.github.com/users/lo1tuma/following{/other_user}","gists_url":"https://api.github.com/users/lo1tuma/gists{/gist_id}","starred_url":"https://api.github.com/users/lo1tuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lo1tuma/subscriptions","organizations_url":"https://api.github.com/users/lo1tuma/orgs","repos_url":"https://api.github.com/users/lo1tuma/repos","events_url":"https://api.github.com/users/lo1tuma/events{/privacy}","received_events_url":"https://api.github.com/users/lo1tuma/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T07:40:55Z","updated_at":"2015-08-20T07:40:55Z","body":"> A shareable config is a node module and should act like it.\r\n\r\nWe use `require` to load shareable configs or plugins, what would make it act more like a node module than that? \r\n\r\nThis issue should be also solved when using npm version 3 which installs all subdependencies in the top-level `node_modules` folder. "}}