Enable the unicorn/no-array-push-push ESLint plugin rule

There's generally speaking no need to use multiple consecutive `Array.prototype.push()` calls, since that method accepts multiple arguments, and this ESLint rule helps enforce that pattern.

Please see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-push-push.md for additional information.
This commit is contained in:
Jonas Jenwald 2021-05-24 13:20:19 +02:00
parent 3538ef017f
commit ec3bcadf56
9 changed files with 80 additions and 84 deletions

View file

@ -161,11 +161,7 @@ class AForm {
// sepStyle is an integer in [0;4]
sepStyle = Math.min(Math.max(0, Math.floor(sepStyle)), 4);
buf.push("%,");
buf.push(sepStyle);
buf.push(".");
buf.push(nDec.toString());
buf.push("f");
buf.push("%,", sepStyle, ".", nDec.toString(), "f");
if (!bCurrencyPrepend) {
buf.push(strCurrency);