Skip to content

fix(lint): exempt Tailwind at-rules from at-rule-prelude-no-invalid - #36

Merged
vpetersson merged 1 commit into
masterfrom
fix/stylelint-tailwind-at-rule-prelude
Sep 15, 2026
Merged

vpetersson merged 1 commit into
masterfrom
fix/stylelint-tailwind-at-rule-prelude

Conversation

@vpetersson-bot

Copy link
Copy Markdown
Collaborator

What

bun run lint:css fails on dependabot/bun/stylelint-17.15.0 (#35) with 60+ errors of the form:

Invalid prelude "sticky top-0 z-40 border-b ..." for at-rule "@apply"   at-rule-prelude-no-invalid

stylelint 17.15.0 enables at-rule-prelude-no-invalid through stylelint-config-standard. The rule validates every at-rule prelude against the CSS spec, so Tailwind's @apply <utility classes> is rejected. This is a lint-config gap, not a problem with the stylelint upgrade itself.

Fix

Exempt the same at-rules .stylelintrc.json already exempts from at-rule-no-unknown.

Verification

Ran lint:css locally against both versions with this change applied:

So this is safe to land ahead of #35; once it is on master, rebasing #35 should turn it green.

🤖 Generated with Claude Code

stylelint 17.15.0 turns on `at-rule-prelude-no-invalid` through
stylelint-config-standard. The rule parses every at-rule prelude against
the CSS spec, so Tailwind's `@apply <utility classes>` is reported as an
invalid prelude and `bun run lint:css` fails on every `@apply` in
assets/css.

Exempt the same at-rules the config already exempts from
`at-rule-no-unknown`. Verified against both the pinned stylelint 17.14.1
and 17.15.0: lint:css is clean on both, so this can land ahead of the
Dependabot bump in #35.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@vpetersson
vpetersson merged commit dd09f9c into master Sep 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants