@coffeelint/cli
Version:
Lint your CoffeeScript
34 lines (26 loc) • 820 B
JavaScript
(function() {
var NoBackticks;
module.exports = NoBackticks = (function() {
class NoBackticks {
lintToken(token, tokenApi) {
if (token.comments == null) {
return {token};
}
}
};
NoBackticks.prototype.rule = {
type: 'problem',
name: 'no_backticks',
level: 'error',
message: 'Backticks are forbidden',
description: `Backticks allow snippets of JavaScript to be embedded in
CoffeeScript. While some folks consider backticks useful in a few
niche circumstances, they should be avoided because so none of
JavaScript's "bad parts", like <tt>with</tt> and <tt>eval</tt>,
sneak into CoffeeScript.
This rule is enabled by default.`
};
NoBackticks.prototype.tokens = ['JS'];
return NoBackticks;
}).call(this);
}).call(this);