Coding style

You can customize the coding style enforcement and code generation behavior in VS Code and Angular CLI. When it comes to JavaScript, I prefer StandardJS settings, which codifies a minimal approach to writing code, while maintaining great readability. This means 2-spaces for tabs and no semicolons. In addition to the reduced keystrokes, StandardJS also takes less space horizontally, which is especially valuable when your IDE can only utilize half of the screen with the other half taken up by the browser. You can read more about StandardJS at: https://standardjs.com/.

With the default settings, your code will look like this:

import { AppComponent } from "./app.component";

With StandardJS settings, your code will look like this: ...

Get Angular 6 for Enterprise-Ready Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.