Passiday / OOP-Cards

Library for card games
4 stars 8 forks source link

Add coding style restrictions #32

Open 3starblaze opened 4 years ago

3starblaze commented 4 years ago

As mentioned before, coding style restrictions lead to consistent and predictable code. One of the most popular styles: https://github.com/airbnb/javascript

Main changes

If we will use babel, then we need npm.

  1. Initialize package.json
  2. Install babel as dev dependency
  3. Configure npm and babel a bit

Travis

This restriction should also be enforced in travis, along with tests.

Refactoring

This code definitely won't pass style tests but, as far as I know, it shouldn't be too hard to refactor code. Just run it through linter, see if it looks okay and the process is done