🐛 lint/suspicious/noRedeclare
- Index signatures still conflict with var
names.
#175
Closed
1 task done
Labels
Environment information
What happened?
Consider the following code:
Due to the use of
var
, a version of rome/tools#4478 still occurs:The issue doesn't appear if the for loop uses
const
. Hoisting thevar
out of the loop declaration doesn't help.As noted in the comments of the snippet, it is necessary to use
var
for code targeted at ES5 environments. See https://github.com/lgarron/clipboard-polyfill/blob/c24845e280262858cf40c5fce8443abf5a8dc51b/src/clipboard-polyfill/ClipboardItem/ClipboardItemPolyfill.ts#L19 for a real-world use case.Expected result
No error.
Code of Conduct
The text was updated successfully, but these errors were encountered: