发布于 3 个月前 ,更新于 3 个月前 其它

单个文件中调整eslint规则方法

禁用 ESLint
/* eslint-disable */
var a = 100;
console.log(a);  
/* eslint-enable */
禁用一条规则
/*eslint-disable no-console */
var a = 100;
console.log(a);
/*eslint-enable no-console */
调整规则
/* eslint no-console:0 */
var a = 100;
console.log(a);

摘自 https://www.cnblogs.com/cczlovexw/p/8182317.html

© 2016 - 2021 BY 禾惠 粤ICP备20027042号