jsx_ignore.js 764 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // this should remain as-is
  2. <div>
  3. {/* prettier-ignore */}
  4. <style jsx global>{ComponentStyles}</style>
  5. </div>;
  6. // this should remain as-is
  7. <div>
  8. {/* prettier-ignore */}
  9. <span ugly format='' />
  10. </div>;
  11. // this should remain as-is
  12. f(
  13. <Component>
  14. {/*prettier-ignore*/}
  15. <span ugly format='' />
  16. </Component>
  17. );
  18. // this be formatted
  19. <div>
  20. {/* prettier-ignore */} foo
  21. <Bar excessive spaces />
  22. </div>;
  23. // this should remain as-is
  24. <div>
  25. {
  26. /* prettier-ignore */
  27. foo ( )
  28. }
  29. </div>;
  30. // this should remain as-is
  31. <div>
  32. {
  33. /* prettier-ignore */
  34. x ? <Y/> : <Z/>
  35. }
  36. </div>;
  37. push(
  38. // prettier-ignore
  39. <td> :)
  40. </td>,
  41. );
  42. function f() {
  43. return (
  44. // prettier-ignore
  45. /* $FlowFixMe(>=0.53.0) */
  46. <JSX />
  47. );
  48. }