jsfmt.spec.js.snap 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`ignore.js 1`] = `
  3. function a() {
  4. // prettier-ignore
  5. var fnString =
  6. '"' + this.USE + ' ' + this.STRICT + '";\\n' +
  7. this.filterPrefix() +
  8. 'var fn=' + this.generateFunction('fn', 's,l,a,i') +
  9. extra +
  10. this.watchFns() +
  11. 'return fn;';
  12. // prettier-ignore
  13. const identity = Matrix.create(
  14. 1, 0, 0,
  15. 0, 1, 0,
  16. 0, 0, 0
  17. );
  18. // Let's make sure that this comment doesn't interfere
  19. // prettier-ignore
  20. const commentsWithPrettierIgnore = {
  21. "ewww":
  22. "gross-formatting",
  23. };
  24. function giveMeSome() {
  25. a( a ); // prettier-ignore
  26. // shouldn't I return something? :shrug:
  27. }
  28. // prettier-ignore
  29. console.error(
  30. 'In order to use ' + prompt + ', you need to configure a ' +
  31. 'few environment variables to be able to commit to the ' +
  32. 'repository. Follow those steps to get you setup:\\n' +
  33. '\\n' +
  34. 'Go to https://github.com/settings/tokens/new\\n' +
  35. ' - Fill "Token description" with "' + prompt + ' for ' +
  36. repoSlug + '"\\n' +
  37. ' - Check "public_repo"\\n' +
  38. ' - Press "Generate Token"\\n' +
  39. '\\n' +
  40. 'In a different tab, go to https://travis-ci.org/' +
  41. repoSlug + '/settings\\n' +
  42. ' - Make sure "Build only if .travis.yml is present" is ON\\n' +
  43. ' - Fill "Name" with "GITHUB_USER" and "Value" with the name of the ' +
  44. 'account you generated the token with. Press "Add"\\n' +
  45. '\\n' +
  46. 'Once this is done, commit anything to the repository to restart ' +
  47. 'Travis and it should work :)'
  48. );
  49. // Incorrectly indented on purpose
  50. function f</* prettier-ignore */ T : B>(
  51. a : Array < number > // prettier-ignore
  52. ) {
  53. call(
  54. f( 1 )
  55. // prettier-ignore
  56. )
  57. }
  58. }
  59. const response = {
  60. // prettier-ignore
  61. '_text': 'Turn on the lights',
  62. intent: 'lights',
  63. };
  64. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  65. function a() {
  66. // prettier-ignore
  67. var fnString =
  68. '"' + this.USE + ' ' + this.STRICT + '";\\n' +
  69. this.filterPrefix() +
  70. 'var fn=' + this.generateFunction('fn', 's,l,a,i') +
  71. extra +
  72. this.watchFns() +
  73. 'return fn;';
  74. // prettier-ignore
  75. const identity = Matrix.create(
  76. 1, 0, 0,
  77. 0, 1, 0,
  78. 0, 0, 0
  79. );
  80. // Let's make sure that this comment doesn't interfere
  81. // prettier-ignore
  82. const commentsWithPrettierIgnore = {
  83. "ewww":
  84. "gross-formatting",
  85. };
  86. function giveMeSome() {
  87. a( a ); // prettier-ignore
  88. // shouldn't I return something? :shrug:
  89. }
  90. // prettier-ignore
  91. console.error(
  92. 'In order to use ' + prompt + ', you need to configure a ' +
  93. 'few environment variables to be able to commit to the ' +
  94. 'repository. Follow those steps to get you setup:\\n' +
  95. '\\n' +
  96. 'Go to https://github.com/settings/tokens/new\\n' +
  97. ' - Fill "Token description" with "' + prompt + ' for ' +
  98. repoSlug + '"\\n' +
  99. ' - Check "public_repo"\\n' +
  100. ' - Press "Generate Token"\\n' +
  101. '\\n' +
  102. 'In a different tab, go to https://travis-ci.org/' +
  103. repoSlug + '/settings\\n' +
  104. ' - Make sure "Build only if .travis.yml is present" is ON\\n' +
  105. ' - Fill "Name" with "GITHUB_USER" and "Value" with the name of the ' +
  106. 'account you generated the token with. Press "Add"\\n' +
  107. '\\n' +
  108. 'Once this is done, commit anything to the repository to restart ' +
  109. 'Travis and it should work :)'
  110. );
  111. // Incorrectly indented on purpose
  112. function f</* prettier-ignore */ T : B>(
  113. a : Array < number > // prettier-ignore
  114. ) {
  115. call(
  116. f( 1 )
  117. // prettier-ignore
  118. );
  119. }
  120. }
  121. const response = {
  122. // prettier-ignore
  123. '_text': 'Turn on the lights',
  124. intent: "lights"
  125. };
  126. `;