Akhil F
Akhil F

Reputation: 7740

eslint not recognizing template literal

const perunString = perun.times(100).toFixed(2).toString();
return `%{perunString} %`;

Which gives two errors

  1. 'perunString' is defined but never used
  2. Strings must use single quotes

Upvotes: 1

Views: 826

Answers (1)

JMM
JMM

Reputation: 26827

You have an error in your template interpolation syntax that is probably causing both errors:

// Before
`%{perunString} %`

// After
`${perunString} %`

Note the change from %{ to ${.

Upvotes: 3

Related Questions