Skip to content

Files

Latest commit

 

History

History
22 lines (13 loc) · 459 Bytes

no_nested_string_interpolation.md

File metadata and controls

22 lines (13 loc) · 459 Bytes

Pattern: Nested string interpolation

Issue: -

Description

This rule warns about nested string interpolation, as it tends to make code harder to read and understand.

Examples

# Good!
str = "Book by #{firstName.toUpperCase()} #{lastName.toUpperCase()}"


# Bad!
str = "Book by #{"#{firstName} #{lastName}".toUpperCase()}"

Further Reading