diff --git a/biome.json b/biome.json index 4e1d7e8c0e..524a89bd51 100644 --- a/biome.json +++ b/biome.json @@ -23,6 +23,7 @@ "noSwitchDeclarations": "off" }, "nursery": { + "noSubstr": "error", "noUselessEscapeInRegex": "error" }, "security": { diff --git a/runtime/mlBytes.js b/runtime/mlBytes.js index 577616952d..faf242546b 100644 --- a/runtime/mlBytes.js +++ b/runtime/mlBytes.js @@ -89,7 +89,6 @@ function caml_utf8_of_utf16(s) { if (c < 0x80) { for (var j = i + 1; j < l && (c = s.charCodeAt(j)) < 0x80; j++); if (j - i > 512) { - t.substr(0, 1); b += t; t = ""; b += s.slice(i, j); @@ -125,7 +124,6 @@ function caml_utf8_of_utf16(s) { ); } if (t.length > 1024) { - t.substr(0, 1); b += t; t = ""; } @@ -140,7 +138,6 @@ function caml_utf16_of_utf8(s) { if (c1 < 0x80) { for (var j = i + 1; j < l && (c1 = s.charCodeAt(j)) < 0x80; j++); if (j - i > 512) { - t.substr(0, 1); b += t; t = ""; b += s.slice(i, j); @@ -179,7 +176,6 @@ function caml_utf16_of_utf8(s) { t += String.fromCharCode(0xd7c0 + (v >> 10), 0xdc00 + (v & 0x3ff)); else t += String.fromCharCode(v); if (t.length > 1024) { - t.substr(0, 1); b += t; t = ""; }