【发布时间】:2016-04-06 03:35:09
【问题描述】:
我的脚本代码遵循 jshint 样式,它只允许单引号中的 javascript 字符串。但是当我使用 babel 翻译我的 ES6 模板文件时,它有时会生成带有双引号的字符串,我该如何禁止呢?
例如:模板生成如下代码:throw new TypeError("Cannot call a class as a function");
我希望生成:throw new TypeError('Cannot call a class as a function');
【问题讨论】:
-
不要在转译输出上运行 jshint。
-
@user663031 如果您在源代码上运行代码模块怎么办?
标签: ecmascript-6 babeljs jshint