Skip to content

Commit ce56719

Browse files
committed
style: fix lint errors
1 parent 4f86171 commit ce56719

9 files changed

+156
-8
lines changed

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
dist
2+
dist
3+
example

.eslintrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ module.exports = {
99
'plugin:@typescript-eslint/recommended',
1010
'plugin:import/errors'
1111
],
12+
rules: {
13+
"@typescript-eslint/no-unused-vars": "off",
14+
"@typescript-eslint/explicit-module-boundary-types": "off",
15+
"@typescript-eslint/no-explicit-any": "off",
16+
"@typescript-eslint/ban-types": "off",
17+
"@typescript-eslint/no-empty-interface": "off",
18+
},
1219
settings: {
1320
"import/resolver": {
1421
node: {

example/Pages/CalculatorPage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CalculatorPage extends PageObject {
2929
get button9() { return By2.nativeAccessibilityId('num9Button'); }
3030

3131
private async pressKeys(keys: string) {
32-
for (var key of keys) {
32+
for (const key of keys) {
3333
await By2.nativeAccessibilityId('num' + key + 'Button').click();
3434
}
3535
}

package-lock.json

+136
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"@typescript-eslint/parser": "^4.14.1",
2929
"eslint": "^7.18.0",
3030
"eslint-plugin-import": "^2.22.1",
31+
"selenium-webdriver": "^4.0.0-alpha.8",
3132
"typescript": "^4.1.2"
3233
},
3334
"peerDependencies": {

src/Config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
'use strict';
77

88
class Configuration {
9-
private waitforTimeout: number = 10000;
10-
private waitforPageTimeout: number = 30000;
9+
private waitforTimeout = 10000;
10+
private waitforPageTimeout = 30000;
1111

1212
setWaitForTimeout(timeout: number) {
1313
this.waitforTimeout = timeout;
@@ -22,6 +22,6 @@ class Configuration {
2222
getWaitForPageTimeout(): number {
2323
return this.waitforPageTimeout;
2424
}
25-
};
25+
}
2626

2727
export const Config = new Configuration();

src/Driver.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
*/
55

66
'use strict';
7+
// eslint-disable-next-line import/no-unresolved
78
import { Locator, WebDriver, Builder, until, Capabilities, WebElement, WebElementPromise, ThenableWebDriver, FileDetector, Session, Actions, WebElementCondition, Condition, Options, Navigation, TargetLocator } from 'selenium-webdriver'
9+
10+
// eslint-disable-next-line import/no-unresolved
811
import { Command, Executor } from 'selenium-webdriver/lib/command'
912

1013
interface IWebDriver2 extends WebDriver {
@@ -211,7 +214,7 @@ export class WebDriver2 implements IWebDriver2 {
211214
this.webDriver = webDriver;
212215
}
213216

214-
startWithCapabilities(capabilities: {} | Capabilities, url: string = "http://localhost:4723"): Promise<void> {
217+
startWithCapabilities(capabilities: {} | Capabilities, url = "http://localhost:4723"): Promise<void> {
215218
return new Promise<void>((resolve, reject) => {
216219
if (capabilities) {
217220
new Builder()

src/WinAppDriver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ export function windowsAppDriverCapabilities(appName: string) {
1212
deviceName: 'WindowsPC',
1313
app: appName
1414
}
15-
};
15+
}

src/by2.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
'use strict';
7-
7+
// eslint-disable-next-line import/no-unresolved
88
import { By, Locator, WebDriver, ISize, IRectangle, ILocation, until, IWebElementId, WebElement, WebElementPromise, ThenableWebDriver, FileDetector, Session, Actions, WebElementCondition, Condition, Options, Navigation, TargetLocator } from 'selenium-webdriver'
99
import { driver, WebDriver2 } from './Driver'
1010
import { Config } from './Config'

0 commit comments

Comments
 (0)