Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions example-app-spm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@
"eject": "react-scripts eject",
"sync": "npm run build && npx cap sync"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
Expand All @@ -72,4 +66,4 @@
"@capacitor/cli": "next"
},
"description": "An Ionic project"
}
}
8 changes: 1 addition & 7 deletions example-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@
"eject": "react-scripts eject",
"sync": "npm run build && npx cap sync"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
Expand All @@ -72,4 +66,4 @@
"@capacitor/cli": "next"
},
"description": "An Ionic project"
}
}
61 changes: 15 additions & 46 deletions plugin/eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,51 +1,20 @@
const eslintjs = require('@eslint/js');
const tseslint = require('@typescript-eslint/eslint-plugin');
const tseslintparser = require('@typescript-eslint/parser');
const prettierConfig = require('eslint-config-prettier');
const ionic = require('@ionic/eslint-config/recommended');

module.exports = [
{
ignores: ['node_modules/**', 'dist/**', 'build/**', '.build/**', 'unit-tests/**', 'android/**', 'ios/**', 'types/**', 'eslint.config.*'],
ignores: [
'node_modules/**',
'dist/**',
'build/**',
'.build/**',
'unit-tests/**',
'android/**',
'ios/**',
'types/**',
'**/*.js',
'**/*.mjs',
'**/*.cjs',
],
},
eslintjs.configs.recommended,
{
files: ['**/*.ts', '**/*.js'],
languageOptions: {
parser: tseslintparser,
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
browser: 'readonly',
window: 'readonly',
document: 'readonly',
console: 'readonly',
HTMLElement: 'readonly',
customElements: 'readonly',
ResizeObserver: 'readonly',
DOMRect: 'readonly',
setTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
clearTimeout: 'readonly',
screen: 'readonly',
navigator: 'readonly',
GeolocationPosition: 'readonly',
google: 'readonly',
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
...tseslint.configs.recommended.rules,
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
indent: ['error', 2],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
},
prettierConfig,
...ionic,
];

7 changes: 2 additions & 5 deletions plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,11 @@
"@capacitor/core": "next",
"@capacitor/docgen": "0.3.0",
"@capacitor/ios": "next",
"@ionic/eslint-config": "^0.5.0",
"@ionic/prettier-config": "^4.0.0",
"@types/resize-observer-browser": "^0.1.11",
"@types/supercluster": "^7.1.3",
"@typescript-eslint/eslint-plugin": "^8.48.0",
"@typescript-eslint/parser": "^8.48.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint": "^10.0.0",
"prettier": "^3.6.2",
"prettier-plugin-java": "^2.7.7",
"rimraf": "^6.1.2",
Expand Down
6 changes: 3 additions & 3 deletions plugin/src/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ export class GoogleMap {
initScrolling(): void {
const ionContents = document.getElementsByTagName('ion-content');

for (let i = 0; i < ionContents.length; i++) {
(ionContents[i] as any).scrollEvents = true;
for (const ionContent of Array.from(ionContents)) {
(ionContent as any).scrollEvents = true;
}

window.addEventListener('ionScroll', this.handleScrollEvent);
Expand Down Expand Up @@ -851,7 +851,7 @@ export class GoogleMap {
* @returns
*/
async setOnCircleClickListener(callback?: MapListenerCallback<CircleClickCallbackData>): Promise<void> {
if (this.onCircleClickListener) [this.onCircleClickListener.remove()];
if (this.onCircleClickListener) this.onCircleClickListener.remove();

if (callback) {
this.onCircleClickListener = await CapacitorGoogleMaps.addListener(
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ export class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogle
throw new Error('Marker library not loaded');
}

let content: HTMLElement | undefined = undefined;
let content: HTMLElement | undefined;

if (marker.iconUrl) {
const img = document.createElement('img');
Expand Down
Loading
Loading