Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
- Don't augment global Prettier `ParserOptions` and `RequiredOptions` types ([#354](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/pull/354))

## [0.6.14] - 2025-07-09

Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ Then add the plugin to your [Prettier configuration](https://prettier.io/docs/en
}
```

When using a JavaScript config, you can import the types for IntelliSense:

```js
// prettier.config.js

/** @type {import('prettier').Config & import('prettier-plugin-tailwindcss').PluginOptions} */
export default {
plugins: ["prettier-plugin-tailwindcss"],
}
```

## Upgrading to v0.5.x

As of v0.5.x, this plugin now requires Prettier v3 and is ESM-only. This means it cannot be loaded via `require()`. For more information see our [upgrade guide](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/issues/207#issuecomment-1698071122).
Expand Down
5 changes: 0 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1288,8 +1288,3 @@ export interface PluginOptions {
*/
tailwindPreserveDuplicates?: boolean
}

declare module 'prettier' {
interface RequiredOptions extends PluginOptions {}
interface ParserOptions extends PluginOptions {}
}
4 changes: 3 additions & 1 deletion src/internal.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export interface InternalOptions {
import type { PluginOptions } from '.'

export interface InternalOptions extends PluginOptions {
printer: Printer<any>

/**
Expand Down
1 change: 0 additions & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { RequiredOptions, SupportOption } from 'prettier'
import type { Customizations } from './types'
import './index'

export const options: Record<string, SupportOption> = {
tailwindConfig: {
Expand Down