When there is comment is jsx, the esformatter will crash reporting the following error:
"test.jsx" 10L, 242C written Error while executing esformatter! no changes made. Error: stdin Cannot read property 'value' of undefined TypeError: Cannot read property 'value' of undefined at getParentheses (/usr/lib/node_modules/esformatter/lib/hooks/expressionParentheses.js:26:66) at Object.addSpaceInsideExpressionParentheses [as addSpaceInside] (/usr/lib/node_modules/esformatter/lib/hooks/expressionParentheses.js:10:21) at transformNode (/usr/lib/node_modules/esformatter/lib/transform.js:78:25) at Array.forEach (native) at Object.moonwalk (/usr/lib/node_modules/esformatter/node_modules/rocambole/rocambole.js:432:11) at transform (/usr/lib/node_modules/esformatter/lib/transform.js:37:13) at doFormat (/usr/lib/node_modules/esformatter/lib/format.js:130:3) at Object.format (/usr/lib/node_modules/esformatter/lib/format.js:44:9) at toConsole (/usr/lib/node_modules/esformatter/lib/cli.js:214:26) at /usr/lib/node_modules/esformatter/lib/cli.js:85:7
When there is comment is jsx, the esformatter will crash reporting the following error:
"test.jsx" 10L, 242C written Error while executing esformatter! no changes made. Error: stdin Cannot read property 'value' of undefined TypeError: Cannot read property 'value' of undefined at getParentheses (/usr/lib/node_modules/esformatter/lib/hooks/expressionParentheses.js:26:66) at Object.addSpaceInsideExpressionParentheses [as addSpaceInside] (/usr/lib/node_modules/esformatter/lib/hooks/expressionParentheses.js:10:21) at transformNode (/usr/lib/node_modules/esformatter/lib/transform.js:78:25) at Array.forEach (native) at Object.moonwalk (/usr/lib/node_modules/esformatter/node_modules/rocambole/rocambole.js:432:11) at transform (/usr/lib/node_modules/esformatter/lib/transform.js:37:13) at doFormat (/usr/lib/node_modules/esformatter/lib/format.js:130:3) at Object.format (/usr/lib/node_modules/esformatter/lib/format.js:44:9) at toConsole (/usr/lib/node_modules/esformatter/lib/cli.js:214:26) at /usr/lib/node_modules/esformatter/lib/cli.js:85:7
After deleting the comment, it will works.
Test file: test.jsx.zip