webstorm(临时)Eslint-Error“无轨道空间”在两种方法之间添加newline时

发布于 2025-02-10 18:19:07 字数 778 浏览 2 评论 0原文

我正在使用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:

image before

After putting a newline character (that is, hitting the Enter key) with the cursor at the end of line 71, this happens:

image after

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文