diff --git a/packages/core-js/internals/ieee754.js b/packages/core-js/internals/ieee754.js index ae1b9ffecdc4..057c4bd91bf9 100644 --- a/packages/core-js/internals/ieee754.js +++ b/packages/core-js/internals/ieee754.js @@ -54,7 +54,7 @@ var pack = function (number, mantissaLength, bytes) { exponent = eMax; } else if (exponent + eBias >= 1) { mantissa = roundToEven((number * c - 1) * pow(2, mantissaLength)); - exponent = exponent + eBias; + exponent += eBias; } else { mantissa = roundToEven(number * pow(2, eBias - 1) * pow(2, mantissaLength)); exponent = 0; @@ -103,8 +103,8 @@ var unpack = function (buffer, mantissaLength) { } else if (exponent === eMax) { return mantissa ? NaN : s ? -Infinity : Infinity; } else { - mantissa = mantissa + pow(2, mantissaLength); - exponent = exponent - eBias; + mantissa += pow(2, mantissaLength); + exponent -= eBias; } return (s ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength); }; diff --git a/packages/core-js/modules/es.regexp.constructor.js b/packages/core-js/modules/es.regexp.constructor.js index 1f1ce0dc74aa..f922ed5b5555 100644 --- a/packages/core-js/modules/es.regexp.constructor.js +++ b/packages/core-js/modules/es.regexp.constructor.js @@ -86,7 +86,7 @@ var handleNCG = function (string) { for (; index <= length; index++) { chr = charAt(string, index); if (chr === '\\') { - chr = chr + charAt(string, ++index); + chr += charAt(string, ++index); } else if (chr === ']') { brackets = false; } else if (!brackets) switch (true) { diff --git a/tests/eslint/eslint.config.js b/tests/eslint/eslint.config.js index 234b4bd75e71..ef5650863b9b 100644 --- a/tests/eslint/eslint.config.js +++ b/tests/eslint/eslint.config.js @@ -260,6 +260,8 @@ const base = { 'object-shorthand': ERROR, // require newlines around variable declarations with initializations 'one-var-declaration-per-line': [ERROR, 'initializations'], + // require assignment operator shorthand where possible + 'operator-assignment': [ERROR, 'always'], // require using arrow functions for callbacks 'prefer-arrow-callback': ERROR, // require const declarations for variables that are never reassigned after declared