eslint / espree

An Esprima-compatible JavaScript parser
BSD 2-Clause "Simplified" License
2.26k stars 189 forks source link

chore: switch from nyc to c8 for ESM coverage #534

Closed brettz9 closed 2 years ago

brettz9 commented 2 years ago

Coverage has been broken since the ESM upgrade (we could add a threshold check to prevent such regressions, though noting that we're just shy of 100% due to https://github.com/eslint/espree/blob/main/lib/espree.js#L132 not being covered).

linux-foundation-easycla[bot] commented 2 years ago

CLA Signed

The committers are authorized under a signed CLA.

bmish commented 2 years ago

What's the difference between the two?

brettz9 commented 2 years ago

What's the difference between the two?

Mostly just the fact that nyc doesn't yet support ESM, and our project switched to ESM. In most other ways, it is just like nyc.

bmish commented 2 years ago

Makes sense. I saw this change made here too: https://github.com/sindresorhus/eslint-plugin-unicorn/pull/1686

It looks like .gitignore and .nycrc need to be updated too.

brettz9 commented 2 years ago

Makes sense. I saw this change made here too: sindresorhus/eslint-plugin-unicorn#1686

It looks like .gitignore and .nycrc need to be updated too.

No need for nycrc as c8 supports these files too. And no additional folders need supporting for coverage. (And I think we should keep .nyc_output in .gitignore in case reverting back to nyc as we could do (or might need to do for some reason or other) in the future once the new version of nyc may support ESM.)

brettz9 commented 2 years ago

Thanks for the review!