cheatsheets

Visual Studio Code Cheatsheet - https://code.visualstudio.com/

Edytor tekstu, który posiada następujące funkcje ułatwiające development:

Konfiguracja

Moje publiczna konfiguracja edytora Visual Studio Code:
https://github.com/piecioshka/dotfiles/blob/main/configs/vsc/settings.json

Skróty klawiaturowe / Hotkeys / Keyboard shortcuts

Dla systemów innych niż macOS należy zamiast Ctrl użyć Cmd.

Snippets

Core
{
    "Immediately-invoked function expression": {
        "prefix": "iife",
        "body": [
            "(function () {\n\t$1\n})();"
        ]
    }
}
CommonJS
{
    "Define CommonJS module": {
        "prefix": "mx",
        "body": [
            "module.exports = {\n\t$1\n}"
        ]
    }
}
ECMAScript 2015+
{
    "Lamba": {
        "prefix": "l",
        "body": [
            "() => {\n\t$1\n}"
        ]
    }
}
Testing
{
    "Testing: describe": {
        "prefix": "de",
        "body": [
            "describe('$1', () => {\n\t$2\n});"
        ]
    },
    "Testing: suite": {
        "prefix": "su",
        "body": [
            "suite('$1', () => {\n\t$2\n});"
        ]
    },
    "Testing: it": {
        "prefix": "it",
        "body": [
            "it('$1', () => {\n\t$2\n});"
        ]
    },
    "Testing: test": {
        "prefix": "tt",
        "body": [
            "test('$1', () => {\n\t$2\n});"
        ]
    },
    "Testing: expect": {
        "prefix": "ex",
        "body": [
            "expect($1).$2"
        ]
    },
    "Testing: assert": {
        "prefix": "ae",
        "body": [
            "assert.equal($1, $2);"
        ]
    }
}

Themes

Extensions

Must have

GitHub extensions

AI 🤖

Binary

Diagrams

Recommended

Not Recommended (doesn’t work for me)

Trainer 🎓

Framework / Angular

Framework / Svelte

Tools / Flow

HTML

CSS

Helpful plugins 🛠

Fancy plugins 🍬

Display EOL (End Of Line)

Tested and no longer used


Feature: Simple Browser 🔍

  1. Cmd + Shift + P
  2. Type: Simple Browser
  3. Enter an URL

Feature: Disable validation (inspection)

All options:

{
    "javascript.validate.enable": false,
    "typescript.validate.enable": false,
    "html.validate.scripts": false,
    "html.validate.styles": false,
}

https://stackoverflow.com/questions/59056875/disable-vs-code-javascript-check

Feature: Enable type checking

https://code.visualstudio.com/Docs/languages/javascript#_type-checking

Polecane źródła