From 6f06fccd461cf1cbb79dd2440c88222d4f52bfa8 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Thu, 7 Mar 2024 13:47:58 +0100 Subject: [PATCH] eslint: prefer-const --- eslint.config.js | 1 + src/util.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index bc6447f..48b1cbc 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -24,6 +24,7 @@ export default [ // https://eslint.style/packages/js rules: { 'no-unused-vars': ['error', { argsIgnorePattern: '^_' }], + 'prefer-const': 'error', '@stylistic/js/array-bracket-newline': ['error', 'consistent'], '@stylistic/js/array-bracket-spacing': 'error', '@stylistic/js/array-element-newline': ['error', 'consistent'], diff --git a/src/util.js b/src/util.js index f82102b..bda3f78 100644 --- a/src/util.js +++ b/src/util.js @@ -81,7 +81,7 @@ export const stealth = async context => { const evasion = await import(`puppeteer-extra-plugin-stealth/evasions/${e}/index.js`); evasion.default().onPageCreated(stealth); } - for (let evasion of stealth.callbacks) { + for (const evasion of stealth.callbacks) { await context.addInitScript(evasion.cb, evasion.a); } };