Prettier Config: Add type-checking#21053
Conversation
|
Size Change: +13.5 kB (1%) Total Size: 883 kB
ℹ️ View Unchanged
|
gziolo
left a comment
There was a problem hiding this comment.
I assume the config file included is fine.
Noting that, It’s yet another thing to take into account when creating a package. Should we introduce package scaffolding tool? 😅
Yeah, part of this was to just to demonstrate (even for myself) the amount of effort which would be involved as of the changes resulting from #18942. I think a scaffolding tool could be useful. I was also considering whether it could be the sort of thing where a bot would comment on a pull request where a new package is being added, which could do a few things:
In theory, a bot could even do the commits itself. |
|
It sounds like a plan 👍 I want to use this PR to add types for create block a scripts packages at some point in the near future 😃 |
901ce5d to
31ea1e7
Compare
|
I force pushed to the base branch (#18942) after rebasing against master to fix conflicts. |
|
Ah, I guess I didn't anticipate those sorts of changes in your branch would surface up so prominently in this pull request 🤔 No matter, I should be able to get it resolved without much trouble. Likely just needs a rebase against your newly-rebased branch. |
|
I've pushed more changes to the base branch and appear to have introduced more conflicts. Sorry! It's a sign that it's time to land #18942 😁 |
Yes 😄 , but also....
It looks bad, but I doubt there are actually any conflicts to resolve. |
449bb18 to
89a0540
Compare
783dac1 to
8dee3d0
Compare
|
Noting that I'm intentionally choosing not to include a CHANGELOG entry for this change because there isn't yet a published version of this package (i.e. it technically still qualified under the current "initial release" note). |
8dee3d0 to
22803cb
Compare
|
I neglected to include necessary changes here. Don't use this pull request as reference 😬 See #21381 |
Blocked by (current base): #18942
Related: #18838
This pull request seeks to add type-checking for the
@wordpress/prettier-configpackage.By virtue of #18942, it also implies that types will be output as part of package distribution, though this may or may not be a very useful package to reference.
The primary benefit of these changes is largely in verifying configuration keys and values.
It also benefits from the same sorts of thing I wrote about recently, wherein the addition of the type detail trivializes future configuration maintenance:
Finally, this pull request serves as a possible reference for the revised approach to opting in to TypeScript type-checking for a package as of #18942.
Testing Instructions:
Ensure type-checking passes: