implement --checkstyle by copying jslinreporter
Removed some duplicate code and fixed line lengths.
Merge branch 'checkstyle' Fixes #184