0

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

Miroslav Jonas
  • 5,407
  • 1
  • 27
  • 41
  • WebStorm provides no support for this framework, and i'm not aware of any plugins for Hyperapp:( Please feel free to file a request for providing Hyperapp support to youtrack, https://youtrack.jetbrains.com/issues/WEB – lena Aug 16 '18 at 11:53
  • How about Preact? Its code syntax is similar to Hyperapp. – Miroslav Jonas Aug 16 '18 at 12:32
  • Preact is also not supported, and no custom plugins are there – lena Aug 16 '18 at 13:24

2 Answers2

0

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

Ekaterina Prigara
  • 4,697
  • 3
  • 21
  • 17
  • This solves one part of the problem. Second is then "JSX is used without importing hyperapp". Webstorm would like `import * as hyperapp from 'hyperapp'` but that naturally breaks the app. – Miroslav Jonas Aug 20 '18 at 07:50
  • You can disable the inspection called Missing React import with JSX in Preferences | Editor | Inspections. – Ekaterina Prigara Aug 20 '18 at 11:50
0

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",
Miroslav Jonas
  • 5,407
  • 1
  • 27
  • 41