{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/6175","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/6175/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/6175/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/6175/events","html_url":"https://github.com/eslint/eslint/issues/6175","id":154872636,"number":6175,"title":"Support separate requires in one-var","user":{"login":"andrewvaughan","id":1119590,"avatar_url":"https://avatars.githubusercontent.com/u/1119590?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewvaughan","html_url":"https://github.com/andrewvaughan","followers_url":"https://api.github.com/users/andrewvaughan/followers","following_url":"https://api.github.com/users/andrewvaughan/following{/other_user}","gists_url":"https://api.github.com/users/andrewvaughan/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvaughan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvaughan/subscriptions","organizations_url":"https://api.github.com/users/andrewvaughan/orgs","repos_url":"https://api.github.com/users/andrewvaughan/repos","events_url":"https://api.github.com/users/andrewvaughan/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvaughan/received_events","type":"User","site_admin":false},"labels":[{"id":45711352,"url":"https://api.github.com/repos/eslint/eslint/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":255319420,"url":"https://api.github.com/repos/eslint/eslint/labels/evaluating","name":"evaluating","color":"fef2c0","default":false},{"id":45798639,"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"kaicataldo","id":7041728,"avatar_url":"https://avatars.githubusercontent.com/u/7041728?v=3","gravatar_id":"","url":"https://api.github.com/users/kaicataldo","html_url":"https://github.com/kaicataldo","followers_url":"https://api.github.com/users/kaicataldo/followers","following_url":"https://api.github.com/users/kaicataldo/following{/other_user}","gists_url":"https://api.github.com/users/kaicataldo/gists{/gist_id}","starred_url":"https://api.github.com/users/kaicataldo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaicataldo/subscriptions","organizations_url":"https://api.github.com/users/kaicataldo/orgs","repos_url":"https://api.github.com/users/kaicataldo/repos","events_url":"https://api.github.com/users/kaicataldo/events{/privacy}","received_events_url":"https://api.github.com/users/kaicataldo/received_events","type":"User","site_admin":false},"assignees":[{"login":"kaicataldo","id":7041728,"avatar_url":"https://avatars.githubusercontent.com/u/7041728?v=3","gravatar_id":"","url":"https://api.github.com/users/kaicataldo","html_url":"https://github.com/kaicataldo","followers_url":"https://api.github.com/users/kaicataldo/followers","following_url":"https://api.github.com/users/kaicataldo/following{/other_user}","gists_url":"https://api.github.com/users/kaicataldo/gists{/gist_id}","starred_url":"https://api.github.com/users/kaicataldo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaicataldo/subscriptions","organizations_url":"https://api.github.com/users/kaicataldo/orgs","repos_url":"https://api.github.com/users/kaicataldo/repos","events_url":"https://api.github.com/users/kaicataldo/events{/privacy}","received_events_url":"https://api.github.com/users/kaicataldo/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/eslint/eslint/milestones/15","html_url":"https://github.com/eslint/eslint/milestone/15","labels_url":"https://api.github.com/repos/eslint/eslint/milestones/15/labels","id":1707375,"number":15,"title":"JSCS Compatibility","description":"","creator":{"login":"nzakas","id":38546,"avatar_url":"https://avatars.githubusercontent.com/u/38546?v=3","gravatar_id":"","url":"https://api.github.com/users/nzakas","html_url":"https://github.com/nzakas","followers_url":"https://api.github.com/users/nzakas/followers","following_url":"https://api.github.com/users/nzakas/following{/other_user}","gists_url":"https://api.github.com/users/nzakas/gists{/gist_id}","starred_url":"https://api.github.com/users/nzakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzakas/subscriptions","organizations_url":"https://api.github.com/users/nzakas/orgs","repos_url":"https://api.github.com/users/nzakas/repos","events_url":"https://api.github.com/users/nzakas/events{/privacy}","received_events_url":"https://api.github.com/users/nzakas/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":29,"state":"open","created_at":"2016-04-14T18:09:38Z","updated_at":"2016-11-25T18:23:55Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2016-05-14T19:56:50Z","updated_at":"2016-12-08T10:32:14Z","closed_at":null,"body":"**ESLint Version:** 2.10.1\n## Problem:\n\nA common request (e.g, #3091, #1232) is for the `one-var` rule to properly function in tandem with `no-mixed-requires`.  I agree with this opinion, as the two methods are part of the core set of rules provided with ESLint and should properly support each other.  I also believe there is a way to support this without introducing a dependency between the two rules.\n## Recommended Solution:\n\nI believe this should not be a plugin, as both commands are part of the core library and cause conflict with each other.  A better solution would be to add an optional parameter `separate-requires` to `one-var` that allows for `require` keywords to be separated into a single block, while assignments are in another block (similar to the intent of the two-var plugin).\n\nFor example:\n\n``` js\n\"one-var\": [\"error\", {\n    \"separate-requires\": true,  // (New) Enforces requires to be separate from declarations\n    \"var\": \"never\",\n    \"let\": \"never\",\n    \"const\": \"never\"\n}]\n```\n\nThis will allow ESLint to properly support it's built-in plugins without changing the default functionality of the `one-var` rule.  With the above configuration:\n\n**This code would result in an error:**\n\n``` js\nconst gulp = require('gulp'),\n      myModule = require('./some/module'),\n      myVar1 = 1,\n      myVar2 = 2;\n```\n\n**This code would be valid:**\n\n``` js\nconst gulp = require('gulp'),\n      myModule = require('./some/module');\n\nconst myVar = 1,\n      myVar = 2;\n```\n"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/265707705","html_url":"https://github.com/eslint/eslint/issues/6175#issuecomment-265707705","issue_url":"https://api.github.com/repos/eslint/eslint/issues/6175","id":265707705,"user":{"login":"vitorbal","id":626038,"avatar_url":"https://avatars.githubusercontent.com/u/626038?v=3","gravatar_id":"","url":"https://api.github.com/users/vitorbal","html_url":"https://github.com/vitorbal","followers_url":"https://api.github.com/users/vitorbal/followers","following_url":"https://api.github.com/users/vitorbal/following{/other_user}","gists_url":"https://api.github.com/users/vitorbal/gists{/gist_id}","starred_url":"https://api.github.com/users/vitorbal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitorbal/subscriptions","organizations_url":"https://api.github.com/users/vitorbal/orgs","repos_url":"https://api.github.com/users/vitorbal/repos","events_url":"https://api.github.com/users/vitorbal/events{/privacy}","received_events_url":"https://api.github.com/users/vitorbal/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T10:32:14Z","updated_at":"2016-12-08T10:32:14Z","body":"👍  on this `require` behavior instead of just plain ignoring."}}
{"actor":{"display_login":"vitorbal"}}