fix(lint-staged): add missing types for possible config + fix typo#67862
fix(lint-staged): add missing types for possible config + fix typo#67862typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom markfswe:master
Conversation
|
@ZerdoX-x Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through. This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsThis PR can be merged once it's reviewed by a DT maintainer. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 67862,
"author": "ZerdoX-x",
"headCommitOid": "df492290b43cb66f61b5d9da35e847c5343e2892",
"mergeBaseOid": "eb5412a9a2ee93c34b3c882918d2fb0bc87264ab",
"lastPushDate": "2023-12-11T23:39:40.000Z",
"lastActivityDate": "2023-12-16T11:32:01.000Z",
"mergeOfferDate": "2023-12-15T21:13:22.000Z",
"mergeRequestDate": "2023-12-16T11:32:01.000Z",
"mergeRequestUser": "ZerdoX-x",
"hasMergeConflict": false,
"isFirstContribution": true,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "lint-staged",
"kind": "edit",
"files": [
{
"path": "types/lint-staged/index.d.ts",
"kind": "definition"
},
{
"path": "types/lint-staged/package.json",
"kind": "package-meta-ok"
}
],
"owners": [
"okonet",
"saiichihashimoto"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "rbuckton",
"date": "2023-12-15T21:12:35.000Z",
"isMaintainer": true
},
{
"type": "approved",
"reviewer": "saiichihashimoto",
"date": "2023-12-11T23:54:31.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 1851069754,
"ciResult": "pass"
} |
|
Hey @ZerdoX-x, 😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you! |
|
🔔 @okonet @saiichihashimoto — please review this PR in the next few days. Be sure to explicitly select |
|
LMK if you would like to add test for undocumented configuration case :) |
|
@ZerdoX-x: Everything looks good here. I am ready to merge this PR (at df49229) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@okonet, @saiichihashimoto: you can do this too.) |
|
Ready to merge |
This code change is not breaking, user's code that was utilizing old types should still compile without errors.
I added types for one more possible config which is not documented in examples, but implemented in the lint-staged.
I often use config file with format like this in complex projects:
As source code of lint-staged states
Which means values of configuration object can contain array of mixed values of strings and functions. I included link to the source code containing this quote in the template below.
I did not added any tests, since all existing tests are taken from lint-staged readme example configurations and my configuration case is not included in the examples, so just let me know if you would like to add a test for this.
Template:
pnpm test <package to test>.I am changing an existing definition: