{"action":"closed","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/6669","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/6669/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/6669/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/6669/events","html_url":"https://github.com/eslint/eslint/issues/6669","id":165396821,"number":6669,"title":"chore: combine multiple RegEx replaces with one","user":{"login":"thefourtheye","id":696611,"avatar_url":"https://avatars.githubusercontent.com/u/696611?v=3","gravatar_id":"","url":"https://api.github.com/users/thefourtheye","html_url":"https://github.com/thefourtheye","followers_url":"https://api.github.com/users/thefourtheye/followers","following_url":"https://api.github.com/users/thefourtheye/following{/other_user}","gists_url":"https://api.github.com/users/thefourtheye/gists{/gist_id}","starred_url":"https://api.github.com/users/thefourtheye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefourtheye/subscriptions","organizations_url":"https://api.github.com/users/thefourtheye/orgs","repos_url":"https://api.github.com/users/thefourtheye/repos","events_url":"https://api.github.com/users/thefourtheye/events{/privacy}","received_events_url":"https://api.github.com/users/thefourtheye/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/accepted","name":"accepted","color":"0052cc"},{"url":"https://api.github.com/repos/eslint/eslint/labels/chore","name":"chore","color":"c2e0c6"},{"url":"https://api.github.com/repos/eslint/eslint/labels/core","name":"core","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-13T19:03:03Z","updated_at":"2016-07-15T02:06:02Z","closed_at":"2016-07-15T02:06:02Z","body":"**What version of ESLint are you using?**\r\n\r\nlatest master\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\r\nN/A\r\n\r\n**What did you do? Please include the actual source code causing the issue.**\r\n\r\nN/A\r\n\r\n**What did you expect to happen?**\r\n\r\nN/A\r\n\r\n**What actually happened? Please include the actual, raw output from ESLint.**\r\n\r\nN/A\r\n\r\n---\r\n\r\nI would like to propose a small improvement in the way boolean configuration values are\r\nprocessed. As it is, there are two RegEx based replacements happening to clean up whitespaces\r\naround `:`, and `,`, [here](https://github.com/eslint/eslint/blob/master/lib/eslint.js#L46-L50)\r\n\r\n```js\r\n    // Collapse whitespace around : to make parsing easier\r\n    string = string.replace(/\\s*:\\s*/g, \":\");\r\n\r\n    // Collapse whitespace around ,\r\n    string = string.replace(/\\s*,\\s*/g, \",\");\r\n```\r\n\r\nThat can actually be simplified into a single RegEx based `replace`, like this\r\n\r\n```js\r\n    string = string.replace(/\\s*([:,])\\s*/g, \"$1\");\r\n```"}}
{"actor":{"display_login":"ilyavolodin"}}