termi / es6-transpiler

Tomorrow's JavaScript syntax today
Other
216 stars 18 forks source link

jshint-liked globals comment #32

Closed chrisyip closed 10 years ago

chrisyip commented 10 years ago

Please add support for jshint-liked globals comment:

/* globals require: false, module: true, exports: true, document: true */

Or, provide an option to turn it off.

termi commented 10 years ago

I think about it for quite some time. I'm inclined to, to add jsdoc (or jshint-like) comment options and 'features' option for compiler. What features do you personally need to switch off?

chrisyip commented 10 years ago

If can control es6-transpiler options by comment, and compatible with JSHint, it's OK for me.

But coz JSHint supports esnext (although it sucks for now), I think if there's an option to enable JSHint support would be better.

termi commented 10 years ago

@ChrisYip I am not sure that I am clearly understand your request. Can you provide an example what you get as input and what you want to get as an output? Comment options that I mention earlier is just jsdoc-like or jshint-like, but not compatible with JSHint. I don't want to re-implement JSHint, I don't have much time to this.

chrisyip commented 10 years ago

Sorry for my poor English.

All I need is able to maintain globals per file. jsdoc-like or jshint-like comment options is OK for me.

termi commented 10 years ago

@ChrisYip I never used jshint/jslint before, so it was unclear to me that this issue about. Recently I am read jshint documentation so it's all clear to me now. The jshint-like global comment started working with 0.7.12 version, which is already in npm.

chrisyip commented 10 years ago

@termi thank you!