Skip to content

0.6.3 didn't expose PluginOptions interface #291

@exneval

Description

@exneval

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

import { Parser, Printer, SupportOption } from 'prettier'

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[]
}

declare module 'prettier' {
  interface RequiredOptions extends PluginOptions {}
  interface ParserOptions extends PluginOptions {}
}

export const options: Record<keyof PluginOptions, SupportOption>
export const parsers: Record<string, Parser>
export const printers: Record<string, Printer>

0.6.3 index.d.ts

import { SupportOption, Printer, Parser } from 'prettier';

declare const options: Record<string, SupportOption>;

declare const printers: Record<string, Printer>;
declare const parsers: Record<string, Parser>;
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[];
}
declare module 'prettier' {
    interface RequiredOptions extends PluginOptions {
    }
    interface ParserOptions extends PluginOptions {
    }
}

export { options, parsers, printers };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions