build: fix eslint issues (#124)

* build: fix eslint issues

* build: migrate to Node 16
This commit is contained in:
Yaroslav Serhieiev
2022-04-12 07:36:59 +03:00
committed by GitHub
parent 531a952df3
commit 96ad8afe1d
14 changed files with 14375 additions and 12906 deletions
+6
View File
@@ -0,0 +1,6 @@
{
"plugins": [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties"
]
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"root": true,
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"extends": [
"airbnb-base",
"plugin:prettier/recommended",
+1 -1
View File
@@ -13,7 +13,7 @@ const StealthPlugin = require('puppeteer-extra-plugin-stealth');
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
const jestPuppeteerConfig = require('./jest-puppeteer.config');
module.exports = async function() {
module.exports = async function globalSetup() {
puppeteer.use(StealthPlugin());
const browser = await puppeteer.launch(jestPuppeteerConfig.launch);
// store the browser instance so we can teardown it later
+1 -1
View File
@@ -7,7 +7,7 @@ const os = require('os');
const path = require('path');
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
module.exports = async function() {
module.exports = async function globalTeardown() {
// close the browser instance
await global.__BROWSER_GLOBAL__.close();
+1 -1
View File
@@ -6,7 +6,7 @@ const { openAddon } = require('./utils/open-addon');
require('dotenv').config();
const isExtended = process.env.IS_EXTENDED == true;
const isExtended = `${process.env.IS_EXTENDED}` === 'true';
const toMatchImageSnapshot = configureToMatchImageSnapshot({
failureThreshold: 0.04,
-4
View File
@@ -11,10 +11,6 @@ const NodeEnvironment = require('jest-environment-node');
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
class PuppeteerEnvironment extends NodeEnvironment {
constructor(config) {
super(config);
}
async setup() {
await super.setup();
// get the wsEndpoint
+1
View File
@@ -25,6 +25,7 @@ const openAddon = async page => {
await page.click('div[data-accountrecovery]');
await page.waitForTimeout(6000);
} catch {
// eslint-disable-next-line no-console
console.log('The "choose account recovery method" page isn\'t shown');
}