Skip to content

Commit e3c06c9

Browse files
committed
Support ECMAScript 3
1 parent 1698cbc commit e3c06c9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineConfig([
1919
extends: ["js/recommended"],
2020
languageOptions: {
2121
sourceType: "commonjs",
22-
ecmaVersion: 5,
22+
ecmaVersion: 3,
2323
globals: { define: "readonly" }
2424
},
2525
rules: {

humanize-duration.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,12 +1678,12 @@
16781678
if (digitReplacements) {
16791679
formattedCount = "";
16801680
for (var i = 0; i < countStr.length; i++) {
1681-
var char = countStr[i];
1682-
if (char === ".") {
1681+
var character = countStr[i];
1682+
if (character === ".") {
16831683
formattedCount += decimal;
16841684
} else {
1685-
// @ts-ignore because `char` should always be 0-9 at this point.
1686-
formattedCount += digitReplacements[char];
1685+
// @ts-ignore because `character` should always be 0-9 at this point.
1686+
formattedCount += digitReplacements[character];
16871687
}
16881688
}
16891689
} else {

0 commit comments

Comments
 (0)