sveltejs / cli

The Svelte CLI
MIT License
261 stars 11 forks source link

Tailwindcss default export should use `satisfies` instead of `as` #231

Closed rcoopr closed 4 weeks ago

rcoopr commented 4 weeks ago

The previous adder would create the following config file for tailwindcss:

import type { Config } from 'tailwindcss';

export default {
    content: ['./src/**/*.{html,js,svelte,ts}'],

    theme: {
        extend: {}
    }
} as Config;

With these changes, we can use the satisfies operator instead of as, and gain all the type hints which that brings.

There are probably other adders that will benefit from using satisfies

changeset-bot[bot] commented 4 weeks ago

🦋 Changeset detected

Latest commit: 073f17cca5acf0a9188d53576e0752f32f07bb7f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---- | ----- | | sv | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

pkg-pr-new[bot] commented 4 weeks ago

Open in Stackblitz

pnpm add https://pkg.pr.new/sveltejs/cli/sv@231

commit: 073f17c