Skip to main content

avoid-adjacent-strings

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');