kratiahuja / broccoli-tslinter

Broccoli Plugin to run linter on typescript files. Uses tslint internally.
MIT License
9 stars 6 forks source link

Change `targetExtension` to `lint-test.js`? #13

Closed rwjblue closed 7 years ago

rwjblue commented 7 years ago

This would allow a few things:

rwjblue commented 7 years ago

Here is a link to the example that made me think of this issue: https://github.com/tildeio/simple-html-tokenizer/pull/41/files#r97114924

kratiahuja commented 7 years ago

it would ensure that we do not need *.ts processing after linting (currently we return .ts files with only valid .js content, but that could change in the future and I wouldn't want to embed */.ts into concat's of only JS things)...

I am not sure I follow the context here. Could you please elaborate?

rwjblue commented 7 years ago

Sorry, after re-reading I see that it doesn't make sense. 😝

The point that I am making is that, the output of broccoli-tslint actually has to be transpiled today (since it emits .ts files), even though the file contents are valid .js. This adds an additional unneeded step to a consuming build pipeline.

My concern is that folks would do what @turbo87 did in https://github.com/tildeio/simple-html-tokenizer/pull/41/files#r97114924 and just use broccoli-concat to concat ['**/*.js', '**/*.ts'] together into a .js output file, which might be catastrophic and fail parsing.

kratiahuja commented 7 years ago

Ohoo ok now I understand. Yes I agree it is an uneeded step for concat. I will update the targetExtension to output lint-test.js.