{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/10882","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/10882/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/10882/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/10882/events","html_url":"https://github.com/eslint/eslint/pull/10882","id":362775684,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NDAyNjU4","number":10882,"title":"Docs: Added docs for no-hardcoded-values","user":{"login":"Kefir100","id":22402935,"node_id":"MDQ6VXNlcjIyNDAyOTM1","avatar_url":"https://avatars0.githubusercontent.com/u/22402935?v=4","gravatar_id":"","url":"https://api.github.com/users/Kefir100","html_url":"https://github.com/Kefir100","followers_url":"https://api.github.com/users/Kefir100/followers","following_url":"https://api.github.com/users/Kefir100/following{/other_user}","gists_url":"https://api.github.com/users/Kefir100/gists{/gist_id}","starred_url":"https://api.github.com/users/Kefir100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kefir100/subscriptions","organizations_url":"https://api.github.com/users/Kefir100/orgs","repos_url":"https://api.github.com/users/Kefir100/repos","events_url":"https://api.github.com/users/Kefir100/events{/privacy}","received_events_url":"https://api.github.com/users/Kefir100/received_events","type":"User","site_admin":false},"labels":[{"id":255319420,"node_id":"MDU6TGFiZWwyNTUzMTk0MjA=","url":"https://api.github.com/repos/eslint/eslint/labels/evaluating","name":"evaluating","color":"fef2c0","default":false},{"id":253473350,"node_id":"MDU6TGFiZWwyNTM0NzMzNTA=","url":"https://api.github.com/repos/eslint/eslint/labels/feature","name":"feature","color":"bfd4f2","default":false},{"id":45798639,"node_id":"MDU6TGFiZWw0NTc5ODYzOQ==","url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-21T21:11:15Z","updated_at":"2018-09-21T22:16:21Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/10882","html_url":"https://github.com/eslint/eslint/pull/10882","diff_url":"https://github.com/eslint/eslint/pull/10882.diff","patch_url":"https://github.com/eslint/eslint/pull/10882.patch"},"body":"<!--\r\n    ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct).\r\n-->\r\n\r\n**What is the purpose of this pull request? (put an \"X\" next to item)**\r\n\r\n[*] New rule\r\n\r\n**Please describe what the rule should do:**\r\n\r\nThe rule should prohibit a developer from hardcoding values matching a specified RegExp, e.g. URLs, Tokens and other environment-specific and sensitive information.\r\n\r\n**What category of rule is this? (place an \"X\" next to just one item)**\r\n\r\n[ ] Enforces code style\r\n[*] Warns about a potential error\r\n[ ] Suggests an alternate way of doing something\r\n[ ] Other (please specify:)\r\n\r\n**Provide 2-3 code examples that this rule will warn about:**\r\n\r\n```js\r\n/*eslint no-hardcoded-values: \"error\"*/\r\nconst url = \"https://dev.hardcode-url.com\";\r\n\r\n ```\r\n\r\n ```js\r\n/*eslint no-hardcoded-values: \"error\"*/\r\ncheckEmail(\"username@mail.com\");\r\n```\r\nThe values above should not be hardcoded, they would rather be set somewhere else, for example in a dot-env file or fetched externally.\r\n\r\n**Why should this rule be included in ESLint (instead of a plugin)?**\r\nThis rule is pretty common and enforces Best Practices. It should let a developer know that something wrong is going to happen before he deploys his code somewhere.\r\n<!--\r\n    If the item you've checked above has a template, please paste the template questions below and answer them. (If this pull request is addressing an issue, you can just paste a link to the issue here instead.)\r\n-->\r\n\r\n<!--\r\n    Please ensure your pull request is ready:\r\n\r\n    - Read the pull request guide (https://eslint.org/docs/developer-guide/contributing/pull-requests)\r\n    - Include tests for this change\r\n    - Update documentation for this change (if appropriate)\r\n-->\r\n\r\n<!--\r\n    The following is required for all pull requests:\r\n-->\r\n\r\n**What changes did you make? (Give an overview)**\r\n* Implemented a new rule - logic\r\n* Created tests\r\n* Added docs for use-cases and common info about the rule\r\n\r\n**Is there anything you'd like reviewers to focus on?**\r\nI think the main question would be: \"Is it really common and widely needed?\"\r\n"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/423685505","html_url":"https://github.com/eslint/eslint/pull/10882#issuecomment-423685505","issue_url":"https://api.github.com/repos/eslint/eslint/issues/10882","id":423685505,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzY4NTUwNQ==","user":{"login":"platinumazure","id":284282,"node_id":"MDQ6VXNlcjI4NDI4Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/284282?v=4","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":"2018-09-21T22:16:21Z","updated_at":"2018-09-21T22:16:21Z","author_association":"MEMBER","body":"Hi @Kefir100, thanks for the PR!\r\n\r\nIn order to accept a rule proposal, our team needs to come to a [consensus](https://eslint.org/docs/maintainer-guide/issues#championing-issues) that it's worth including in ESLint core.\r\n\r\nI'm personally ambivalent about this. It's not a bad idea, but I think this could fit in just as well in some sort of security plugin. Our bar for adding new rules has necessarily become very high, because we have so many now. I'm not convinced that this rule is a critical need for ESLint core. I won't :-1: and stand in the way, but I'm not persuaded that we should add this rule at this point."}}
{"actor":{"display_login":"platinumazure"}}