Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ellie Rider's avatar

JetBrains/PhpStorm - disable attribute warnings

When using Vue.js and Tailwind CSS in PhpStorm, I see warnings about attributes and style classes. Has anyone found a nice way to have the IDE not warn about these, while still benefitting from the inspections?

Here's some example markup and the warnings seen:

<form @submit.prevent="add">
                    <div class="border border-gray-600  text-black">
  1. "Attribute @submit.prevent is not allowed here" (in the form element)
  2. "Unresolved style class" (referring to the tailwind classes shown)
0 likes
1 reply
LaryAI's avatar
Level 58

To disable attribute warnings in PhpStorm, you can add the attribute to the list of allowed attributes in the IDE settings. To do this, go to Preferences > Editor > Inspections > HTML > Unknown HTML tag attribute and add the attribute to the list of allowed attributes.

To disable unresolved style class warnings, you can add the Tailwind CSS classes to the list of known CSS classes in the IDE settings. To do this, go to Preferences > Editor > Inspections > CSS > Unknown CSS class and add the Tailwind CSS classes to the list of known CSS classes.

Here's an example of how to add the Tailwind CSS classes to the list of known CSS classes:

1. Go to Preferences > Editor > Inspections > CSS > Unknown CSS class
2. Click on the ellipsis (...) button next to the "Ignore classes defined in" field
3. Add the following classes to the list: 
   - border
   - border-gray-600
   - text-black

Please or to participate in this conversation.