Skip to content

chore: Create script to check for outdated keyToCss keys#2061

Merged
marcustyphoon merged 8 commits intoAprilSylph:masterfrom
marcustyphoon:check-outdated-css-keys
Jan 28, 2026
Merged

chore: Create script to check for outdated keyToCss keys#2061
marcustyphoon merged 8 commits intoAprilSylph:masterfrom
marcustyphoon:check-outdated-css-keys

Conversation

@marcustyphoon
Copy link
Copy Markdown
Collaborator

@marcustyphoon marcustyphoon commented Jan 14, 2026

Description

Here's a quick and dirty script that checks if we call keyToCss with keys that are no longer in the CSS map. Much easier than adding logging to the function and trying to find them in practice.

I was hoping to do something based on AST parsing, but eh, that sounds like a lot of work. https://xkcd.com/208/ it is.

Totally don't have to commit this.

> dev/check-outdated-css-keys.js
keyToCss is called with outdated/invalid arguments:
- reblogTrailWrapper
- hasPermalink
- withTrailItemPermalink
- isReblogWithAddedContent
- heightRestrictorExpandButtonWrapper
- contentWarningCover
- expandTagsButtonWrapper
- notifications
- videoCTA

Testing steps

Run dev/check-outdated-css-keys.js.

@marcustyphoon marcustyphoon changed the title chore: Commit script to check for outdated keyToCss keys chore: Create script to check for outdated keyToCss keys Jan 14, 2026
@marcustyphoon marcustyphoon removed the request for review from AprilSylph January 14, 2026 23:46
@marcustyphoon marcustyphoon marked this pull request as draft January 14, 2026 23:46
@marcustyphoon marcustyphoon marked this pull request as ready for review January 14, 2026 23:51
Copy link
Copy Markdown
Owner

@AprilSylph AprilSylph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful!

Also yes I like Sets, delicious thank you.

@marcustyphoon marcustyphoon merged commit 29a69b4 into AprilSylph:master Jan 28, 2026
2 checks passed
@marcustyphoon marcustyphoon deleted the check-outdated-css-keys branch January 28, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants