{"action":"opened","issue":{"url":"https://api.github.com/repos/babel/babel-eslint/issues/39","labels_url":"https://api.github.com/repos/babel/babel-eslint/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel-eslint/issues/39/comments","events_url":"https://api.github.com/repos/babel/babel-eslint/issues/39/events","html_url":"https://github.com/babel/babel-eslint/issues/39","id":60262072,"number":39,"title":"ES6 class appears as unused despite a code below creating an instance of it.","user":{"login":"jpedrosa","id":37087,"avatar_url":"https://avatars.githubusercontent.com/u/37087?v=3","gravatar_id":"","url":"https://api.github.com/users/jpedrosa","html_url":"https://github.com/jpedrosa","followers_url":"https://api.github.com/users/jpedrosa/followers","following_url":"https://api.github.com/users/jpedrosa/following{/other_user}","gists_url":"https://api.github.com/users/jpedrosa/gists{/gist_id}","starred_url":"https://api.github.com/users/jpedrosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpedrosa/subscriptions","organizations_url":"https://api.github.com/users/jpedrosa/orgs","repos_url":"https://api.github.com/users/jpedrosa/repos","events_url":"https://api.github.com/users/jpedrosa/events{/privacy}","received_events_url":"https://api.github.com/users/jpedrosa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-08T15:45:39Z","updated_at":"2015-03-08T15:45:39Z","closed_at":null,"body":"I was testing ES6 with Babel when I ran into the following problem:\r\n\r\n```javascript\r\nfunction jello(fn) {\r\n  fn();\r\n}\r\nclass Hey {\r\n  constructor() {\r\n    this.name = \"John\";\r\n  }\r\n  sayHello(partingMessage) {\r\n    jello(() => console.log(`Hello, ${this.name}!`));\r\n    console.log(partingMessage);\r\n  }\r\n}\r\nvar h = new Hey();\r\nh.sayHello();\r\n```\r\n\r\nI get this warning:\r\n\r\n  4:6  error  Hey is defined but never used  no-unused-vars\r\n\r\n✖ 1 problem (1 error, 0 warnings)\r\n\r\nAlso, should h.sayHello produce a warning since it's calling it without an argument? Is there an option for that one? :-)\r\n\r\nApparently Espree got a related fix and I also checked out a couple of related bugs. But I couldn't see a code like mine in the samples for the error. Most of them were worried about module exporting instead.\r\n\r\nThanks.\r\n"}}