eslint-plugin

@masknet/string/no-simple-template-literal

Disallow simple template-literal

Rule Details

:x: Incorrect

const foo = `example`
const bar = `${foo}`
const baz = { [`${bar}`]: foo }
const qux = { [`bar`]: foo }

:white_check_mark: Correct

const foo = 'example'
const bar = foo
const baz = { [bar]: foo }
const qux = { bar: foo }

Attributes