{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/3488","labels_url":"https://api.github.com/repos/eslint/eslint/issues/3488/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/3488/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/3488/events","html_url":"https://github.com/eslint/eslint/issues/3488","id":102522896,"number":3488,"title":"How to define id-match exception?","user":{"login":"gajus","id":973543,"avatar_url":"https://avatars.githubusercontent.com/u/973543?v=3","gravatar_id":"","url":"https://api.github.com/users/gajus","html_url":"https://github.com/gajus","followers_url":"https://api.github.com/users/gajus/followers","following_url":"https://api.github.com/users/gajus/following{/other_user}","gists_url":"https://api.github.com/users/gajus/gists{/gist_id}","starred_url":"https://api.github.com/users/gajus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gajus/subscriptions","organizations_url":"https://api.github.com/users/gajus/orgs","repos_url":"https://api.github.com/users/gajus/repos","events_url":"https://api.github.com/users/gajus/events{/privacy}","received_events_url":"https://api.github.com/users/gajus/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/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":35,"created_at":"2015-08-22T10:02:27Z","updated_at":"2015-10-30T20:34:03Z","closed_at":null,"body":"I am using the following pattern to enforce variable naming convention:\r\n\r\n```\r\n(^[A-Za-z]+(?:[A-Z][a-z]*)*\\d*$)|(^[A-Z]+(_[A-Z]+)*(_\\d$)*$)|(^(_|\\$)$)\r\n```\r\n\r\nBut it breaks in uncontrolled environment, e.g. testing frameworks. How to write a project-wide and file-wide list of exceptions to id-match?\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26065929-how-to-define-id-match-exception?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/152644916","html_url":"https://github.com/eslint/eslint/issues/3488#issuecomment-152644916","issue_url":"https://api.github.com/repos/eslint/eslint/issues/3488","id":152644916,"user":{"login":"platinumazure","id":284282,"avatar_url":"https://avatars.githubusercontent.com/u/284282?v=3","gravatar_id":"","url":"https://api.github.com/users/platinumazure","html_url":"https://github.com/platinumazure","followers_url":"https://api.github.com/users/platinumazure/followers","following_url":"https://api.github.com/users/platinumazure/following{/other_user}","gists_url":"https://api.github.com/users/platinumazure/gists{/gist_id}","starred_url":"https://api.github.com/users/platinumazure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platinumazure/subscriptions","organizations_url":"https://api.github.com/users/platinumazure/orgs","repos_url":"https://api.github.com/users/platinumazure/repos","events_url":"https://api.github.com/users/platinumazure/events{/privacy}","received_events_url":"https://api.github.com/users/platinumazure/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T20:34:02Z","updated_at":"2015-10-30T20:34:02Z","body":"I did originally, but when you pointed out other globals filter in, I figured it would add no harm for a hypothetical `allowGlobals` parameter in `id-match` to just allow all of those globals.\r\n\r\nSo, to return to my original proposal to solve the original issue: How about adding an `allowGlobals: true` option to `id-match`, which would just ignore anything listed as a global in configuration, whether specified in .eslintrc or from environments. Then @gajus's problem is solved by adding framework globals to .eslintrc and specifying this option to `id-match`.\r\n\r\nHow does that sound?"}}