Skip to content

Commit

Permalink
chore: use newer lint
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Jan 6, 2025
1 parent a759f6f commit aca4185
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 16 deletions.
1 change: 0 additions & 1 deletion driver/.eslintignore

This file was deleted.

5 changes: 5 additions & 0 deletions driver/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import appiumConfig from '@appium/eslint-config-appium-ts';

export default [
...appiumConfig
];
4 changes: 2 additions & 2 deletions driver/lib/commands/execute/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const scrollUntilVisible = async (
try {
await waitFor(self, item, waitTimeoutMilliseconds);
isVisible = true;
} catch (ign) {}
} catch {}
})();
const startAt = Date.now();
while (!isVisible && shouldRetry(startAt, waitTimeoutMilliseconds)) {
Expand Down Expand Up @@ -167,7 +167,7 @@ export const scrollUntilTapable = async (
try {
await waitForTappable(self, item, waitTimeoutMilliseconds);
isVisible = true;
} catch (ign) {}
} catch {}
})();
const startAt = Date.now();
while (!isVisible && shouldRetry(startAt, waitTimeoutMilliseconds)) {
Expand Down
3 changes: 2 additions & 1 deletion driver/lib/commands/screen.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { FlutterDriver } from '../driver';
import { IsolateSocket } from '../sessions/isolate_socket';

export const getScreenshot = async function(this: FlutterDriver) {
const response = await this.socket!.call(`_flutter.screenshot`) as any;
const response = await (this.socket as IsolateSocket).call(`_flutter.screenshot`) as any;
return response.screenshot;
};
2 changes: 1 addition & 1 deletion driver/lib/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { getScreenshot } from './commands/screen';
import { getClipboard, setClipboard } from './commands/clipboard';
import { desiredCapConstraints } from './desired-caps';
import XCUITestDriver from 'appium-xcuitest-driver';
import AndroidUiautomator2Driver from 'appium-uiautomator2-driver';
import { AndroidUiautomator2Driver } from 'appium-uiautomator2-driver';
import type {
DefaultCreateSessionResult, DriverCaps, DriverData, W3CDriverCaps,
RouteMatcher
Expand Down
2 changes: 1 addition & 1 deletion driver/lib/sessions/android.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AndroidUiautomator2Driver from 'appium-uiautomator2-driver';
import { AndroidUiautomator2Driver } from 'appium-uiautomator2-driver';
import { connectSocket, extractObservatoryUrl, OBSERVATORY_URL_PATTERN } from './observatory';
import type { InitialOpts, StringRecord } from '@appium/types';
import type { IsolateSocket } from './isolate_socket';
Expand Down
2 changes: 1 addition & 1 deletion driver/lib/sessions/ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export async function getObservatoryWsUri (
let remoteSocket;
try {
remoteSocket = await utilities.connectPort(udid, remotePort);
} catch (e) {
} catch {
localSocket.destroy();
return;
}
Expand Down
2 changes: 1 addition & 1 deletion driver/lib/sessions/observatory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export function extractObservatoryUrl(logEntry: LogEntry): URL | null {
result.protocol = `ws`;
result.pathname += `ws`;
return result;
} catch (ign) {
} catch {
return null;
}
}
10 changes: 2 additions & 8 deletions driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,12 @@
"appium": "^2.4.1"
},
"devDependencies": {
"@appium/eslint-config-appium": "^8.0.4",
"@appium/eslint-config-appium-ts": "^0.x",
"@appium/eslint-config-appium-ts": "^1.x",
"@appium/tsconfig": "^0.x",
"@appium/types": "^0.x",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"eslint": "^8.46.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint": "^9.17.0",
"semantic-release": "^23.0.0",
"ts-node": "^10.9.1",
"typescript": "~5.5"
Expand Down

0 comments on commit aca4185

Please sign in to comment.