From 06aa047eb6545de5c178dc3716df93fc7ca52fa2 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 18 Jan 2024 15:22:35 +0100 Subject: [PATCH] Fixed ESLint --- src/interfaces/BO/dashboard/index.ts | 2 +- src/interfaces/BO/index.ts | 6 +++--- src/interfaces/BO/login/index.ts | 3 +-- src/interfaces/index.ts | 4 ++-- src/pages/BO/dashboard/index.ts | 5 ++++- src/pages/BO/login/index.ts | 5 ++++- src/versions/8.0.0/pages/BO/dashboard/index.ts | 2 +- src/versions/8.0.0/pages/BO/login/index.ts | 2 +- 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/interfaces/BO/dashboard/index.ts b/src/interfaces/BO/dashboard/index.ts index 66070005..f41f02df 100644 --- a/src/interfaces/BO/dashboard/index.ts +++ b/src/interfaces/BO/dashboard/index.ts @@ -1,4 +1,4 @@ -import { BOBasePagePageInterface } from "@interfaces/BO"; +import {BOBasePagePageInterface} from '@interfaces/BO'; export interface DashboardPageInterface extends BOBasePagePageInterface { readonly pageTitle: string; diff --git a/src/interfaces/BO/index.ts b/src/interfaces/BO/index.ts index e204130e..b8f06430 100644 --- a/src/interfaces/BO/index.ts +++ b/src/interfaces/BO/index.ts @@ -1,6 +1,6 @@ -import type { CommonPageInterface } from "@interfaces/index"; -import type { Page } from "@playwright/test"; +import type {CommonPageInterface} from '@interfaces/index'; +import type {Page} from '@playwright/test'; export interface BOBasePagePageInterface extends CommonPageInterface { logoutBO(page: Page): Promise; -} \ No newline at end of file +} diff --git a/src/interfaces/BO/login/index.ts b/src/interfaces/BO/login/index.ts index 80631047..b8bee851 100644 --- a/src/interfaces/BO/login/index.ts +++ b/src/interfaces/BO/login/index.ts @@ -1,8 +1,7 @@ -import { BOBasePagePageInterface } from "@interfaces/BO"; +import {BOBasePagePageInterface} from '@interfaces/BO'; import type {Page} from '@playwright/test'; - export interface LoginPageInterface extends BOBasePagePageInterface { readonly pageTitle: string; diff --git a/src/interfaces/index.ts b/src/interfaces/index.ts index f350d4f4..0773b635 100644 --- a/src/interfaces/index.ts +++ b/src/interfaces/index.ts @@ -1,7 +1,7 @@ -import type { Page } from "@playwright/test"; +import type {Page} from '@playwright/test'; export interface CommonPageInterface { getPageTitle(page: Page): Promise; goTo(page: Page, url: string): Promise; -} \ No newline at end of file +} diff --git a/src/pages/BO/dashboard/index.ts b/src/pages/BO/dashboard/index.ts index 29f1a219..1558a057 100644 --- a/src/pages/BO/dashboard/index.ts +++ b/src/pages/BO/dashboard/index.ts @@ -1,12 +1,15 @@ -import type { DashboardPageInterface } from '@interfaces/BO/dashboard'; +import type {DashboardPageInterface} from '@interfaces/BO/dashboard'; import semver from 'semver'; const psVersion = process.env.PS_VERSION ?? '0.0.0'; let dashboardPage: DashboardPageInterface; + +/* eslint-disable global-require */ if (semver.gte(psVersion, '8.0.0')) { dashboardPage = require('@versions/8.0.0/pages/BO/dashboard'); } else { dashboardPage = require('@versions/8.0.0/pages/BO/dashboard'); } +/* eslint-enable global-require */ module.exports = dashboardPage; diff --git a/src/pages/BO/login/index.ts b/src/pages/BO/login/index.ts index 13c3133e..c943c166 100644 --- a/src/pages/BO/login/index.ts +++ b/src/pages/BO/login/index.ts @@ -1,12 +1,15 @@ -import type { LoginPageInterface } from '@interfaces/BO/login'; +import type {LoginPageInterface} from '@interfaces/BO/login'; import semver from 'semver'; const psVersion = process.env.PS_VERSION ?? '0.0.0'; let loginPage: LoginPageInterface; + +/* eslint-disable global-require */ if (semver.gte(psVersion, '8.0.0')) { loginPage = require('@versions/8.0.0/pages/BO/login'); } else { loginPage = require('@versions/8.0.0/pages/BO/login'); } +/* eslint-enable global-require */ module.exports = loginPage; diff --git a/src/versions/8.0.0/pages/BO/dashboard/index.ts b/src/versions/8.0.0/pages/BO/dashboard/index.ts index 75be1b03..46f73df1 100644 --- a/src/versions/8.0.0/pages/BO/dashboard/index.ts +++ b/src/versions/8.0.0/pages/BO/dashboard/index.ts @@ -625,4 +625,4 @@ class Dashboard extends BOBasePage implements DashboardPageInterface { } } -module.exports = new Dashboard(); \ No newline at end of file +module.exports = new Dashboard(); diff --git a/src/versions/8.0.0/pages/BO/login/index.ts b/src/versions/8.0.0/pages/BO/login/index.ts index c0834d45..deb67dce 100644 --- a/src/versions/8.0.0/pages/BO/login/index.ts +++ b/src/versions/8.0.0/pages/BO/login/index.ts @@ -184,4 +184,4 @@ class Login extends BOBasePage implements LoginPageInterface { } } -module.exports = new Login(); \ No newline at end of file +module.exports = new Login();