{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/1537","labels_url":"https://api.github.com/repos/eslint/eslint/issues/1537/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/1537/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/1537/events","html_url":"https://github.com/eslint/eslint/issues/1537","id":50477447,"number":1537,"title":"`no-invalid-regexp` does not allow \"y\"/\"sticky\" flag","user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/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/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/eslint/eslint/labels/es6jsx","name":"es6jsx","color":"006b75"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2014-12-01T00:35:44Z","updated_at":"2015-01-15T00:13:51Z","closed_at":null,"body":"Per https://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky \"y\" is a valid flag in ES6, and `new RegExp('a', 'y')` should not trigger `no-invalid-regexp` when the dev wants to allow that flag.\r\n\r\nTo avoid allowing \"y\" in pre-ES6 environments, perhaps this could be configurable in the rule, eg, a \"flags\" string/array?\r\n\r\n(`eslint v0.10.0`)\r\n\r\n\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Place a bounty on it!](https://www.bountysource.com/issues/6640963-no-invalid-regexp-does-not-allow-y-sticky-flag?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/70018681","html_url":"https://github.com/eslint/eslint/issues/1537#issuecomment-70018681","issue_url":"https://api.github.com/repos/eslint/eslint/issues/1537","id":70018681,"user":{"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},"created_at":"2015-01-15T00:13:51Z","updated_at":"2015-01-15T00:13:51Z","body":"Working on this."}}