{"action":"created","issue":{"url":"https://api.github.com/repos/MeirionHughes/aurelia-template-lint/issues/113","repository_url":"https://api.github.com/repos/MeirionHughes/aurelia-template-lint","labels_url":"https://api.github.com/repos/MeirionHughes/aurelia-template-lint/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/MeirionHughes/aurelia-template-lint/issues/113/comments","events_url":"https://api.github.com/repos/MeirionHughes/aurelia-template-lint/issues/113/events","html_url":"https://github.com/MeirionHughes/aurelia-template-lint/issues/113","id":176844691,"number":113,"title":"Fix View-Model <-> View Resolution","user":{"login":"atsu85","id":1206512,"avatar_url":"https://avatars.githubusercontent.com/u/1206512?v=3","gravatar_id":"","url":"https://api.github.com/users/atsu85","html_url":"https://github.com/atsu85","followers_url":"https://api.github.com/users/atsu85/followers","following_url":"https://api.github.com/users/atsu85/following{/other_user}","gists_url":"https://api.github.com/users/atsu85/gists{/gist_id}","starred_url":"https://api.github.com/users/atsu85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atsu85/subscriptions","organizations_url":"https://api.github.com/users/atsu85/orgs","repos_url":"https://api.github.com/users/atsu85/repos","events_url":"https://api.github.com/users/atsu85/events{/privacy}","received_events_url":"https://api.github.com/users/atsu85/received_events","type":"User","site_admin":false},"labels":[{"id":382383601,"url":"https://api.github.com/repos/MeirionHughes/aurelia-template-lint/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"MeirionHughes","id":3584509,"avatar_url":"https://avatars.githubusercontent.com/u/3584509?v=3","gravatar_id":"","url":"https://api.github.com/users/MeirionHughes","html_url":"https://github.com/MeirionHughes","followers_url":"https://api.github.com/users/MeirionHughes/followers","following_url":"https://api.github.com/users/MeirionHughes/following{/other_user}","gists_url":"https://api.github.com/users/MeirionHughes/gists{/gist_id}","starred_url":"https://api.github.com/users/MeirionHughes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeirionHughes/subscriptions","organizations_url":"https://api.github.com/users/MeirionHughes/orgs","repos_url":"https://api.github.com/users/MeirionHughes/repos","events_url":"https://api.github.com/users/MeirionHughes/events{/privacy}","received_events_url":"https://api.github.com/users/MeirionHughes/received_events","type":"User","site_admin":false},"assignees":[{"login":"MeirionHughes","id":3584509,"avatar_url":"https://avatars.githubusercontent.com/u/3584509?v=3","gravatar_id":"","url":"https://api.github.com/users/MeirionHughes","html_url":"https://github.com/MeirionHughes","followers_url":"https://api.github.com/users/MeirionHughes/followers","following_url":"https://api.github.com/users/MeirionHughes/following{/other_user}","gists_url":"https://api.github.com/users/MeirionHughes/gists{/gist_id}","starred_url":"https://api.github.com/users/MeirionHughes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeirionHughes/subscriptions","organizations_url":"https://api.github.com/users/MeirionHughes/orgs","repos_url":"https://api.github.com/users/MeirionHughes/repos","events_url":"https://api.github.com/users/MeirionHughes/events{/privacy}","received_events_url":"https://api.github.com/users/MeirionHughes/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/MeirionHughes/aurelia-template-lint/milestones/11","html_url":"https://github.com/MeirionHughes/aurelia-template-lint/milestones/0.10","labels_url":"https://api.github.com/repos/MeirionHughes/aurelia-template-lint/milestones/11/labels","id":1873759,"number":11,"title":"0.10","description":"","creator":{"login":"MeirionHughes","id":3584509,"avatar_url":"https://avatars.githubusercontent.com/u/3584509?v=3","gravatar_id":"","url":"https://api.github.com/users/MeirionHughes","html_url":"https://github.com/MeirionHughes","followers_url":"https://api.github.com/users/MeirionHughes/followers","following_url":"https://api.github.com/users/MeirionHughes/following{/other_user}","gists_url":"https://api.github.com/users/MeirionHughes/gists{/gist_id}","starred_url":"https://api.github.com/users/MeirionHughes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeirionHughes/subscriptions","organizations_url":"https://api.github.com/users/MeirionHughes/orgs","repos_url":"https://api.github.com/users/MeirionHughes/repos","events_url":"https://api.github.com/users/MeirionHughes/events{/privacy}","received_events_url":"https://api.github.com/users/MeirionHughes/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":0,"state":"open","created_at":"2016-07-09T19:48:29Z","updated_at":"2016-12-05T11:02:44Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-09-14T08:23:21Z","updated_at":"2016-12-07T07:39:57Z","closed_at":null,"body":"Let's say I have 2 files:\n\n```\nmy-component.ts\nmy-component.html\n```\n\nand my-component.ts contains smth like:\n\n```\nexport class Helper {\n...\n}\nexport class MyComponent {\n...\n  x: Helper;\n}\n```\n\nand when field x is used in template, then linter emits error:\n\n```\nERROR: cannot find 'x' in type 'Helper '\n```\n\nRight now the error message is misleading.\n\nPS. While I think it is good idea to put component class as the first class in TS file, it shouldn't be a restriction for the linter (ideally there could be another rule that could be enabled/disabled to check if VM class is the first class in source code) - linter should match the VM class using same rules (naming conventions in this case) as it is done by Aurelia.\n"},"comment":{"url":"https://api.github.com/repos/MeirionHughes/aurelia-template-lint/issues/comments/265377890","html_url":"https://github.com/MeirionHughes/aurelia-template-lint/issues/113#issuecomment-265377890","issue_url":"https://api.github.com/repos/MeirionHughes/aurelia-template-lint/issues/113","id":265377890,"user":{"login":"MeirionHughes","id":3584509,"avatar_url":"https://avatars.githubusercontent.com/u/3584509?v=3","gravatar_id":"","url":"https://api.github.com/users/MeirionHughes","html_url":"https://github.com/MeirionHughes","followers_url":"https://api.github.com/users/MeirionHughes/followers","following_url":"https://api.github.com/users/MeirionHughes/following{/other_user}","gists_url":"https://api.github.com/users/MeirionHughes/gists{/gist_id}","starred_url":"https://api.github.com/users/MeirionHughes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeirionHughes/subscriptions","organizations_url":"https://api.github.com/users/MeirionHughes/orgs","repos_url":"https://api.github.com/users/MeirionHughes/repos","events_url":"https://api.github.com/users/MeirionHughes/events{/privacy}","received_events_url":"https://api.github.com/users/MeirionHughes/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T07:39:57Z","updated_at":"2016-12-07T07:39:57Z","body":"I can, but... \r\n\r\nCan you make a gistrun of what you're doing differently? Your example in the first post doesn't work for me. https://gist.run/?id=c2a7e42b7d835923b2ec5f522d654d9b if I rename it to MyComponentCustomElement it works. if I change MyComponent to be the first export, it works. if I change it to `class Anything` as first export, it doesn't work as Custom Element. \r\n\r\nThe three rules I outlined above seem to be exactly how aurelia works by default. \r\n"}}
{"actor":{"display_login":"MeirionHughes"}}