Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 791 Bytes

02-linting.md

File metadata and controls

44 lines (30 loc) · 791 Bytes

Linting

Editor setup

VS Code

  1. Install eslint add-on for VSCode. VSCode marketplace
  2. ⇧ ⌘ P, or for linux ctrl ⇧ P - open command pallete
  3. Preferences: Open Settings (JSON) or Preferences: Open Workspace Settings (JSON)
  4. Add the following to enable fixing auto fixable problems on file save:
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }

Javascript and Typescript

You can lint the code (js,jsx,ts,tsx) with:

yarn lint

You can fix the errors with:

yarn lint:fix

Styles

You can lint the code (scss,css) with:

yarn lint:styles

You can fix the errors with:

yarn lint:styles:fix