IanVS / eslint-nibble

Ease into ESLint, by fixing one rule at a time
MIT License
787 stars 29 forks source link

Use require.resolve to support cases when when formatters installed on the same level as eslint-nibbler #18

Closed princed closed 9 years ago

princed commented 9 years ago

E.g. npm dedupe or npm@3 or just direct formatter usage in the linted module.

IanVS commented 9 years ago

Thanks, this is a good idea, and something I didn't consider. Before I merge, can you also add a test?

princed commented 9 years ago

No problem, what would you like to test? I'm slightly confused with it.

IanVS commented 9 years ago

I'll try to think about a good way to do this, but anytime I make a bug fix I want to add a test which fails without the fix and passes with it. It may also be possible to install npm@3 within a CI build.

IanVS commented 9 years ago

OK, I can't figure out how to test this either, since it won't fail unless the project is installed as a dependency and all of it's own deps are flattened outside of it (which won't happen in CI). So, merging as is, and thanks again!

princed commented 9 years ago

Ok, thanks for merging!