小编Nic*_*ner的帖子

忽略来自 linting 和格式化的行 - 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();
Run Code Online (Sandbox Code Playgroud)

是否有可能从 Visual Studio Code 中的 linting 和格式化中排除一行?因为我需要该行,但还需要代码其他部分的 Linting 和格式化...

// 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
        
Run Code Online (Sandbox Code Playgroud)

javascript typescript visual-studio-code prettier-eslint

5
推荐指数
1
解决办法
5301
查看次数