Shared code conventions allow teams to collaborate efficiently. This rule checks that all non-JSX string literals use the same kind of quotes, and requires double quotes in JSX code, regardless of the parameter value.

Noncompliant Code Example

Using the parameter default (forcing single quotes):

let message = "Hello, World!"; // Noncompliant

Compliant Solution

let message = 'Hello, World!';

Exceptions

Strings that contain quotes are ignored.

let heSaid = "Then he said 'What?'."  // ignored
let sheSaid = '"Whatever!" she replied.'  // ignored