Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 876 Bytes

no-potential-path-strings.md

File metadata and controls

42 lines (27 loc) · 876 Bytes

no-potential-path-strings

It might happen sometimes that {{ and }} are forgotten when invoking a component, and the string that is passed was actually supposed to be a property path or argument.

This rule warns about all arguments and attributes that start with this. or @, but are missing the surrounding {{ and }} characters.

Examples

This rule forbids the following:

<img src="this.picture">
<img src="@img">

This rule allows the following:

<img src={{this.picture}}>
<img src={{@img}}>

Migration

  • Replace the surrounding " characters with {{/}}

Related Rules

References