问题
const perunString = perun.times(100).toFixed(2).toString();
return `%{perunString} %`;
Which gives two errors
- 'perunString' is defined but never used
- Strings must use single quotes
回答1:
You have an error in your template interpolation syntax that is probably causing both errors:
// Before
`%{perunString} %`
// After
`${perunString} %`
Note the change from %{
to ${
.
来源:https://stackoverflow.com/questions/36162158/eslint-not-recognizing-template-literal