This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
SMALL: string, | |
MEDIUM: string, | |
LARGE: string, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const BUTTON_SIZES = { | |
SMALL: 'small', | |
MEDIUM: 'medium', | |
LARGE: 'large', | |
} as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in ./assets/**/*.svg | |
do | |
npx svgo $file "$file" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vuex, { Store } from 'vuex'; | |
import { createLocalVue, shallowMount } from '@vue/test-utils'; | |
import $NAME$ from './$NAME$.vue'; | |
describe('$NAME$', () => { | |
const createComponent = ({} = {}) => { | |
const localVue = createLocalVue(); | |
localVue.use(Vuex); | |
const store = new Store({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global core.excludesfile ~/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in src/**/*.js; do | |
git mv "$f" "${f%.js}.ts" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq '.dependencies | keys | .[]' package.json | xargs yarn add | |
jq '.devDependencies | keys | .[]' package.json | xargs yarn add --dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-check | |
module.exports = function (fileInfo, api, options) { | |
const j = api.jscodeshift | |
const ast = j(fileInfo.source); | |
const isContainsReducerInName = a => a.value.id.name === 'delayedEmailsReducer'; | |
const hasTwoNodesInBody = a => a.value.body.length === 2; | |
const isSecondElementBreak = a => a.value.body[1].type === 'BreakStatement'; | |
const isFirstElementExpression = a => a.value.body[0].type === 'ExpressionStatement'; | |
const isFirstElementAssignment = ({operator, leftName}) => a => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Place your create-espeo-app workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and | |
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope | |
// is left empty or omitted, the snippet gets applied to all languages. 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: | |
"Create type safe action": { | |
"scope": "typescript", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Data { | |
fn(arg: string): Array<string> | |
fn(arg: number): null | |
} | |
let data: Data; | |
const a = data.fn(42); // null | |
const b = data.fn("str"); // Array<string> | |
interface API { |