{"action":"created","issue":{"url":"https://api.github.com/repos/AtomLinter/linter-eslint/issues/1126","repository_url":"https://api.github.com/repos/AtomLinter/linter-eslint","labels_url":"https://api.github.com/repos/AtomLinter/linter-eslint/issues/1126/labels{/name}","comments_url":"https://api.github.com/repos/AtomLinter/linter-eslint/issues/1126/comments","events_url":"https://api.github.com/repos/AtomLinter/linter-eslint/issues/1126/events","html_url":"https://github.com/AtomLinter/linter-eslint/issues/1126","id":313451502,"node_id":"MDU6SXNzdWUzMTM0NTE1MDI=","number":1126,"title":"Wrong position(column & line) on \"Fix\" function execution","user":{"login":"vpiskunov","id":6653762,"node_id":"MDQ6VXNlcjY2NTM3NjI=","avatar_url":"https://avatars0.githubusercontent.com/u/6653762?v=4","gravatar_id":"","url":"https://api.github.com/users/vpiskunov","html_url":"https://github.com/vpiskunov","followers_url":"https://api.github.com/users/vpiskunov/followers","following_url":"https://api.github.com/users/vpiskunov/following{/other_user}","gists_url":"https://api.github.com/users/vpiskunov/gists{/gist_id}","starred_url":"https://api.github.com/users/vpiskunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpiskunov/subscriptions","organizations_url":"https://api.github.com/users/vpiskunov/orgs","repos_url":"https://api.github.com/users/vpiskunov/repos","events_url":"https://api.github.com/users/vpiskunov/events{/privacy}","received_events_url":"https://api.github.com/users/vpiskunov/received_events","type":"User","site_admin":false},"labels":[{"id":346495968,"node_id":"MDU6TGFiZWwzNDY0OTU5Njg=","url":"https://api.github.com/repos/AtomLinter/linter-eslint/labels/unable%20to%20reproduce","name":"unable to reproduce","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-04-11T19:11:49Z","updated_at":"2018-11-07T21:53:58Z","closed_at":null,"author_association":"NONE","body":"## Issue Type\r\nBug\r\n\r\n\r\n## Issue Description\r\n#### \"Fix\" function in editor: wrong column(offset)\r\ne.g. on fixable issue, such as \"there should not be a space inside function parenthesis\", instead of removing the space, removes the char which follows the space.\r\n\r\nOccurs randomly, but often. When the glitch is noticed, if you undo the change(Cmd+Z), and click \"Fix\" again - it works correctly.\r\n\r\nThis also is the case with wrong-line: the replaced part of the \"fixed\" string is being inserted at a wrong line(often 2 lines above the correct one)\r\n\r\n#### Also notices sometimes this relates to file-edit-history:\r\nAnother appearance has shown to restore the inside-content of multi-line part of file being fixed to an older(a few edits back) version.\r\n\r\n#### Another case: Spaces inserted unnecessarily into \"no-concat\" fix\r\n`print( \" > via \" + converted_value + \" \" + first_available )`\r\n\"fixes\" to:\r\n``print( ` > via ${    converted_value     } ${     first_available}` )``\r\n\r\n\r\n\r\n## Bug Checklist\r\n- [ + ] Restart Atom\r\n- [ N/A ] Verify the `eslint` CLI gives the proper result, while `linter-eslint` does not\r\n- [ N/A ] Paste the output of the `Linter Eslint: Debug` command from the Command Palette below\r\n\r\n```\r\nLinter Eslint: N/A\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/AtomLinter/linter-eslint/issues/comments/436791438","html_url":"https://github.com/AtomLinter/linter-eslint/issues/1126#issuecomment-436791438","issue_url":"https://api.github.com/repos/AtomLinter/linter-eslint/issues/1126","id":436791438,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjc5MTQzOA==","user":{"login":"michaelauderer","id":28285686,"node_id":"MDQ6VXNlcjI4Mjg1Njg2","avatar_url":"https://avatars0.githubusercontent.com/u/28285686?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelauderer","html_url":"https://github.com/michaelauderer","followers_url":"https://api.github.com/users/michaelauderer/followers","following_url":"https://api.github.com/users/michaelauderer/following{/other_user}","gists_url":"https://api.github.com/users/michaelauderer/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelauderer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelauderer/subscriptions","organizations_url":"https://api.github.com/users/michaelauderer/orgs","repos_url":"https://api.github.com/users/michaelauderer/repos","events_url":"https://api.github.com/users/michaelauderer/events{/privacy}","received_events_url":"https://api.github.com/users/michaelauderer/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T21:53:58Z","updated_at":"2018-11-07T21:53:58Z","author_association":"NONE","body":"I am also having this issue. It appears that after I perform a fix in a file, if I perform a second fix afterwards it edits the code in the completely wrong line. It seems as though it is \"caching\" the line position of the error and not updating it after I fix.\r\n\r\nSo, if the first fix affects the line numbers of the code, i.e. refactoring a long line into multiple lines, then subsequent fixes will be in the wrong place. It seems to be remembering the line numbers before the fix was performed, not re-checking after a fix.\r\n\r\nSo, steps to reproduce: \r\n- make 2 errors in a file on different lines. the first error should be something like a line that goes past the config's line-length\r\n- fix the first one (hover over and click Fix)\r\n- fix the second one (hover over and click Fix)\r\n\r\nthe second fix will be applied in the wrong position."}}
{"actor":{"display_login":"michaelauderer"}}