简体   繁体   English

我如何配置 eslint 或 prettier 以忽略内联注释?

[英]How do i configure eslint or prettier to ignore inline comment?

How can I get prettier or eslint to leave comments on same line with code.我怎样才能让 prettier 或 eslint 在代码的同一行留下评论。 This is what I have:这就是我所拥有的:

/'use strict'; // code assumes ECMAScript 6

When I run prettier and eslint, I get this:当我运行 prettier 和 eslint 时,我得到了这个:

'use strict';

// code assumes ECMAScript 6

How can I configure either to leave the code with the comment on same line?我如何配置将代码和注释留在同一行?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM