Skip to content

Support @source inline #18

@jrmajor

Description

@jrmajor

For the following code:

@import 'tailwindcss';

@source inline("{hover:,focus:,}underline");
@source not inline('container');

I get this errors:

/home/projects/eslint-tailwind-4-at-rules-repro/src/style.css
  3:9  error  Invalid prelude 'inline("{hover:,focus:,}underline")' found for at-rule '@source'. Expected '<string>'  css/no-invalid-at-rules
  4:9  error  Invalid prelude 'not inline("container")' found for at-rule '@source'. Expected '<string>'              css/no-invalid-at-rules

✖ 2 problems (2 errors, 0 warnings)

Tailwind docs: https://tailwindcss.com/docs/detecting-classes-in-source-files#safelisting-specific-utilities and https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes.
StackBlitz repro: https://stackblitz.com/edit/eslint-tailwind-4-source-inline-repro?file=src/style.css.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions