Skip to content

Commit

Permalink
Update Tailwind CSS and fix up types
Browse files Browse the repository at this point in the history
  • Loading branch information
stormwarning committed Feb 9, 2024
1 parent ec7e113 commit 07d18f8
Show file tree
Hide file tree
Showing 6 changed files with 619 additions and 979 deletions.
7 changes: 2 additions & 5 deletions __tests__/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ import tailwind, { type Config } from 'tailwindcss'
import { expect } from 'vitest'

export const css = (strings: string[] | ArrayLike<string>) => String.raw({ raw: strings })
export const html = (strings: string[] | ArrayLike<string>) => String.raw({ raw: strings })

/**
* @todo [tailwindcss@>=3.0.0] Use `Config` type when it's available.
*/
export function run(input: string, config: unknown) {
export function run(input: string, config: Config) {
let { currentTestName } = expect.getState()

// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
return postcss(tailwind(config)).process(input, {
// eslint-disable-next-line unicorn/prefer-module
from: `${path.resolve(__filename)}?test=${currentTestName}`,
Expand Down
Loading

0 comments on commit 07d18f8

Please sign in to comment.