From dee54bf041657a7535a1028e3c03d01a4cefc8a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 11:26:35 +0000 Subject: [PATCH 1/2] chore(deps-dev): bump @appium/eslint-config-appium-ts Bumps [@appium/eslint-config-appium-ts](https://github.com/appium/appium/tree/HEAD/packages/eslint-config-appium-ts) from 0.3.3 to 1.0.1. - [Release notes](https://github.com/appium/appium/releases) - [Changelog](https://github.com/appium/appium/blob/master/packages/eslint-config-appium-ts/CHANGELOG.md) - [Commits](https://github.com/appium/appium/commits/@appium/eslint-config-appium-ts@1.0.1/packages/eslint-config-appium-ts) --- updated-dependencies: - dependency-name: "@appium/eslint-config-appium-ts" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22b20ad..6074f4c 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "singleQuote": true }, "devDependencies": { - "@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.1", From 29a4fcae7ae1f458d210afa2bff9ecc256bc3bee Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Fri, 3 Jan 2025 16:12:22 +0100 Subject: [PATCH 2/2] fix all --- .eslintignore | 2 -- .eslintrc.json | 22 ---------------------- eslint.config.mjs | 5 +++++ lib/helpers.js | 2 +- lib/xcode.js | 4 ++-- test/unit/index-specs.js | 4 +--- 6 files changed, 9 insertions(+), 30 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.json create mode 100644 eslint.config.mjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index fb7020d..0000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -coverage -build diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 950cea2..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": ["@appium/eslint-config-appium-ts"], - "overrides": [ - { - "files": "test/**/*.js", - "rules": { - "func-names": "off", - "@typescript-eslint/no-var-requires": "off" - } - }, - { - "files": "scripts/**/*", - "parserOptions": {"sourceType": "script"}, - "rules": { - "@typescript-eslint/no-var-requires": "off" - } - } - ], - "rules": { - "require-await": "error" - } -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..4d52325 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,5 @@ +import appiumConfig from '@appium/eslint-config-appium-ts'; + +export default [ + ...appiumConfig, +]; diff --git a/lib/helpers.js b/lib/helpers.js index 133552c..2618805 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -39,7 +39,7 @@ export async function findAppPaths (bundleId) { ({stdout} = await exec('/usr/bin/mdfind', [ `kMDItemCFBundleIdentifier=${bundleId}` ])); - } catch (e) { + } catch { return []; } diff --git a/lib/xcode.js b/lib/xcode.js index eb11932..6b815de 100644 --- a/lib/xcode.js +++ b/lib/xcode.js @@ -3,7 +3,7 @@ import path from 'path'; import { retry } from 'asyncbox'; import _ from 'lodash'; import { exec } from 'teen_process'; -import semver from 'semver'; +import * as semver from 'semver'; import { runXcrunCommand, findAppPaths, XCRUN_TIMEOUT, readXcodePlist } from './helpers'; @@ -176,7 +176,7 @@ async function getVersion (parse = false, retries = DEFAULT_NUMBER_OF_RETRIES, t async function getClangVersion () { try { await fs.which('clang'); - } catch (e) { + } catch { log.info('Cannot find clang executable on the local system. ' + 'Are Xcode Command Line Tools installed?'); return null; diff --git a/test/unit/index-specs.js b/test/unit/index-specs.js index 7defd69..8046c03 100644 --- a/test/unit/index-specs.js +++ b/test/unit/index-specs.js @@ -2,12 +2,10 @@ import xcode from '../../lib/index'; describe('index', function () { let chai; - let should; before(async function() { chai = await import('chai'); - - should = chai.should(); + chai.should(); });