added JS linting rules for fun and profit. cleaned up JS according to new rules