gustavnikolaj / linter-js-standard-engine

Linter plugin for Standard Engine based linters.
ISC License
10 stars 6 forks source link

Fix linter resolution #31

Closed novemberborn closed 8 years ago

novemberborn commented 8 years ago

Linters must be resolved from the project root, not the lintWorker module. Fixes regression introduced in #22.

The previous behavior accidentally triggered code paths that did not have explicit test coverage. Add new tests and fix tests and fixtures that never quite worked but still passed.

gustavnikolaj commented 8 years ago

Good catch. I think this crept in as I did the development and testing within the project itself - meaning that it would actually resolve the correct linter, even when resolving from the lint worker.

Two take aways from that:

  1. Stop using the plugin itself as the only test bed.
  2. Write more adequate unit tests :-)

Lesson learned.

novemberborn commented 8 years ago

Yup. But really it's because the tests didn't cover actual usage. 100% code coverage doesn't get you everything 😉