4 ms·
I'm really excited to see there will be an official style guide that was truly lacking in v1.x Having worked on various teams (now we follow https://github.com
by r0m4n0 10y ago
I'm really excited to see there will be an official style guide that was truly lacking in v1.x
Having worked on various teams (now we follow https://github.com/johnpapa/angular-styleguide https://github.com/johnpapa/angular-styleguide), its truly a maintenance nightmare without a verbose Angular style guide for reference.
- lobo_tuerto 10y agoLacking 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.
- devNoise 10y agoJust 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.
- r0m4n0 10y agoEndorsed vs official are two different things. There are many style guides (and some don't agree with the entire John Papa style guide leaving room for reasonable debate)
- andrewstuart2 10y agoI'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.
- r0m4n0 10y agoYep, 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...