Skip to main content

avoid-adjacent-strings

added in: 1.24.0
Pro+

Warns against any usage of adjacent strings.

Adjacent strings can lead to unexpected bugs, especially when a function expects several optional string parameters and gets one adjacent string instead.

Example

❌ Bad:

// LINT: Avoid adjacent strings. Try using a single string literal instead.
someFn('hi' 'hello');

✅ Good:

someFn('hi hello');