{"action":"created","issue":{"url":"https://api.github.com/repos/panuhorsmalahti/gulp-tslint/issues/52","labels_url":"https://api.github.com/repos/panuhorsmalahti/gulp-tslint/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/panuhorsmalahti/gulp-tslint/issues/52/comments","events_url":"https://api.github.com/repos/panuhorsmalahti/gulp-tslint/issues/52/events","html_url":"https://github.com/panuhorsmalahti/gulp-tslint/issues/52","id":126772910,"number":52,"title":"TSLint works on the command line - gulp-tslint returns TypeError: Cannot read property 'getFullWidth' of undefined","user":{"login":"Chowarmaan","id":175738,"avatar_url":"https://avatars.githubusercontent.com/u/175738?v=3","gravatar_id":"","url":"https://api.github.com/users/Chowarmaan","html_url":"https://github.com/Chowarmaan","followers_url":"https://api.github.com/users/Chowarmaan/followers","following_url":"https://api.github.com/users/Chowarmaan/following{/other_user}","gists_url":"https://api.github.com/users/Chowarmaan/gists{/gist_id}","starred_url":"https://api.github.com/users/Chowarmaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chowarmaan/subscriptions","organizations_url":"https://api.github.com/users/Chowarmaan/orgs","repos_url":"https://api.github.com/users/Chowarmaan/repos","events_url":"https://api.github.com/users/Chowarmaan/events{/privacy}","received_events_url":"https://api.github.com/users/Chowarmaan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-14T23:31:09Z","updated_at":"2016-01-17T00:53:05Z","closed_at":null,"body":"In trying to get this setup, I am getting an error in gulp-tslint, that I do not get using tslint on the command line.\r\n\r\nThis is the sub job that runs the Typescript compile and TSLint\r\n\r\n    module.exports = function (gulp, PlugIns, Settings) {\r\n\treturn function () {\r\n\t    gulp.src(['./app/Modules/**/*.tsx'])\r\n    \t    .pipe(PlugIns.plumber())\r\n    \t    .pipe(PlugIns.debug())\r\n        \t.pipe(PlugIns.typescript())\r\n        \t.pipe(PlugIns.tslint( {\r\n\t\t\t\tconfiguration: {\r\n\t\t\t\t\trules: {\r\n\t\t\t\t\t\t\"class-name\": true,\r\n\t\t\t\t\t\t\"curly\": true,\r\n\t\t\t\t\t\t\"eofline\": true,\r\n\t\t\t\t\t\t\"indent\": [\r\n\t\t\t\t\t\t\ttrue,\r\n\t\t\t\t\t\t\t\"tabs\"\r\n\t\t\t\t\t\t],\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}))\r\n        \t.pipe(PlugIns.tslint.report(\"stylish\"))\r\n        \t.pipe(gulp.dest(Settings.Destination.TSCompiled))\r\n            ;\r\n        }\r\n    };\r\n\r\nMy Test file that should have errors\r\n\r\n\tclass Greeter {\r\n\t    constructor(public greeting) { }\r\n\t    greet() {\r\n\t        return \"<h2>\" + this.greeting + \"</h2>\";\r\n\t    }\r\n\t    nogreet()\r\n\t    {\r\n\treturn 'Not ' + this.greeting;\r\n\t}\r\n\t};\r\n\t\r\n\tvar greeter = new Greeter(\"Hello, world!\");\r\n\r\ngulp-tslint error generated when running gulp:\r\n\r\n\tgulp\r\n\t[18:20:20] Using gulpfile ~\\Development\\gulpfile.js\r\n\t[18:20:20] Starting 'TypeScript'...\r\n\t[18:20:20] Finished 'TypeScript' after 569 ms\r\n\t[18:20:20] Starting 'default'...\r\n\t[18:20:20] Finished 'default' after 7.84 ms\r\n\t[18:20:20] gulp-debug: app\\Modules\\Cars\\car.tsx\r\n\t[18:20:20] gulp-debug: 1 item\r\n\t~\\Development\\node_modules\\tslint\\lib\\language\\walker\\ruleWalker.js:18\r\n\t        this.limit = this.sourceFile.getFullWidth();\r\n\t                                    ^\r\n\tTypeError: Cannot read property 'getFullWidth' of undefined\r\n\t    at EnableDisableRulesWalker.RuleWalker [as constructor] \r\n\t(~\\Development\\node_modules\\tslint\\lib\\language\\walker\\ruleWalker.js\r\n\t:18:37)\r\n\t    at EnableDisableRulesWalker.SkippableTokenAwareRuleWalker [as constructor] (\r\n\t~\\Development\\node_modules\\tslint\\lib\\language\\walker\\skippableTokenAwareRuleWalker.js:11:16)\r\n\t    at new EnableDisableRulesWalker (~\\Development\\node_modules\\tslint\\lib\\enableDisableRules.js:13:16)\r\n\t    at Linter.lint (~\\Development\\node_modules\\tslint\\lib\\tslint.js:16:27)\r\n\t    at ~\\Development\\node_modules\\gulp-tslint\\index.js:96:34\r\n\t    at respond (~\\Development\\node_modules\\rcloader\\index.js:73:7)\r\n\t    at respond (~\\Development\\node_modules\\rcfinder\\index.js:140:7)\r\n\t    at ~\\Development\\node_modules\\rcfinder\\index.js:124:17\r\n\t    at ~\\Development\\node_modules\r\n\r\nHowever, running the tslint from the command line (in the same directory as gulp), the coding issues are returned.\r\n\r\n\ttslint -c tslint.json app\\Modules\\Cars\\Greet.tsx\r\n\tapp/Modules/Cars/Greet.tsx[3, 5]: default access modifier on member/method not a\r\n\tllowed\r\n\tapp/Modules/Cars/Greet.tsx[6, 5]: default access modifier on member/method not a\r\n\tllowed\r\n\tapp/Modules/Cars/Greet.tsx[2, 17]: 'greeting' cannot be declared in the construc\r\n\ttor\r\n\tapp/Modules/Cars/Greet.tsx[12, 5]: unused variable: 'greeter'\r\n\tapp/Modules/Cars/Greet.tsx[12, 1]: forbidden var keyword\r\n\tapp/Modules/Cars/Greet.tsx[7, 5]: misplaced opening brace\r\n\tapp/Modules/Cars/Greet.tsx[8, 8]: ' should be \"\r\n\tapp/Modules/Cars/Greet.tsx[2, 32]: expected parameter: 'greeting' to have a type\r\n\tdef\r\n\tapp/Modules/Cars/Greet.tsx[3, 11]: expected call-signature: 'greet' to have a ty\r\n\tpedef\r\n\tapp/Modules/Cars/Greet.tsx[6, 13]: expected call-signature: 'nogreet' to have a\r\n\ttypedef\r\n\tapp/Modules/Cars/Greet.tsx[12, 12]: expected variable-declaration: 'greeter' to\r\n\thave a typedef"},"comment":{"url":"https://api.github.com/repos/panuhorsmalahti/gulp-tslint/issues/comments/172280527","html_url":"https://github.com/panuhorsmalahti/gulp-tslint/issues/52#issuecomment-172280527","issue_url":"https://api.github.com/repos/panuhorsmalahti/gulp-tslint/issues/52","id":172280527,"user":{"login":"Chowarmaan","id":175738,"avatar_url":"https://avatars.githubusercontent.com/u/175738?v=3","gravatar_id":"","url":"https://api.github.com/users/Chowarmaan","html_url":"https://github.com/Chowarmaan","followers_url":"https://api.github.com/users/Chowarmaan/followers","following_url":"https://api.github.com/users/Chowarmaan/following{/other_user}","gists_url":"https://api.github.com/users/Chowarmaan/gists{/gist_id}","starred_url":"https://api.github.com/users/Chowarmaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chowarmaan/subscriptions","organizations_url":"https://api.github.com/users/Chowarmaan/orgs","repos_url":"https://api.github.com/users/Chowarmaan/repos","events_url":"https://api.github.com/users/Chowarmaan/events{/privacy}","received_events_url":"https://api.github.com/users/Chowarmaan/received_events","type":"User","site_admin":false},"created_at":"2016-01-17T00:53:05Z","updated_at":"2016-01-17T00:53:05Z","body":"Sorry, running just tslint gives an error as I  did  not install it globally, it is only in the project directory which is why I added the second  line with the node_modules\\.bin\\tslint -v."}}