{"action":"created","issue":{"url":"https://api.github.com/repos/gajus/react-css-modules/issues/132","repository_url":"https://api.github.com/repos/gajus/react-css-modules","labels_url":"https://api.github.com/repos/gajus/react-css-modules/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/gajus/react-css-modules/issues/132/comments","events_url":"https://api.github.com/repos/gajus/react-css-modules/issues/132/events","html_url":"https://github.com/gajus/react-css-modules/pull/132","id":157139884,"number":132,"title":"Allow default options to be overridden globally","user":{"login":"ekosz","id":212829,"avatar_url":"https://avatars.githubusercontent.com/u/212829?v=3","gravatar_id":"","url":"https://api.github.com/users/ekosz","html_url":"https://github.com/ekosz","followers_url":"https://api.github.com/users/ekosz/followers","following_url":"https://api.github.com/users/ekosz/following{/other_user}","gists_url":"https://api.github.com/users/ekosz/gists{/gist_id}","starred_url":"https://api.github.com/users/ekosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekosz/subscriptions","organizations_url":"https://api.github.com/users/ekosz/orgs","repos_url":"https://api.github.com/users/ekosz/repos","events_url":"https://api.github.com/users/ekosz/events{/privacy}","received_events_url":"https://api.github.com/users/ekosz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-05-27T06:38:21Z","updated_at":"2016-07-04T13:12:45Z","closed_at":"2016-07-04T12:43:42Z","pull_request":{"url":"https://api.github.com/repos/gajus/react-css-modules/pulls/132","html_url":"https://github.com/gajus/react-css-modules/pull/132","diff_url":"https://github.com/gajus/react-css-modules/pull/132.diff","patch_url":"https://github.com/gajus/react-css-modules/pull/132.patch"},"body":"Expose a new variable call `globalOptions` that, when modified, changes the default options for all `react-css-modules` Components.\r\n\r\n**Example code**:\r\n\r\n```js\r\nimport CSSModules from 'react-css-modules';\r\n// Only raise errors in non-production enviroments\r\nCSSModules.globalOptions.errorWhenNotFound = process.env.NODE_ENV !== 'production';\r\n// Allow multiple styleNames for every Component\r\nCSSModules.globalOptions.allowMultiple = true;\r\n```\r\n\r\n**Why?**:\r\n\r\nI few times now I've been cleaning up CSS files, deleted a class I thought wasn't being used anymore, deployed to production, and suddenly get a ton a errors from users that the react app stops working. This is my own fault for not having better tests around my components, but it would still be nice to be able to turn off and on these options globally based on the environment as shown.\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/gajus/react-css-modules/issues/comments/230287537","html_url":"https://github.com/gajus/react-css-modules/pull/132#issuecomment-230287537","issue_url":"https://api.github.com/repos/gajus/react-css-modules/issues/132","id":230287537,"user":{"login":"ekosz","id":212829,"avatar_url":"https://avatars.githubusercontent.com/u/212829?v=3","gravatar_id":"","url":"https://api.github.com/users/ekosz","html_url":"https://github.com/ekosz","followers_url":"https://api.github.com/users/ekosz/followers","following_url":"https://api.github.com/users/ekosz/following{/other_user}","gists_url":"https://api.github.com/users/ekosz/gists{/gist_id}","starred_url":"https://api.github.com/users/ekosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekosz/subscriptions","organizations_url":"https://api.github.com/users/ekosz/orgs","repos_url":"https://api.github.com/users/ekosz/repos","events_url":"https://api.github.com/users/ekosz/events{/privacy}","received_events_url":"https://api.github.com/users/ekosz/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T13:12:45Z","updated_at":"2016-07-04T13:12:45Z","body":"👍 Good solution to the problem."}}
{"actor":{"display_login":"ekosz"}}