如何禁用WebStorm分号检查? [英] How to disable WebStorm semicolon check?

查看:285
本文介绍了如何禁用WebStorm分号检查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Node.js中禁用WebStorm分号检查?

How to disable WebStorm semicolon check in Node.js?

我尝试了以下方法,但是它们不起作用:

I have tried the following method but they do not work:

  • 签出选项use semicolon to terminate statement
  • 将JavaScript版本更改为ecma6

推荐答案

  1. Settings/Preferences | Editor | Inspections
  2. JavaScript | Code style issues | Unterminated statement-禁用此检查
  1. Settings/Preferences | Editor | Inspections
  2. JavaScript | Code style issues | Unterminated statement -- disable this inspection

您还可以通过以下方式达成相同的检查:

You can also reach the same inspection by:

  1. 将插入符放在编辑器中有问题的地方,并显示快速修复"菜单( Alt + Enter 或通过单击灯泡图标)
  2. 在出现的菜单中选择正确的选项(如果不确定哪一个,则对其中几个尝试第3步)
  3. 向右箭头(或单击右侧的小三角形)以打开子菜单
  4. 选择所需的动作
  1. Placing caret on problematic place in your Editor and bringing Quick Fix menu (Alt + Enter or by clicking on light bulb icon)
  2. Choosing right option in appeared menu (if not sure which one then try step #3 for few of them)
  3. Arrow Right (or click on small triangle on the right side) to open submenu
  4. Choose desired action

PS 如果您使用这些工具,JSLinh/JSHint等也可能会产生此类警告.

P.S. JSLinh/JSHint and alike may also produce such warnings if you are using these tools.

对于由IDE生成的实际代码(例如,当使用Code | Reformat...或使用代码完成弹出窗口/功能时)-此选项可在

As for the actual code generated by IDE (e.g. when using Code | Reformat... or using code completion popup/functionality) -- such option is available at

  • Settings/Preferences | Editor | Code Style | JavaScript(TypeScript的相似路径)
  • Punctuation标签
  • Settings/Preferences | Editor | Code Style | JavaScript (similar path for TypeScript)
  • Punctuation tab

这篇关于如何禁用WebStorm分号检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆