Reapplied patch from @projectxmaker
https://github.com/strongloop/loopback/commit/4d7ef02795697c8d96a1dbec4217357caf21fc59
https://github.com/strongloop/loopback/commit/501a79393e131d3fdbe71b65bfa93c98487d5994
#885: Fixed lint and test run errors to original patch, allowing tests to pass.