prettier-plugin-sort-imports
prettier-plugin-sort-imports copied to clipboard
Type declarations are not exported when building.
Your Environment
- Prettier version: 2.5.1
- node version: 14.17.0
- package manager: yarn@2
- IDE: VScode
Describe the bug
If you take a look at this package in node_modules after you install it, there are no type declarations exported in the lib folder. There's also no types property in the package.json, so if I want use the type definition for the prettierconfig form this package - I can't do that.
To Reproduce
- Create new typescript project (maybe with gts?)
- Run
npm install prettier @trivago/prettier-plugin-sort-imports' - Try importing the config type and building the project if you're using type definitions from this project, the project most likely will throw
Could not find a declaration file for module '@trivago/prettier-plugin-sort-imports'error. - Try taking a look at the package in
node_modules- there are no type declarations anywhere.
Expected behavior
Type declarations should also be generated.
Screenshots, code sample, etc
None
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
None
Error log
None
Contribute to @trivago/prettier-plugin-sort-imports
- [x] I'm willing to fix this bug 🥇
Just an idea: I found it very easy to use tsup for library development. It comes with very good defaults, so I actually never need to change the configuration and it outputs CommonJS and ES Module version of the code at the same time if you want.