{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/42","repository_url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn","labels_url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/42/comments","events_url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/42/events","html_url":"https://github.com/sindresorhus/eslint-plugin-unicorn/issues/42","id":161614890,"number":42,"title":"Rule proposal: No variable named after special name","user":{"login":"jfmengels","id":3869412,"avatar_url":"https://avatars.githubusercontent.com/u/3869412?v=3","gravatar_id":"","url":"https://api.github.com/users/jfmengels","html_url":"https://github.com/jfmengels","followers_url":"https://api.github.com/users/jfmengels/followers","following_url":"https://api.github.com/users/jfmengels/following{/other_user}","gists_url":"https://api.github.com/users/jfmengels/gists{/gist_id}","starred_url":"https://api.github.com/users/jfmengels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfmengels/subscriptions","organizations_url":"https://api.github.com/users/jfmengels/orgs","repos_url":"https://api.github.com/users/jfmengels/repos","events_url":"https://api.github.com/users/jfmengels/events{/privacy}","received_events_url":"https://api.github.com/users/jfmengels/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/labels/help%20wanted","name":"help wanted","color":"128A0C"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-06-22T07:49:27Z","updated_at":"2016-10-10T18:38:57Z","closed_at":null,"body":"In my codebase at work, I often see variables/params named as `module` which is kind of dangerous in my opinion.\r\n\r\nI'd like to propose a rule that forbids the use of \"reserved\" variables, or at least the \"special\" variables, such as: `module`, `exports`, `global`, `window` (?), ...\r\n\r\nI'd also like to see the same thing but for node core modules, like `fs`, `path`, that would forbid the following for instance\r\n```js\r\nvar path = '/foo/bar';\r\n```\r\nNot sure if we'd want that in a new rule or behind a flag. I'm leaning towards the latter."},"comment":{"url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/comments/252704373","html_url":"https://github.com/sindresorhus/eslint-plugin-unicorn/issues/42#issuecomment-252704373","issue_url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/42","id":252704373,"user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T18:38:57Z","updated_at":"2016-10-10T18:38:57Z","body":"> In part, yes, but not really, as it wouldn't save us from the following case, which is what I see in our codebase.\r\n\r\nAh, ok. So still value in having a rule for this then.\r\n\r\n> o-nodejs-builtin-shadow? To reference no-shadow\r\n\r\nI would go with `no-shadow-nodejs-builtins` to match [`no-shadow-restricted-names`](http://eslint.org/docs/rules/no-shadow-restricted-names)."}}
{"actor":{"display_login":"sindresorhus"}}