Add space before {

Ivan Vukovic, Software engineer@Shoutem

Consistently styled code can:

  • Reduce the lead time required to understand an implementation
  • Make it easier to establish what code can be reused
  • Clarify how updates to an implementation should be styled or structured (remember that consistent code, even when written by a team, should look like one person wrote it).

Why did we define it?

  • New teammates
  • Lots of undefined conventions
  • Code reviews had too much comments about code style

Popular js styles guides

  • Airbnb
  • jQuery
  • Grunt
  • Crockford
  • Google

And 1st solution was?

  • defined code style in README.md
  • .jscsrc file + linter

2nd try

pre-commit hook

Final solution

  • Jenkins CI instance with automatic status on PRs

  • status shows does requested merge have effect on code quality (ES Plato report)

  • comments if code is not follow the style guide 

What we expect from it?

  • Better product at the end
  • CR should be concentrated on solutions
  • Less effort on developers

Future

astii

(https://github.com/Vunovati/astii)

Thank you!!!

Add space

By Ivan Vukovic

Add space

  • 763