sindresorhus/eslint-plugin-unicorn
GitHub で見るRule proposal: `prefer-string-repeat`
Open
#1,774 opened on 2022年3月30日
help wantednew rule
説明
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)