PhpStorm 2024.1 Help

Code Inspections in Vue

This topic lists all PhpStorm code inspections available in Vue.

You can toggle specific inspections or change their severity level on the Editor | Inspections page of settings  Ctrl+Alt+S.



Default Severity

Data function

Reports a Vue component data property that is not a function. Suggests wrapping an object literal with a function.

When defining a component, data must be declared as a function that returns the initial data object, because the same definition will be used for creating numerous instances. If a plain object is still used for data, that very object will be shared by reference across all instances created! With a data function, every time a new instance is created we can simply call it to return a fresh copy of the initial data.

Warning Warning

Deprecated symbol

Reports a deprecated Vue symbol.

Warning Warning

Duplicate template/script tag

Reports multiple usages of the template or script tag in a Vue file.

Vue Component specification indicates that each *.vue file can contain at most one template or script block at a time.

Warning Warning

Missing component import

Reports Vue components, which require to be imported in Vue templates. It provides a quick fix to add the missing import.

Warning Warning

Unrecognized directive

Reports an unrecognized Vue directive.

Warning Warning

Unrecognized slot

Reports an unrecognized Vue slot.

Weak Warning Weak warning

Last modified: 11 February 2024