Skip to content

Instantly share code, notes, and snippets.

@thefinnomenon
Last active April 28, 2020 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefinnomenon/412d0ac5fcf8030841d37c6cc6f427a4 to your computer and use it in GitHub Desktop.
Save thefinnomenon/412d0ac5fcf8030841d37c6cc6f427a4 to your computer and use it in GitHub Desktop.
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-04-28T23:44:19.224Z","extensionVersion":"v3.4.3"}
[
{
"metadata": {
"id": "ac5787df-9b2d-441c-abf0-977d62bc66f0",
"publisherId": "amazonwebservices.aws-toolkit-vscode",
"publisherDisplayName": "amazonwebservices"
},
"name": "aws-toolkit-vscode",
"publisher": "amazonwebservices",
"version": "1.8.0"
},
{
"metadata": {
"id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd",
"publisherId": "Shan.code-settings-sync",
"publisherDisplayName": "Shan"
},
"name": "code-settings-sync",
"publisher": "Shan",
"version": "3.4.3"
},
{
"metadata": {
"id": "1ec62ca5-d7f9-4ddb-a882-e8d018c0aefd",
"publisherId": "msjsdiag.debugger-for-chrome",
"publisherDisplayName": "msjsdiag"
},
"name": "debugger-for-chrome",
"publisher": "msjsdiag",
"version": "4.12.6"
},
{
"metadata": {
"id": "8ee0c715-ca9e-4ce2-8841-5faa5e0f3255",
"publisherId": "andys8.jest-snippets",
"publisherDisplayName": "andys8"
},
"name": "jest-snippets",
"publisher": "andys8",
"version": "1.8.0"
},
{
"metadata": {
"id": "96fa4707-6983-4489-b7c5-d5ffdfdcce90",
"publisherId": "esbenp.prettier-vscode",
"publisherDisplayName": "esbenp"
},
"name": "prettier-vscode",
"publisher": "esbenp",
"version": "4.5.0"
},
{
"metadata": {
"id": "0479fc1c-3d67-49f9-b087-fb9069afe48f",
"publisherId": "ms-azuretools.vscode-docker",
"publisherDisplayName": "ms-azuretools"
},
"name": "vscode-docker",
"publisher": "ms-azuretools",
"version": "1.1.0"
},
{
"metadata": {
"id": "55ef6448-487b-49a0-a66e-4d2d9bb82229",
"publisherId": "Prisma.vscode-graphql",
"publisherDisplayName": "Prisma"
},
"name": "vscode-graphql",
"publisher": "Prisma",
"version": "0.2.14"
}
]
{
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"editor.formatOnSave": true,
"editor.tabSize": 2,
"window.zoomLevel": 1,
"breadcrumbs.enabled": false,
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[graphql]": {},
"typescript.updateImportsOnFileMove.enabled": "always",
"aws.samcli.location": "/usr/local/bin/sam",
"aws.telemetry": false,
"eslint.alwaysShowStatus": true,
"eslint.packageManager": "yarn",
"jest.restartJestOnSnapshotUpdate": true,
"jest.showCoverageOnLoad": true,
"jest.autoEnable": false,
"extensions.ignoreRecommendations": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"sync.autoUpload": true,
"sync.quietSync": true,
"sync.gist": "412d0ac5fcf8030841d37c6cc6f427a4",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
{
"Create a TypeScript Component": {
"prefix": "component--ts",
"body": [
"import React from 'react';",
"import { StyleSheet, View } from 'react-native';",
"",
"type Props = {$1} & typeof defaultProps;",
"",
"const defaultProps = Object.freeze({$2});",
"const initialState = Object.freeze({$3});",
"",
"export const ${4:ComponentName} = (props: Props) => {",
" return (",
" <View style={styles.container}>",
" $0",
" </View>",
" );",
"};",
"",
"const styles = StyleSheet.create({",
" container: {",
" flex: 1,",
" },",
"});",
"",
"${4:ComponentName}.defaultProps = defaultProps;",
"",
"export default ${4:ComponentName};"
],
"description": "Creates a Typed Hooked Functional Component"
},
"Create a TypeScript Component w/ Styled-Components": {
"prefix": "component--ts-sc",
"body": [
"import React from 'react';",
"import {} from 'react-native';",
"import styled from 'styled-components/native';",
"",
"type Props = {$1} & typeof defaultProps;",
"",
"const defaultProps = Object.freeze({$2});",
"const initialState = Object.freeze({$3});",
"",
"export const ${4:ComponentName} = (props: Props) => {",
" return (",
" <Container>",
" $0",
" </Container>",
" );",
"};",
"",
"const Container = styled.View`",
" flex: 1;",
"`;",
"",
"${4:ComponentName}.defaultProps = defaultProps;",
"",
"export default ${4:ComponentName};"
],
"description": "Creates a Typed Hooked Functional Component"
},
"Create a Typed Class Component": {
"prefix": "component-class-ts",
"body": [
"import React, { Component } from 'react';",
"import { StyleSheet, View } from 'react-native';",
"",
"type Props = {$1} & typeof defaultProps;",
"const defaultProps = Object.freeze({$2});",
"",
"type State = typeof initialState;",
"const initialState = Object.freeze({$3});",
"",
"export class ${4:ComponentName} extends Component<Props, State> {",
" public readonly state = initialState;",
" public static readonly defaultProps = defaultProps;",
"",
" render() {",
" // const {} = this.props;",
" // const {} = this.state;",
"",
" return (",
" <View style={styles.container}>",
" $0",
" </View>",
" );",
" }",
"}",
"",
"const styles = StyleSheet.create({",
" container: {",
" flex: 1,",
" },",
"});",
"",
"export default ${4:ComponentName};"
],
"description": "Creates a Typed Class Component"
},
"Create an arrow function": {
"prefix": "arrow",
"body": ["const ${1:functionName} = (${2:params}) => {"," $0","};"],
"description": "Creates an arrow function"
},
"Create useState hook": {
"prefix": "hook--state",
"body": ["const [${1:state}, ${2:setState}] = useState(${3:initialState});"],
"description": "Create useState hook"
},
"Create useEffect hook": {
"prefix": "hook-effect",
"body": ["useEffect((${1:params}) => {"," $0", " //return function cleanup(){};","}, [${1:params}]);"],
"description": "Create useEffect hook"
},
"Create Type": {
"prefix": "type",
"body": [
"type ${1:Element}Type = {"," $0","};",
],
"description": "Create a type"
},
"Create Props": {
"prefix": "props",
"body": [
"type Props = {"," $0", "} & typeof defaultProps;",
"const defaultProps = Object.freeze({});",
"$1.defaultProps = defaultProps;",
],
"description": "Creates a Props type and defaultProps"
},
"Add StyleSheet": {
"prefix": "stylesheet",
"body": [
"const styles = StyleSheet.create({",
" $0",
"});"
],
"description": "Adds a new StyleSheet",
},
"Import Debug": {
"prefix": "import-debug",
"body": [
"import Debug from 'debug';",
"Debug.enable('*');",
"const debug = Debug('${1:debug-identifier}');"],
"description": "Import and configure debug library"
},
"Create Debug": {
"prefix": "debug",
"body": [
"debug('$1', $0);",
],
"description": "Create a debug log"
},
"Map Over Object Entries": {
"prefix": "map-object-entries",
"body": [
"Object.entries(${1:ObjectName}).map(([${2:key}, ${3:value}]) => {", " $0", "})"
],
"description": "Map over an object's entries"
},
"Map Over Object Keys": {
"prefix": "map-object-keys",
"body": [
"Object.keys(${1:ObjectName}).map(${2:key} => {", " $0", "})"
],
"description": "Map over an object's keys"
},
"Map Over Object Values": {
"prefix": "map-object-values",
"body": [
"Object.values(${1:ObjectName}).map(${2:value} => {", " $0", "})"
],
"description": "Map over an object's values"
},
"Console Log": {
"prefix": "con",
"body": [
"console.log(`$0`);",
],
"description": "Console Log"
},
"Create Touchable Opacity Element": {
"prefix": "touch",
"body": [
"<TouchableOpacity style={${1}} onPress={() => ${2}}>${0}</TouchableOpacity>",
],
"description": "Create a TouchableOpacity element"
},
"TS Ignore Next Line": {
"prefix": "ts-ignore",
"body": [
"// @ts-ignore",
],
"description": "Disable TypeScript checking for the line that follows."
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment