Config VS Code

  • change the default formatter
    shift + cmd + P,
    Format Document With…
    Configure Default Formatter…
    choose TypeScript and JavaScript Language Features as default

    Prettier will cause a lot of changes and we cant not find out the really changes in the git commit logs for a new file that was modified with Prettier.

  1. open settings using cmd+,

    (1) search space brace, enable following 2 options:

    • JavaScript › Format: Insert Space After Opening And Before Closing Template String Braces
    • TypeScript › Format: Insert Space After Opening And Before Closing Template String Braces
      (2) search ‘Auto Save’, choose onFocusChange

你可能感兴趣的:(web前端,经验分享)