Guest User

Untitled

a guest
Feb 17th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. // How To Use
  2. // ==========================================
  3. // `cmd + shift + p` in VSCode:
  4. // - Type `Configure User Snippets`
  5. // - Create new global snippets file
  6.  
  7. //{
  8. // Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
  9. // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
  10. // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
  11. // used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
  12. // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
  13. // Placeholders with the same ids are connected.
  14. // Example:
  15. // "Print to console": {
  16. // "scope": "javascript,typescript",
  17. // "prefix": "log",
  18. // "body": [
  19. // "console.log('$1');",
  20. // "$2"
  21. // ],
  22. // "description": "Log output to console"
  23. // }
  24. //}
  25.  
  26. {
  27. "eslint-disable-props": {
  28. "prefix": "eslint-props",
  29. "body": [
  30. "/* eslint-disable react/prop-types */",
  31. ],
  32. "description": "eslint-disable prop-types"
  33. },
  34. "rem": {
  35. "prefix": "rem",
  36. "body": [
  37. "${rem('${0:pixel}')}",
  38. ],
  39. "description": "Polished rem"
  40. },
  41. "theme": {
  42. "prefix": "theme",
  43. "body": [
  44. "${({ theme }) => theme.typography.${0:typography}};",
  45. ],
  46. "description": "theme"
  47. },
  48. "above": {
  49. "prefix": "above",
  50. "body": [
  51. "import { above } from '@autogravity/web-styles';",
  52. "\t${above(",
  53. "\t'$0',",
  54. "\t`$1",
  55. "\t`,",
  56. ")};",
  57. ],
  58. "description": "above"
  59. },
  60. "jest_describe": {
  61. "prefix": "jest describe",
  62. "body": [
  63. "describe('${1:string}', () => {",
  64. "\t$0",
  65. "})"
  66. ],
  67. "description": "Jest Describe"
  68. },
  69. "jest_beforeEach": {
  70. "prefix": "jest beforeEach",
  71. "body": [
  72. "beforeEach(() => {",
  73. "\t$0",
  74. "})"
  75. ],
  76. "description": "Jest Before Each"
  77. },
  78. "jest_test": {
  79. "prefix": "jest test",
  80. "body": [
  81. "test('${1:string}', () => {",
  82. "//Arrange--------------",
  83. "${2:string}",
  84. "//Act------------------",
  85. "//Assert---------------",
  86. "\t$0",
  87. "})"
  88. ],
  89. "description": "Jest Test"
  90. },
  91. "jest_comments": {
  92. "prefix": "jest comments",
  93. "body": [
  94. "//Arrange--------------",
  95. "${1:string}",
  96. "//Act------------------",
  97. "//Assert---------------"
  98. ],
  99. "description": "Jest Comments"
  100. }
  101. }
Add Comment
Please, Sign In to add comment