Description
Bug Report Checklist
- I have tried restarting my IDE and the issue persists.
- I have pulled the latest
main
branch of the repository. - I have searched for related issues and found none that matched my issue.
Overview
#695 added a bunch of code changes. I didn't fully unit test them - not because I was too impatient to write tests (me?! never!!), but because I wanted to leave some good first issues as followups. Definitely that.
createESLintRC
is missing unit test coverage for several dozen lines. The createESLintRC
function doesn't have a dedicated createESLintRC.test.ts
file. Let's make one!
Additional Info
We don't need a single unit test per &&
case. That would be quite annoying to write & maintain! Instead, I think maybe a couple tests would be fine:
- One test for all
exclude*
options being enabled - One test for no
exclude*
options being enabled
I'd suggest using Vitest's toMatchInlineSnapshot
to save yourself some time writing the tests.
If the tests are giving you grief, feel free to send an incomplete Draft PR with comments asking for help. ❤️
Note that the code might have been refactored since this issue was filed. Names might be slightly off. The general spirit of this issue should still be valid though.