Hyperapp code intellisence in WebStorm

152 views Asked by At

Is there a plugin for Hyperapp support in WebStorm or a way to set up intellisense to not flash with errors?

Currently, the editor sees components as React components, which is close but not ideal.

Update:

Similar to Preact, Hyperapp uses e.g. class instead of className.

Screenshot with JS version set to ES6:

enter image description here

Screenshot with JS version set to React JSX:

enter image description here

2

There are 2 answers

0
Miroslav Jonas On BEST ANSWER

My solution (albeit unplanned) at the end was to switch from javascript to typescript. By converting the solution to typescript error disappeared from IDE. Hyperapp has support for typing so that works nicely with TSLINT and intellisense.

Important compiler option parameters to make it work:

"jsx": "react",
"jsxFactory": "h",
2
Ekaterina Prigara On

To disable the warning about the class attribute, place the caret on it, press Alt-Enter and select Add 'class' to custom attributes.