Re:Angular 2 Style Guide
by andrewstuart2 on Thursday May 05, 2016 @01:00PM
(#11637814)
I'd highly recommend using something like eslint, which can be integrated into editors and CI flows to assist with most of the style guide choices (at least the never/always kind) that your organization makes.
Use some style guide as a base and then agree on your own internal exceptions/additions as a team, then just implement those rules, and eslint can let you know when you've forgotten something.
Personally, I find the editor (via Syntastic in vim) integration most helpful since it's more of a warning and not an overbearing release gate.
Yep, well aware and utilize plenty of linting. Javascript style is one thing, Angular (amongst other frameworks) leave much room for different styles of structure, modularization, dos/don'ts. It's important to agree on one set of framework styles as a team otherwise consistency of patterns could be a nightmare. Having an official style guide (which didn't exist with Angular 1) simplifies this...
Re:Angular 2 Style Guide
by lobo_tuerto on Thursday May 05, 2016 @12:59PM
(#11637801)
Lacking how? John Papa's style guide has been around for some time, and it's endorsed by the Angular team.
He is in charge of the Angular 2 style guide too. I bet he will do a good job with this one too.
Just to follow up. John Papa's original style guide was create after he had experience with building Angular 1 apps and got feedback from other developers. An Angular 2 style guide can't be fully formed right now because no one really knows what all of the best practices are yet. As all of us get more experience using Angular 2, the style guide will get better.
Having worked on various teams (now we follow https://github.com/johnpapa/angular-styleguide), its truly a maintenance nightmare without a verbose Angular style guide for reference.