您现在可以使用单行语法:
var thing = new Thing(); // eslint-disable-line no-use-before-definething.sayHello();function Thing() { this.sayHello = function() { console.log("hello"); };}或者,如果您不想在与实际代码相同的行上添加注释,则可以禁用下一行:
// eslint-disable-next-line no-use-before-definevar thing = new Thing();



