{"action":"created","issue":{"url":"https://api.github.com/repos/jshint/jshint/issues/2257","labels_url":"https://api.github.com/repos/jshint/jshint/issues/2257/labels{/name}","comments_url":"https://api.github.com/repos/jshint/jshint/issues/2257/comments","events_url":"https://api.github.com/repos/jshint/jshint/issues/2257/events","html_url":"https://github.com/jshint/jshint/issues/2257","id":61227675,"number":2257,"title":"singleGroups option detects IIFE as invalid grouping in some cases.","user":{"login":"Nedlinin","id":298264,"avatar_url":"https://avatars.githubusercontent.com/u/298264?v=3","gravatar_id":"","url":"https://api.github.com/users/Nedlinin","html_url":"https://github.com/Nedlinin","followers_url":"https://api.github.com/users/Nedlinin/followers","following_url":"https://api.github.com/users/Nedlinin/following{/other_user}","gists_url":"https://api.github.com/users/Nedlinin/gists{/gist_id}","starred_url":"https://api.github.com/users/Nedlinin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nedlinin/subscriptions","organizations_url":"https://api.github.com/users/Nedlinin/orgs","repos_url":"https://api.github.com/users/Nedlinin/repos","events_url":"https://api.github.com/users/Nedlinin/events{/privacy}","received_events_url":"https://api.github.com/users/Nedlinin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jshint/jshint/labels/P2","name":"P2","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"jugglinmike","id":677252,"avatar_url":"https://avatars.githubusercontent.com/u/677252?v=3","gravatar_id":"","url":"https://api.github.com/users/jugglinmike","html_url":"https://github.com/jugglinmike","followers_url":"https://api.github.com/users/jugglinmike/followers","following_url":"https://api.github.com/users/jugglinmike/following{/other_user}","gists_url":"https://api.github.com/users/jugglinmike/gists{/gist_id}","starred_url":"https://api.github.com/users/jugglinmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jugglinmike/subscriptions","organizations_url":"https://api.github.com/users/jugglinmike/orgs","repos_url":"https://api.github.com/users/jugglinmike/repos","events_url":"https://api.github.com/users/jugglinmike/events{/privacy}","received_events_url":"https://api.github.com/users/jugglinmike/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-03-13T20:37:01Z","updated_at":"2015-04-28T16:44:37Z","closed_at":null,"body":"The use case I've got:\r\n\r\nIn jshintrc I have this as a declaration\r\n\r\n        \"singleGroups\"  : true,     // true: Prohibits unnecessary grouping operators\r\n        \"esnext\"        : true,\r\n\r\nIn one of my files I have the following IIFE (stripped way down for simplicities sake):\r\n\r\n\t\tconst dropDownData = ((type) => {\r\n\t\t\tconsole.log(type); // Demo purpose.  Don't let JShint complain about unused variable.\r\n\t\t\treturn [\r\n\t\t\t\t{ text: \"Meter1\", value: \"1\" },\r\n\t\t\t\t{ text: \"Meter2\", value: \"2\" },\r\n\t\t\t\t{ text: \"Meter3\", value: \"3\" }\r\n\t\t\t];\r\n\t\t})(options.type);\r\n\r\n\r\nIt runs fine if I skip past JSHint and go ahead and build.  However, JSHint reports the following:\r\n\r\n    [15:32:53] Starting 'lint'...\r\n\r\n    c:\\Users\\cheath\\Documents\\dashboard\\widgets\\metering\\pulseMeter\\pulseMeter.js\r\n      line 212  col 38  Unnecessary grouping operator.\r\n\r\n      ‼  1 warning\r\n\r\n    [15:32:54] 'lint' errored after 872 ms\r\n\r\n\r\nI'm not sure if this problem is specific to esnext property being set to true or not.  However, changing the IIFE from a fat arrow function to a simple function declaration does *not* fix the issue."},"comment":{"url":"https://api.github.com/repos/jshint/jshint/issues/comments/97132546","html_url":"https://github.com/jshint/jshint/issues/2257#issuecomment-97132546","issue_url":"https://api.github.com/repos/jshint/jshint/issues/2257","id":97132546,"user":{"login":"jugglinmike","id":677252,"avatar_url":"https://avatars.githubusercontent.com/u/677252?v=3","gravatar_id":"","url":"https://api.github.com/users/jugglinmike","html_url":"https://github.com/jugglinmike","followers_url":"https://api.github.com/users/jugglinmike/followers","following_url":"https://api.github.com/users/jugglinmike/following{/other_user}","gists_url":"https://api.github.com/users/jugglinmike/gists{/gist_id}","starred_url":"https://api.github.com/users/jugglinmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jugglinmike/subscriptions","organizations_url":"https://api.github.com/users/jugglinmike/orgs","repos_url":"https://api.github.com/users/jugglinmike/repos","events_url":"https://api.github.com/users/jugglinmike/events{/privacy}","received_events_url":"https://api.github.com/users/jugglinmike/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T16:44:37Z","updated_at":"2015-04-28T16:44:37Z","body":"@sudaraka The behavior you have reported is expected. The grouping operator in that code is unnecessary, so you may remove it without effecting your program's functionality."}}