Skip to content

Instantly share code, notes, and snippets.

@sturmenta
Last active Sep 7, 2020
Embed
What would you like to do?
VSCode Config
{
"Console.log": {
"prefix": "clg",
"body": ["console.log(`$1`, $1)"],
"description": "console.log"
}
}
{
"workbench.iconTheme": "vscode-icons",
"git.enableSmartCommit": true,
"git.confirmSync": false,
"git.autofetch": true,
"editor.minimap.enabled": false,
"window.zoomLevel": 1,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"javascript.updateImportsOnFileMove.enabled": "never",
"explorer.compactFolders": false,
"sync.gist": "7cc3cd7ce832f0d01fe2134e284dd176",
"terminal.integrated.shell.osx": "/bin/zsh",
"workbench.colorTheme": "Monokai Mega",
"cSpell.userWords": ["Mikro", "postgresql", "resave", "twilio"],
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/node_modules": true
},
"[javascript]": {
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.tabSize": 2
},
"[typescriptreact]": {
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[graphql]": {
"editor.tabSize": 2
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true
}
{
// Place your snippets for typescriptreact here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Typescript React PureComponent": {
"prefix": "rpc",
"body": [
"import * as React from 'react'",
"",
"export class $1 extends React.PureComponent {",
"\trender() {",
"\t\treturn ($2);",
"}}"
],
"description": "Typescript React PureComponent"
},
"Typescript React Function Component": {
"prefix": "rh",
"body": [
"import React from 'react'",
"",
"interface ${TM_FILENAME_BASE}Props {",
"$1",
"}",
"",
"export const $TM_FILENAME_BASE: React.FC<${TM_FILENAME_BASE}Props> = ({$2}) => {",
"\t\treturn ($3);",
"}"
],
"description": "Typescript React Function Component"
},
"React Native StyleSheet": {
"prefix": "rnss",
"body": [
"import {StyleSheet} from 'react-native'",
"const styles = StyleSheet.create({",
"",
"});"
],
"description": "React Native StyleSheet"
},
"Toggle State": {
"prefix": "tog",
"body": ["this.setState(state => ({", "\topen: !state.open", "}));"],
"description": "toggle state"
},
"console.log": {
"prefix": "cl",
"body": ["console.log($1)"],
"description": "console.log"
},
"className={classnames()}": {
"prefix": "cc",
"body": ["className={classnames('$1')}"],
"description": "tailwind react stuff"
},
"Apollo Query Component": {
"prefix": "apq",
"body": [
"interface Props {",
" children: (data: QueryResult<$1, OperationVariables>) => JSX.Element;",
"}",
"",
"export class $2 extends React.PureComponent<Props> {",
" render() {",
" return (",
" <Query<$1> query={$3}>{x => this.props.children(x)}</Query>",
" );",
" }",
"}"
],
"description": "Apollo Query Component"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment