From 2603fb38032c27189d59d5502eaeef1161d76542 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Wed, 9 Sep 2026 09:26:30 -0500 Subject: [PATCH 1/2] chore: update eslint to v10 and @ionic/eslint-config to v1 --- .eslintignore | 3 --- eslint.config.cjs | 16 ++++++++++++++++ package.json | 9 +++------ src/web.ts | 6 +++--- 4 files changed, 22 insertions(+), 12 deletions(-) delete mode 100644 .eslintignore create mode 100644 eslint.config.cjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 23f8944..0000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -build -dist -example-app diff --git a/eslint.config.cjs b/eslint.config.cjs new file mode 100644 index 0000000..c3035ba --- /dev/null +++ b/eslint.config.cjs @@ -0,0 +1,16 @@ +const ionic = require('@ionic/eslint-config/recommended'); + +module.exports = [ + { + ignores: [ + // eslint . --ext ts linted TypeScript only + '**/*.js', + '**/*.mjs', + '**/*.cjs', + '**/build/**', + '**/dist/**', + '**/example-app/**', + ], + }, + ...ionic, +]; diff --git a/package.json b/package.json index c0ecb80..8313662 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format", - "eslint": "eslint . --ext ts", + "eslint": "eslint .", "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java", "swiftlint": "node-swiftlint", "docgen": "docgen --api FilesystemPlugin --output-readme README.md --output-json dist/docs.json", @@ -54,7 +54,7 @@ "@capacitor/core": "next", "@capacitor/docgen": "^0.3.0", "@capacitor/ios": "next", - "@ionic/eslint-config": "^0.4.0", + "@ionic/eslint-config": "^1.0.0", "@ionic/prettier-config": "^4.0.0", "@ionic/swiftlint-config": "^2.0.0", "@semantic-release/changelog": "^6.0.3", @@ -63,7 +63,7 @@ "@semantic-release/github": "^12.0.2", "@semantic-release/npm": "^13.1.2", "@types/node": "^24.10.1", - "eslint": "^8.57.1", + "eslint": "^10.0.0", "prettier": "^3.6.2", "prettier-plugin-java": "^2.7.7", "rimraf": "^6.1.2", @@ -77,9 +77,6 @@ }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", - "eslintConfig": { - "extends": "@ionic/eslint-config/recommended" - }, "capacitor": { "ios": { "src": "ios" diff --git a/src/web.ts b/src/web.ts index 9530dc2..4d1a20d 100644 --- a/src/web.ts +++ b/src/web.ts @@ -486,7 +486,7 @@ export class FilesystemWeb extends WebPlugin implements FilesystemPlugin { path: to, directory: toDirectory, }); - } catch (e) { + } catch { // To location does not exist, ensure the directory containing "to" location exists and is a directory const toPathComponents = to.split('/'); toPathComponents.pop(); @@ -582,7 +582,7 @@ export class FilesystemWeb extends WebPlugin implements FilesystemPlugin { if (doRename) { await updateTime(to, ctime, fromObj.mtime); } - } catch (e) { + } catch { // ignore } @@ -686,7 +686,7 @@ export class FilesystemWeb extends WebPlugin implements FilesystemPlugin { private isBase64String(str: string): boolean { try { return btoa(atob(str)) == str; - } catch (err) { + } catch { return false; } } From 5818a0395e796b4f12c9d5a8bfb69efcd40e92b2 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Wed, 9 Sep 2026 10:03:11 -0500 Subject: [PATCH 2/2] chore: use @ionic/eslint-config 0.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8313662..f19e491 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@capacitor/core": "next", "@capacitor/docgen": "^0.3.0", "@capacitor/ios": "next", - "@ionic/eslint-config": "^1.0.0", + "@ionic/eslint-config": "^0.5.0", "@ionic/prettier-config": "^4.0.0", "@ionic/swiftlint-config": "^2.0.0", "@semantic-release/changelog": "^6.0.3",