Inline constant template literal interpolations
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 4.4k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
#### Input Code
```js
const a = `foo ${'bar'} baz`;
const b = `foo ${true ? 'bar' : 'qux'} baz`;
```
#### Actual Output
```js
const a=`foo ${'bar'} baz`,b=`foo ${'bar'} baz`;
```
#### Expected Output
```js
const a=`foo bar baz`,b=`foo bar baz`;
```
#### Details
I believe this should be safe to do as long as the template literal is not tagged.
Contributor guide
Assessment
This issue has not been assessed yet.