-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.6.3 didn't expose PluginOptions interface #291
Comments
Is there a reason you're typing as e.g. |
It happened to be in a config from this project can you give a recommendation for how to use it start from 0.6.3? |
if you're using an isolated prettier module like in t3's monorepo example, you can get around this by adding a types.d.ts to the prettier package and set it yourself until it gets resolved, like this //prettier/types.d.ts
declare module "prettier-plugin-tailwindcss" {
export interface PluginOptions {
/**
* Path to the Tailwind config file.
*/
tailwindConfig?: string;
/**
* Path to the Tailwind entry point (v4+)
*/
tailwindEntryPoint?: string;
/**
* List of custom function and tag names that contain classes.
*/
tailwindFunctions?: string[];
/**
* List of custom attributes that contain classes.
*/
tailwindAttributes?: string[];
}
} |
@exneval @biohackerellie If you have control over the config you should just remove the import and the typedef. The definitions will still show up and click through will still work. It's the entire reason we have the I'm going to merge in a fix for this and push a patch release out because it's an unintentional breaking change — but as far as I know there should never be a reason for a project to need to import or use that type. |
Fix released in v0.6.4 |
Aside: I just created a project with that template and it indeed doesn't work by default. Something must be going on with the typescript config there because it's supposed to work. Adding a reference comment in the file fixes this tho: /// <reference types="prettier-plugin-tailwindcss" /> |
Tagging @juliusmarminge here since this should be updated in t3-turbo as well |
File a PR :) |
What version of
prettier-plugin-tailwindcss
are you using?v0.6.3
What version of Tailwind CSS are you using?
v3.4.4
What version of Node.js are you using?
v20.13.1
What package manager are you using?
pnpm
What operating system are you using?
Ubuntu
Reproduction URL
Describe your issue
Found typing issue with 0.6.3
/** @typedef {import("prettier-plugin-tailwindcss").PluginOptions} TailwindConfig */
the line above not working anymore
0.6.2 index.d.ts
0.6.3 index.d.ts
The text was updated successfully, but these errors were encountered: