Skip to content

Latest commit

 

History

History
157 lines (119 loc) · 4.65 KB

lecture.md

File metadata and controls

157 lines (119 loc) · 4.65 KB

Lecture 1

Welcome

Welcome

IDE setup and configuration

IDE extensions

VScode:
WebStorm:

Code snippets, multicursors, hotkeys

Snippets
Multicursors
Hotkeys

pdf cheat sheet: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf

BEM

Code style

code for .prettierrc

{
    "printWidth": 120,
    "singleQuote": true,
    "useTabs": false,
    "tabWidth": 2,
    "semi": true,
    "bracketSpacing": true
  }

code for .editorconfig

# Editor configuration, see https://editorconfig.org

root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]

max_line_length = off
trim_trailing_whitespace = false

Vscode settings for prettier formatOnSave

(ctrl+shift+P, select settings.json)

// Enable per-language
"[javascript]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "esbenp.prettier-vscode"
},

ESLint

{
  "extends": "eslint:recommended",
  "rules": {
    "indent": ["error", 2],
    "linebreak-style": ["error", "unix"],
    "quotes": ["error", "single"],
    "semi": ["error", "always"],
    "object-curly-spacing": ["error", "always"],
    "template-curly-spacing": ["error", "always"],
    "no-cond-assign": ["error", "always"],
    "no-console": "off",
    "eol-last": "error"
  },
  "env": {
    "es6": true,
    "node": true,
    "mocha": true
  },
  "parserOptions": {
    "ecmaVersion": 8
  }
}