yauh / meteor-with-style

Repository to showcase using different linters with the Meteor platform
36 stars 8 forks source link

Meteor code in style

This repository contains a simple Meteor application that shows how to

You can find the associated slides on slideshare and an associated post on my blog. Also this repository contains a sample Meteor application so you can get started with some style experiments on your own.

Why worry about style?

Two reasons why you should decide on a style and enforce it:

  1. It becomes easier to understand code written by other developers
  2. (Dumb) compile errors can be avoided

Style includes naming conventions, formatting, commenting, patterns, and other areas teams would like to keep consistent.

How to find the right style?

A good coding style minimizes ambiguity and makes it easy for team members to read other developer's code.

For Meteor projects it is a good idea to look at the offical MDG Style Guide.

How to enforce a certain style?

Before there were computers there were code reviews to identify violations of style guidelines. Static code analysis tools will produce reports of all found violations.

Enforcing a certain style becomes easier when using a supporting editor configuration as well as tools that are capable of pointing out violations of style rules. Ideally the editor is capable of beautifiying the code adhering to style conventions.