eslint: prefer-const
This commit is contained in:
parent
285c7a44fd
commit
6f06fccd46
2 changed files with 2 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ export default [
|
||||||
// https://eslint.style/packages/js
|
// https://eslint.style/packages/js
|
||||||
rules: {
|
rules: {
|
||||||
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
||||||
|
'prefer-const': 'error',
|
||||||
'@stylistic/js/array-bracket-newline': ['error', 'consistent'],
|
'@stylistic/js/array-bracket-newline': ['error', 'consistent'],
|
||||||
'@stylistic/js/array-bracket-spacing': 'error',
|
'@stylistic/js/array-bracket-spacing': 'error',
|
||||||
'@stylistic/js/array-element-newline': ['error', 'consistent'],
|
'@stylistic/js/array-element-newline': ['error', 'consistent'],
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ export const stealth = async context => {
|
||||||
const evasion = await import(`puppeteer-extra-plugin-stealth/evasions/${e}/index.js`);
|
const evasion = await import(`puppeteer-extra-plugin-stealth/evasions/${e}/index.js`);
|
||||||
evasion.default().onPageCreated(stealth);
|
evasion.default().onPageCreated(stealth);
|
||||||
}
|
}
|
||||||
for (let evasion of stealth.callbacks) {
|
for (const evasion of stealth.callbacks) {
|
||||||
await context.addInitScript(evasion.cb, evasion.a);
|
await context.addInitScript(evasion.cb, evasion.a);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue