[英]Ignore lines from linting and formating - VSC EsLint + Prettier
some.JS.Code;
//ignore this line from linting etc.
##Software will do some stuff here, but for JS it's an Error##
hereGoesJs();
是否有可能從 Visual Studio Code 中的 linting 和格式化中排除一行? 因為我需要這條線,但也需要代碼的其他部分的 Linting 和 Formatting ......
// I Tried
// eslint-disable-next-line no-use-before-define
// eslint-disable-line no-use-before-define
/*eslint-disable */
//suppress all warnings between comments
alert('foo');
/*eslint-enable */
// @ts-ignore
/* eslint-disable no-var */
var x = 'apple sauce';
/* eslint-enable no-var */
// Anything up here will still be affected by the linter.
/* eslint-disable */ // Disables everything from this point down
// eslint-disable-next-line
var x = 'apple sauce';
// or you can do this:
var y = 'apple sauce'; // eslint-disable-line
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.