{"action":"created","issue":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1214","labels_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1214/labels{/name}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1214/comments","events_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1214/events","html_url":"https://github.com/jscs-dev/node-jscs/issues/1214","id":64969858,"number":1214,"title":"Removal of `JsFile.prototype.getTokenPosByRangeStart`","user":{"login":"rwjblue","id":12637,"avatar_url":"https://avatars.githubusercontent.com/u/12637?v=3","gravatar_id":"","url":"https://api.github.com/users/rwjblue","html_url":"https://github.com/rwjblue","followers_url":"https://api.github.com/users/rwjblue/followers","following_url":"https://api.github.com/users/rwjblue/following{/other_user}","gists_url":"https://api.github.com/users/rwjblue/gists{/gist_id}","starred_url":"https://api.github.com/users/rwjblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwjblue/subscriptions","organizations_url":"https://api.github.com/users/rwjblue/orgs","repos_url":"https://api.github.com/users/rwjblue/repos","events_url":"https://api.github.com/users/rwjblue/events{/privacy}","received_events_url":"https://api.github.com/users/rwjblue/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jscs-dev/node-jscs/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-28T17:51:12Z","updated_at":"2015-03-30T20:25:05Z","closed_at":null,"body":"`JsFile.prototype.getTokenPosByRangeStart` was removed in https://github.com/jscs-dev/node-jscs/pull/1076. Since `JsFile` is exposed as public API and this function was not marked as `@private` (or underscored), I would have expected it to be available (but possibly deprecated) throughout the 1.x timeframe.  I also did not see this removal mentioned in the [release notes](https://github.com/jscs-dev/node-jscs/releases/tag/v1.12.0).\r\n\r\nWe were using this function in a custom rule in Ember ([here](https://github.com/emberjs/ember.js/blob/master/lib/jscs-rules/require-spaces-after-closing-parenthesis-in-function-declaration.js)), and an issue was reported in https://github.com/emberjs/ember.js/issues/10743.\r\n\r\nI have updated the rule in Ember to allow builds to work properly (in https://github.com/emberjs/ember.js/pull/10747), but I am uncertain what y'alls normal process is here for this type of stuff so I figured I'd open an issue to let y'all know.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/10144734-removal-of-jsfile-prototype-gettokenposbyrangestart?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/comments/87821007","html_url":"https://github.com/jscs-dev/node-jscs/issues/1214#issuecomment-87821007","issue_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1214","id":87821007,"user":{"login":"zxqfox","id":677518,"avatar_url":"https://avatars.githubusercontent.com/u/677518?v=3","gravatar_id":"","url":"https://api.github.com/users/zxqfox","html_url":"https://github.com/zxqfox","followers_url":"https://api.github.com/users/zxqfox/followers","following_url":"https://api.github.com/users/zxqfox/following{/other_user}","gists_url":"https://api.github.com/users/zxqfox/gists{/gist_id}","starred_url":"https://api.github.com/users/zxqfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxqfox/subscriptions","organizations_url":"https://api.github.com/users/zxqfox/orgs","repos_url":"https://api.github.com/users/zxqfox/repos","events_url":"https://api.github.com/users/zxqfox/events{/privacy}","received_events_url":"https://api.github.com/users/zxqfox/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T20:25:05Z","updated_at":"2015-03-30T20:25:05Z","body":"@rwjblue Since you are the one who used in atm I have another idea: can you try to readd it on your level? Just something like:\r\n```\r\n// temporary readded since it was removed in jscs\r\nrequire('jscs/lib/js-file').prototype.getTokenPosByRangeStart = function(start) {\r\n    return (this.getTokenByRangeStart(start) || {})._tokenIndex;\r\n},\r\n```\r\n"}}