{"action":"created","issue":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1659","labels_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1659/labels{/name}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1659/comments","events_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1659/events","html_url":"https://github.com/jscs-dev/node-jscs/issues/1659","id":100291843,"number":1659,"title":"ES6: Replace bind(this) with arrow function","user":{"login":"SimenB","id":1404810,"avatar_url":"https://avatars.githubusercontent.com/u/1404810?v=3","gravatar_id":"","url":"https://api.github.com/users/SimenB","html_url":"https://github.com/SimenB","followers_url":"https://api.github.com/users/SimenB/followers","following_url":"https://api.github.com/users/SimenB/following{/other_user}","gists_url":"https://api.github.com/users/SimenB/gists{/gist_id}","starred_url":"https://api.github.com/users/SimenB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimenB/subscriptions","organizations_url":"https://api.github.com/users/SimenB/orgs","repos_url":"https://api.github.com/users/SimenB/repos","events_url":"https://api.github.com/users/SimenB/events{/privacy}","received_events_url":"https://api.github.com/users/SimenB/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-11T11:22:43Z","updated_at":"2015-08-11T11:48:09Z","closed_at":"2015-08-11T11:38:29Z","body":"Cross-post eslint. Tried searching for it here as well.\r\nI'd like to get a linting warning on all usages of `function () {}.bind(this);`, as it could be replaces by `() => {}`. This is stylistic.\r\n\r\nWarning: \r\n```js\r\n$.ajax(/**/, {\r\n  error: function (model, res) {\r\n    this.someFuntion();\r\n  }.bind(this)\r\n})\r\n```\r\n\r\nOK: \r\n```js\r\n$.ajax(/**/, {\r\n  error: (model, res) => {\r\n    this.someFuntion();\r\n  }\r\n})\r\n```\r\n\r\nAlso OK:\r\n```js\r\n$.ajax(/**/, {\r\n  error: this.someFuntion.bind(this)\r\n})\r\n```"},"comment":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/comments/129848265","html_url":"https://github.com/jscs-dev/node-jscs/issues/1659#issuecomment-129848265","issue_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1659","id":129848265,"user":{"login":"SimenB","id":1404810,"avatar_url":"https://avatars.githubusercontent.com/u/1404810?v=3","gravatar_id":"","url":"https://api.github.com/users/SimenB","html_url":"https://github.com/SimenB","followers_url":"https://api.github.com/users/SimenB/followers","following_url":"https://api.github.com/users/SimenB/following{/other_user}","gists_url":"https://api.github.com/users/SimenB/gists{/gist_id}","starred_url":"https://api.github.com/users/SimenB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimenB/subscriptions","organizations_url":"https://api.github.com/users/SimenB/orgs","repos_url":"https://api.github.com/users/SimenB/repos","events_url":"https://api.github.com/users/SimenB/events{/privacy}","received_events_url":"https://api.github.com/users/SimenB/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T11:48:09Z","updated_at":"2015-08-11T11:48:09Z","body":"```js\r\n    _.each(lenker, function (lenke) {\r\n      this.meep(lenke)\r\n    }.bind(this));\r\n```\r\n\r\nDoesn't trigger error. If I remove `bind` it triggers."}}