Skip to content

Commit

Permalink
chore(vscode): 🔧 add vscode extension recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Sep 10, 2020
1 parent 88175da commit 46afdb1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"orta.vscode-jest",
"tlent.jest-snapshot-language-support"
]
}
40 changes: 40 additions & 0 deletions .vscode/reakit.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"Reakit System TS Template": {
"prefix": "rk-ts-system",
"body": [
"import { ${2:ComposeComponent}HTMLProps, ${2:ComposeComponent}Options, use${2:ComposeComponent} } from \"reakit\";",
"import { createComponent, createHook } from \"reakit-system\";",
"",
"import { ${TM_FILENAME_BASE/(.*)/${1:/upcase}/}_KEYS } from \"./__keys\";",
"import { ${TM_FILENAME_BASE}StateReturn } from \"./${TM_FILENAME_BASE}State\";",
"",
"export type ${TM_FILENAME_BASE}Options = ${2:ComposeComponent}Options;",
"",
"export type ${TM_FILENAME_BASE}HTMLProps = ${2:ComposeComponent}HTMLProps;",
"",
"export type ${TM_FILENAME_BASE}Props = ${TM_FILENAME_BASE}Options & ${TM_FILENAME_BASE}HTMLProps;",
"",
"export const use${TM_FILENAME_BASE} = createHook<${TM_FILENAME_BASE}Options, ${TM_FILENAME_BASE}HTMLProps>({",
" name: \"${TM_FILENAME_BASE}\",",
" compose: use${2:ComposeComponent},",
" keys: ${TM_FILENAME_BASE/(.*)/${1:/upcase}/}_KEYS,",
"",
" useOptions(options, htmlProps) {",
" return options;",
" },",
"",
" useProps(options, htmlProps) {",
" return htmlProps;",
" },",
"});",
"",
"export const ${TM_FILENAME_BASE} = createComponent({",
" as: \"div\",",
" memo: true,",
" useHook: use${TM_FILENAME_BASE},",
"});",
""
],
"description": "Reakit System TS"
}
}

0 comments on commit 46afdb1

Please sign in to comment.