{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/10912","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/10912/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/10912/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/10912/events","html_url":"https://github.com/eslint/eslint/pull/10912","id":366082726,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5ODQ3NTMy","number":10912,"title":"New: Add --fix-type option to CLI (fixes #10855)","user":{"login":"nzakas","id":38546,"node_id":"MDQ6VXNlcjM4NTQ2","avatar_url":"https://avatars3.githubusercontent.com/u/38546?v=4","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},"labels":[{"id":65186530,"node_id":"MDU6TGFiZWw2NTE4NjUzMA==","url":"https://api.github.com/repos/eslint/eslint/labels/cli","name":"cli","color":"eb6420","default":false},{"id":261840582,"node_id":"MDU6TGFiZWwyNjE4NDA1ODI=","url":"https://api.github.com/repos/eslint/eslint/labels/do%20not%20merge","name":"do not merge","color":"e11d21","default":false},{"id":253473350,"node_id":"MDU6TGFiZWwyNTM0NzMzNTA=","url":"https://api.github.com/repos/eslint/eslint/labels/feature","name":"feature","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-02T21:14:35Z","updated_at":"2018-10-19T17:45:44Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/10912","html_url":"https://github.com/eslint/eslint/pull/10912","diff_url":"https://github.com/eslint/eslint/pull/10912.diff","patch_url":"https://github.com/eslint/eslint/pull/10912.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[ ] Documentation update\r\n[ ] Bug fix ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/bug-report.md))\r\n[ ] New rule ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/rule-proposal.md))\r\n[ ] Changes an existing rule ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/rule-change-proposal.md))\r\n[ ] Add autofixing to a rule\r\n[x] Add a CLI option\r\n[ ] Add something to the core\r\n[ ] Other, please explain:\r\n\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\r\nImplemented the `--fix-type` option as described in #10855. Also included a tool for easily updating the type of each rule based on the `rule-types.json` file.\r\n\r\nAs for approach, I added a `fixTypes` property to the `CLIEngine` configuration. I chose to do this rather than overwriting the `fix` option. I think `fixTypes` is a better implementation because it exposes this functionality to code editors whereas just overriding the `fix` option would not have done so.\r\n\r\n**Is there anything you'd like reviewers to focus on?**\r\n\r\n1. Did I properly implement the change?\r\n2. Did I write all appropriate tests?\r\n3. Review `rule-types.json` to see if you disagree with any of the assigned types.\r\n\r\n**Note:** The first commit on this PR contains the default `rule-types.json` that I created based solely on matching `meta.docs.category`. The second commit (which I will add soon) is my suggested changes.\r\n"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/431442772","html_url":"https://github.com/eslint/eslint/pull/10912#issuecomment-431442772","issue_url":"https://api.github.com/repos/eslint/eslint/issues/10912","id":431442772,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTQ0Mjc3Mg==","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-10-19T17:45:44Z","updated_at":"2018-10-19T17:45:44Z","author_association":"MEMBER","body":"I like the intent of narrowing the focus of style changes and promoting some current \"style\" rules to suggestions.\r\n\r\nThat said: Should token presence/absence or location also fall under \"layout\", or should those be suggestions? (E.g., semi, semi-style, comma-dangle, comma-style) Or have I just reopened the previous can of worms?"}}
{"actor":{"display_login":"platinumazure"}}