Skip to content

Bug: Parsing error: Semicolon or block is expected when using Tailwind #396

@loganmzz

Description

@loganmzz

Environment

ESLint version: 9.39.4
@eslint/css version: 0.14.1
Node version: 24.9.0
npm version: 11.6.0
Operating System: linux 5.15.167.4-microsoft-standard-WSL2

Which language are you using?

stylesheet

What did you do?

I'm developing an Angular application using Tailwind for styling.

I setup ESLint CSS Language Plugin as mentioned in README / npmjs;

Configuration
import css from '@eslint/css';
import { tailwind4 } from 'tailwind-csstree';

export default [
  ...,
  {
    files: ["**/*.css"],
    language: "css/css",
    languageOptions: {
      customSyntax: tailwind4,
    },
    plugins: { css },
  },
];

Here a component CSS example:

.container {
  @apply outline rounded-sm p-3 grid grid-cols-[200px_auto] gap-2;
}

When I run eslint I got (point to [, same issue on :):

error  Parsing error: Semicolon or block is expected

What did you expect to happen?

No parsing error.

What actually happened?

error  Parsing error: Semicolon or block is expected

Link to Minimal Reproducible Example

https://stackblitz.com/edit/stackblitz-starters-vyr3rjv8

Participation

  • I am willing to submit a pull request for this issue.

AI acknowledgment

  • I did not use AI to generate this issue report.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

Additional comments

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Blocked

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions