Skip to content

Instantly share code, notes, and snippets.

@h3ct0rjs
Forked from jdjuan/vscode-config.md
Created June 13, 2018 01:07
Show Gist options
  • Select an option

  • Save h3ct0rjs/39779bab26dd2cb3fa4e45d2d5bfbfc8 to your computer and use it in GitHub Desktop.

Select an option

Save h3ct0rjs/39779bab26dd2cb3fa4e45d2d5bfbfc8 to your computer and use it in GitHub Desktop.

Angular VSCode Config

1. Extensions

2. User Settings

{
  // GENERAL
  "workbench.startupEditor": "none",
  "workbench.colorTheme": "Cobalt2",
  "workbench.iconTheme": "vscode-icons",
  "vsicons.projectDetection.disableDetect": true,
  "vsicons.projectDetection.autoReload": true,
  "explorer.confirmDelete": false,
  "explorer.confirmDragAndDrop": 
  false,
  "html.format.wrapLineLength": 0,
  "window.zoomLevel": 0,
  "zenMode.centerLayout": false,
  // EDITOR
  "editor.formatOnType": true,
  "editor.formatOnSave": true,
  "editor.wordWrap": "on",
  "editor.minimap.enabled": false,
  // GIT
  "git.enableSmartCommit": true,
  "git.confirmSync": false,
  "git.autofetch": true,
  // TSLINT
  "tslint.alwaysShowRuleFailuresAsWarnings": true,
  "tslint.autoFixOnSave": true,
  // SORT TYPESCRIPT IMPORTS
  "typescript.extension.sortImports.sortOnSave": true,
  "typescript.updateImportsOnFileMove.enabled": "always",
  // PRETTIER
  "prettier.singleQuote": true,
  "prettier.trailingComma": "all",
  "prettier.arrowParens": "always",
  "prettier.printWidth": 90,
  // BEAUTIFY
  "beautify.ignore": [
    "**/**.js",
    "**/**.ts"
  ],
  "beautify.language": {
    "css": [
      "css",
      "scss"
    ],
  },
  "beautify.config": {
    "indent_size": 2,
    "css": {
      "newline_between_rules": true,
      "space_around_combinator": true,
      "selector_separator_newline": true
    },
    "html": {
      "wrap_attributes": "force-aligned"
    }
  },
}

Optional

  • Markdown all in one
  • Markdown Preview GitHub Styling
@h3ct0rjs
Copy link
Copy Markdown
Author

Hi, after checking this configuration, sometimes with the prettier option "prettier.arrowParens": "always", we get the following error :

● Validation Error:

  Option "arrowParens" must be of type:
    boolean
  but instead received:
    string

  Example:
  {
    "arrowParens": false
  }

to avoid this validation error, per project we should create a file called .prettierrc, it's mentioned here and here.
Best Regards,
Héctor F.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment