Type RequiredOptions
in "prettier" module is not augmented with plugin options
#169
Closed
1 task done
Your Environment
Describe the bug
TypeScript module augmentation with the
"prettier"
module is not supported, meaning using JSDoc types for the plugin options are not correctly denoted in IDEs (and presumably when the prettier config are typed-checked with TypeScript).To Reproduce
importOrder
,importOrderTypeScriptVersion
,importOrderParserPlugins
).never[]
orstring[]
) and does not have the corresponding JSDoc comments.Expected behavior
As shown in the second screenshot, I expect the correct types for the options to be given, but also when using the
Config
type fromprettier
(first screenshot). It's a minor quibble, sinceimport("@ianvs/prettier-plugin-sort-imports").PrettierConfig
is also provided, but that is a bit long.I believe the code that would make this possible something like:
but when I attempted the trivial fix, I had some conflicts with the types in
src/types.ts
. I will take a look further, but I wanted to let you know beforehand.Screenshots, code sample, etc
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
Error log
No errors.
Contribute to @ianvs/prettier-plugin-sort-imports
The text was updated successfully, but these errors were encountered: