{"action":"closed","issue":{"url":"https://api.github.com/repos/brunch/brunch/issues/1048","labels_url":"https://api.github.com/repos/brunch/brunch/issues/1048/labels{/name}","comments_url":"https://api.github.com/repos/brunch/brunch/issues/1048/comments","events_url":"https://api.github.com/repos/brunch/brunch/issues/1048/events","html_url":"https://github.com/brunch/brunch/issues/1048","id":119198236,"number":1048,"title":"Plugin lint function does not get the good \"this\"","user":{"login":"mccricri","id":368090,"avatar_url":"https://avatars.githubusercontent.com/u/368090?v=3","gravatar_id":"","url":"https://api.github.com/users/mccricri","html_url":"https://github.com/mccricri","followers_url":"https://api.github.com/users/mccricri/followers","following_url":"https://api.github.com/users/mccricri/following{/other_user}","gists_url":"https://api.github.com/users/mccricri/gists{/gist_id}","starred_url":"https://api.github.com/users/mccricri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mccricri/subscriptions","organizations_url":"https://api.github.com/users/mccricri/orgs","repos_url":"https://api.github.com/users/mccricri/repos","events_url":"https://api.github.com/users/mccricri/events{/privacy}","received_events_url":"https://api.github.com/users/mccricri/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brunch/brunch/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-27T13:43:12Z","updated_at":"2015-12-05T17:49:40Z","closed_at":"2015-12-05T17:49:40Z","body":"Since version 2.0 (nodejs 5.1.0), it seems that we don't get the good 'this' object in the lint function \r\n\r\n```\r\nvar TypescriptCompiler = function (config) {\r\n    this.config = \"config\";\r\n\r\n    console.log('init',this)\r\n};\r\n\r\nTypescriptCompiler.prototype.brunchPlugin = true;\r\nTypescriptCompiler.prototype.type = 'javascript';\r\nTypescriptCompiler.prototype.extension = \"ts\";\r\n\r\nTypescriptCompiler.prototype.lint = function (data, path, callback) {\r\n  console.log(\"lint \",this.config)\r\n  return callback(null,null)\r\n}\r\n```\r\n\r\nDisplay : \r\n```\r\nλ brunch build\r\ninit { config: 'config' }\r\nlint  undefined\r\n```\r\n\r\n'this' is still good in the compile function.\r\n"}}