[英]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();
Is there a possibility to exlude a line from linting and formatting in Visual Studio Code?是否有可能从 Visual Studio Code 中的 linting 和格式化中排除一行? Because I need the line, but also need Linting and Formatting for the other part of the Code...
因为我需要这条线,但也需要代码的其他部分的 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.