JetBrains Rider 2021.1 Help

Code Inspections in Vue

This topic lists all JetBrains Rider code inspections available in Vue.

You can toggle specific inspections or change their severity level on the Editor | Inspection Settings | Inspection Severity | Other Languages page of the Settings/Preferences Ctrl+Alt+S.

InspectionDescriptionDefault Severity
Data function

This inspection warns if data property of Vue component is not a function.

When defining a component, data must be declared as a function that returns the initial data object, because there will be many instances created using the same definition. If we still use a plain object for data, that same object will be shared by reference across all instances created! By providing 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
Duplicate template/script tag

This inspection warns if there is more than one template or script tag in Vue file.

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

Warning Warning
Last modified: 06 April 2021