False positive: it is valid to escape $ in javascript template string syntax
Đang mở
false-positive
- Ngôn ngữ chính
- CodeQL
- Star
- 10.1k
- Fork
- 2.1k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 141
Mô tả
**Description of the false positive**
js/useless-regexp-character-escape triggers for code like:
```javascript
const str = `hello \${name}`;
```
This is invalid, since without the backslash escape, that's a string interpolation of the `name` variable:
```javascript
const str = `hello ${name}`;
```
This triggered in the lit-html codebase on this line: https://github.com/lit/lit/blob/5eea178e0df1199cd29e9d46bc888d52882f18dd/packages/lit-html/src/lit-html.ts#L1418
Link to the code scanning issue: https://github.com/lit/lit/security/code-scanning/15
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.