Skip to content

Unable to lint incorrect class names in @apply #1445

@ocavue

Description

@ocavue

What version of VS Code are you using?

Version: 1.103.2

What version of Tailwind CSS IntelliSense are you using?

Version 0.14.26

What version of Tailwind CSS are you using?

4.1.12

What package manager are you using?

pnpm

What operating system are you using?

macOS

Tailwind CSS Stylesheet (v4) or config file (v3)

@import "tailwindcss";

/* Test conflict */
.button-1 {
  @apply m-1 opacity-90 p-2 opacity-80;
}

/* Test incorrect class name */
.button-2 {
  @apply p-2 size-3;
  /* @apply m-1 unknown-class; */
}

VS Code settings

{
    "files.associations": {
        "*.css": "tailwindcss"
    },
    "editor.quickSuggestions": {
        "strings": "on"
    },
    "tailwindCSS.validate": true,
    "tailwindCSS.experimental.configFile": "src/index.css"
}

Reproduction URL

https://github.com/issueset/tailwindcss-intellisense-lint-issue

Describe your issue

According to the READMD of tailwindcss-intellisense, it should capture incorrect class name in @apply. However, as shown in the screenshot below, the extension just crashes when there is an incorrect class at line 11, and unable to detect other errors like the conflict at line 5.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions