- Install Prettier
- Update User Settings
{ "editor.formatOnPaste": false, "editor.formatOnSave": false, }
| // Place your key bindings in this file to overwrite the defaults | |
| [ | |
| { "key": "cmd+shift+t", "command": "workbench.action.terminal.toggleTerminal" }, | |
| { "key": "cmd+shift+7", "command": "editor.action.commentLine", | |
| "when": "editorTextFocus && !editorReadonly" }, | |
| { "key": "cmd+alt+shift+7", "command": "editor.action.blockComment", | |
| "when": "editorFocus" }, | |
| { "key": "ctrl+s", "command": "workbench.action.toggleSidebarVisibility" } | |
| ] |
| alias npm-reset="rm -rf node_modules && rm -f package-lock.json && npm install && npx node-notifier-cli -t 'Done' -m 'npm modules reinstalled' -s Glass -i https://cdn.rawgit.com/npm/logos/31945b5c/npm%20square/n-64.png" | |
| alias yarn-reset="rm -rf node_modules && rm -f yarn.lock && yarn && npx node-notifier-cli -t 'Done' -m 'npm modules reinstalled' -s Glass -i https://cdn.rawgit.com/yarnpkg/assets/ab1fa0d4/yarn-kitten-circle.png" |
{
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
}
| // Promisified setTimeout | |
| const delay = (duration = 0) => | |
| new Promise(resolve => | |
| setTimeout(() => { | |
| resolve(); | |
| }, duration) | |
| ); | |
| // Usage | |
| async function myFunction() { |