aolchik
aolchik

Reputation: 63

How to configure JSHint from within Coffeescript files?

When programming in Javascript it is possible to configure JSHint from within Javascript files using the following syntax

/* jshint eqnull: true, eqeqeq: false */

Is there any way of setting those specific configurations from within a Coffeescript file?

Upvotes: 3

Views: 879

Answers (1)

Billy Moon
Billy Moon

Reputation: 58561

This coffeescript...

### jshint eqnull: true, eqeqeq: false ###

alert "regular coffee script here..."

Compiles to...

/* jshint eqnull: true, eqeqeq: false */alert("regular coffee script here...");

Need it on it's own line?

### jshint eqnull: true, eqeqeq: false ###
### break after hint ###
alert "regular coffee script here..."

Compiles to...

/* jshint eqnull: true, eqeqeq: false */
/* break after hint */alert("regular coffee script here...");

Upvotes: 4

Related Questions