webstorm(临时)Eslint-Error“无轨道空间”在两种方法之间添加newline时
我正在使用Jetbrains在Webstorm IDE中使用Typescript(Angular)。
编码时,显然您需要在方法定义之间进行新线,以视觉上分开它们。
每次我在两个方法定义之间放置新线时,都会出现错误“无径向空间”。
这就是IDE中的Code-Interface在插入newline之前的外观:
在将newline字符(即,击中 Enter 键)之后第71行,这发生了:
编辑:
实际上,在编写本文时,我意识到,移动光标和 alt + alt + tab 外出并返回Webstorm,因此这可能是Webstorm的错,而不是Eslint的错。
仍然决定发布此内容。也许有人知道如何使这种“光标移动 + alt-tab”没有必要,因为它仍然令人讨厌/分散注意力
I am using TypeScript (Angular) in the WebStorm IDE by JetBrains.
When coding, obviously you would want a newline between method-definitions, to separate them visually.
Every time I put a newline between two method-definitions squiggly lines and the error "no-trailing-spaces" appears.
This is how the code-interface in the IDE looks before inserting the newline:
After putting a newline character (that is, hitting the Enter key) with the cursor at the end of line 71, this happens:
EDIT:
Actually, while writing this, I realized the error goes away a few seconds after you move the cursor and Alt + Tab out and back into WebStorm, so it's probably the fault of WebStorm and not ESLint.
Still decided to post this. Maybe someone knows how to make this "cursor-movement + alt-tab" not necessary as it is still irritating/distracting having red squiggly lines show up after you don't do anything wrong.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论