Is there a way I can disable Typescript code analy

2019-07-27 04:05发布

问题:

The title says it all. I currently have the typescript 0.9 compiler installed on my system, but Intellij only supports the 0.8 language style (e.g. bool instead of boolean). Is there a way to disable it?

I have Idea Intellij 12.1.3.

回答1:

There are some settings for this - depending on whether you are seeing intentions or inspections. If you open settings and head for...

"Project Settings" and then "Inspections" and click "Reset to empty"

You can also hit the unhappy-face in the bottom-right corner and slide the inspection level between "None", "Syntax" and "Inspections".

You can also suppress specific issues using the red light-bulb icon. It will add a comment such as this:

//noinspection JSUnresolvedFunction

This also gives you clues about the fact that TypeScript inspections are actually JavaScript inspections.

Or

"IDE Settings" and then "Intentions" and un-tick the boxes you don't want to run.



回答2:

IntelliJ 12 only supports TypeScript 0.8.

You can download the EAP version for IntelliJ from http://confluence.jetbrains.com/display/IDEADEV/IDEA+13+EAP where they added support for TypeScript 0.9 features.