Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 962 Bytes

no-potential-path-strings.md

File metadata and controls

44 lines (28 loc) · 962 Bytes

no-potential-path-strings

✅ The extends: 'recommended' property in a configuration file enables this rule.

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