Angular 6 for Enterprise:Ready Web Applications
上QQ阅读APP看书,第一时间看更新

IDE settings

You can share such settings with your coworkers by creating a .vscode folder in the root of your project directory and placing a settings.json file in it. If you commit this file to the repository, everyone will share the same IDE experience. Unfortunately, inpiduals aren't able to override these settings with their own local preferences, so ensure that shared settings are minimal and are agreed upon as a team norm.

Here are the customizations that I use for an optimal, battery-life conscious Angular development experience:

.vscode/settings.json
{
"editor.tabSize": 2,
"editor.rulers": [90, 140],
"files.trimTrailingWhitespace": true,
"files.autoSave": "onFocusChange",
"editor.cursorBlinking": "solid",
"workbench.iconTheme": "material-icon-theme", // Following setting
requires Material Icon
Theme Extension
"git.enableSmartCommit": true,
"editor.autoIndent": true,
"debug.openExplorerOnEnd": true,
"auto-close-tag.SublimeText3Mode": true, // Following setting
requires Auto Close Tag
Extension
"explorer.openEditors.visible": 0,
"editor.minimap.enabled": false,
"html.autoClosingTags": false,
"git.confirmSync": false,
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"prettier.printWidth": 90, // Following setting requires
Prettier Extension
"prettier.semi": false,
"prettier.singleQuote": true,
"prettier.trailingComma": "es5",
"typescriptHero.imports.insertSemicolons": false, // Following setting
requires TypeScriptHero
Extension
"typescriptHero.imports.multiLineWrapThreshold": 90,
}

Additionally, you may enable the following settings in VS Code for a richer development experience:

"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"npm.enableScriptExplorer": true