Common275 Documents

Single Quote

Use single quotes for strings whenever the language and format permit them, and never use double quotes when another equivalent string syntax works. When a string contains a single quote, use a syntax that avoids escaping it whenever the language permits one.

Correct

const title = 'Education'
const message = `The tenant's records`

Incorrect

const title = "Education"
const message = 'The tenant\'s records'

Exceptions

  • Use double quotes when the language, data format, interpolation syntax, or interoperability boundary technically requires them.

Fix

Remove double quotes. Use single quotes or string template literals everywhere.