From de3a50f4d3af3159867988567cb99b94c296d115 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Tue, 7 Jan 2025 12:50:44 +0100 Subject: [PATCH] chore: Bump Eslint --- .eslintignore | 3 --- .eslintrc.json | 3 --- eslint.config.mjs | 13 +++++++++++++ package.json | 2 +- scripts/gradle-version-update.js | 2 +- 5 files changed, 15 insertions(+), 8 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 bb54b3559..000000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -app -doc -gen diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 47415a57c..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@appium/eslint-config-appium" -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..6eaede2f3 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,13 @@ +import appiumConfig from '@appium/eslint-config-appium-ts'; + +export default [ + ...appiumConfig, + { + ignores: [ + 'app/**', + 'doc/**', + 'gen/**', + 'gradle/**', + ], + }, +]; diff --git a/package.json b/package.json index 5526daac6..df279ea27 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "test": "./gradlew testServerDebugUnitTest" }, "devDependencies": { - "@appium/eslint-config-appium": "^8.0.0", + "@appium/eslint-config-appium-ts": "^1.0.0", "@appium/support": "^6.0.0", "@semantic-release/changelog": "^6.0.1", "@semantic-release/git": "^10.0.1", diff --git a/scripts/gradle-version-update.js b/scripts/gradle-version-update.js index 3f8766cab..0ab0bf337 100644 --- a/scripts/gradle-version-update.js +++ b/scripts/gradle-version-update.js @@ -23,7 +23,7 @@ async function gradleVersionUpdate() { const gradleFile = path.resolve(__dirname, '..', 'app', 'build.gradle'); try { await fs.promises.access(gradleFile, fs.constants.W_OK); - } catch (e) { + } catch { throw new Error(`No '${gradleFile}' file found or it is not writeable`); }