tools: fix bug in prefer-primordials
ESLint rule
#40628
Merged
prefer-primordials
ESLint rule
#40628