4

I would like to insert TODO comments on a React JSX file, a regular JavaScript comments are parsed as text and rendered in my component PhpStorm list them in in TODO tool window

// TODO any comments ... 
or 
/* TODO an other todo task*/ 

in case when I use a JSX comment like this

{/* TODO an other todo task*/}

PhpStorm ignore the TODO and consider it as simple comment, there is a way to insert a TODO with PhpStorm in React JSX file or there is a lack in PhpStorm support for react and it's requires an enhancement.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Ait Yahia Idir
  • 370
  • 4
  • 18

3 Answers3

3

looks similar to WEB-23401, please follow it for updates

lena
  • 90,154
  • 11
  • 145
  • 150
0
use the below comment it worked for me writing todo's
/**
   @todo: right your todo comment here
**/
surbhi241
  • 81
  • 1
  • 2
0

Old question but I'm gonna chime in for future visitors.

This worked for me:

{/* //TODO blablabla */}

It's a bit weird (you'll see for yourself), but it highlights as a TODO, throws no errors and is picked up by TODO indexing tools

AX2
  • 135
  • 12