Skip to content

Convert to typescript#287

Merged
thecrypticace merged 22 commits intomainfrom
feat/convert-to-typescript
Jun 11, 2024
Merged

Convert to typescript#287
thecrypticace merged 22 commits intomainfrom
feat/convert-to-typescript

Conversation

@thecrypticace
Copy link
Contributor

Still a lot of types and stuff to improve but I've wanted to land this change for quite some time. Now seems like a good time to do it 😄

A few notes:

  • Jest has been replaced with Vitest
  • Fixture tests now run concurrently (yay)
  • Tests now complete in like 4s on my machine — making me fairly happy
  • The package has been switched to type: module — it was already ESM only but some internal scripts used CJS. I think this is a good time to change all of that over
  • We use tsup to generate types — but not for bundling. I need to do a split bundling thing where the built-in version of tailwind is required through a CJS module but that will be a separate improvement.

@thecrypticace thecrypticace merged commit 5e7b8b5 into main Jun 11, 2024
@thecrypticace thecrypticace deleted the feat/convert-to-typescript branch June 11, 2024 13:02
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
* Convert expiring map to JS

* Conver option list to TypeScript

* Fix ESM plugin loading

This doesn’t seem to actually have any side-effects but typescript has revealed possible issues here

* Convert plugin loading to typescript

* Convert config loading to typescript

* Convert sorting code to typescript

* Convert utils to typescript

* Add types

* Convert main file to typescript

* wip

* Make package type: module

* Switch to vitest

* Update lockfile

* Run fixture tests concurrently

* Use tsup for building dts files

Can’t use it to bundle just yet

* Bump test timeout

* Use Node 18 in CI

* Use Node v22 in CI

Worth seeing if it makes things faster

* Remove expired data from maps to prevent memory leaks

* Update comments

* Remove comments

Probably isn’t any reason for this actually

* Add better types to `prefixCandidate`
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