diff --git a/.eslintrc.js b/.eslintrc.js index cd918e3bfb3..eb82b380d88 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -55,7 +55,6 @@ module.exports = defineConfig({ 'unicorn/no-array-callback-reference': 'off', 'unicorn/no-array-reduce': 'off', 'unicorn/no-await-expression-member': 'off', - 'unicorn/no-for-loop': 'off', 'unicorn/no-negated-condition': 'off', 'unicorn/no-object-as-default-parameter': 'off', 'unicorn/no-useless-switch-case': 'off', diff --git a/src/modules/finance/iban.ts b/src/modules/finance/iban.ts index 2eb6fbba4f2..f37bc7f4cab 100644 --- a/src/modules/finance/iban.ts +++ b/src/modules/finance/iban.ts @@ -1398,8 +1398,8 @@ const iban: Iban = { ], mod97: (digitStr) => { let m = 0; - for (let i = 0; i < digitStr.length; i++) { - m = (m * 10 + +digitStr[i]) % 97; + for (const element of digitStr) { + m = (m * 10 + +element) % 97; } return m; diff --git a/test/docs/versions.spec.ts b/test/docs/versions.spec.ts index 5d9efd921fc..777efcb2c9c 100644 --- a/test/docs/versions.spec.ts +++ b/test/docs/versions.spec.ts @@ -38,10 +38,10 @@ describe.runIf(isFakerOrigin())('docs versions', () => { semver.valid(version) ); const latestMajorRelease = semver.major(releaseVersions[0].version); - for (let i = 0; i < releaseVersions.length; i++) { - const { version, link } = releaseVersions[i]; + for (const [index, value] of releaseVersions.entries()) { + const { version, link } = value; const oldMajorVersion = semver.major(version); - expect(oldMajorVersion).toBe(latestMajorRelease - i); + expect(oldMajorVersion).toBe(latestMajorRelease - index); expect(link).toBe(`https://v${oldMajorVersion}.fakerjs.dev/`); } });