sindresorhus/eslint-plugin-unicorn
View on GitHubRule proposal: `prefer-string-repeat`
Open
#1,774 opened on Mar 30, 2022
help wantednew rule
Description
Description
https://github.com/eslint/eslint/pull/15731#issuecomment-1082586113
Fail
Array.from({length: 10 + 1}).join('*')
Array.from({length: 10}).fill('*').join('')
Array.from({length: 10}, () => '*').join('')
Pass
'*'.repeat(10)
String(foo).repeat(10)