Skip to content

Commit

Permalink
style(lint): yarn lint:js --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehardy committed Sep 4, 2023
1 parent 2c937dc commit b2dd6a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/app-check/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export namespace FirebaseAppCheckTypes {
/**
* The result return from `onTokenChanged`
*/
export type AppCheckListenerResult = AppCheckToken & { readonly appName: String }
export type AppCheckListenerResult = AppCheckToken & { readonly appName: string };

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Statics {
Expand Down
15 changes: 6 additions & 9 deletions packages/app-check/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ class FirebaseAppCheckModule extends FirebaseModule {
onTokenChanged(onNextOrObserver, onError, onCompletion) {

Check warning on line 151 in packages/app-check/lib/index.js

View check run for this annotation

Codecov / codecov/patch

packages/app-check/lib/index.js#L151

Added line #L151 was not covered by tests
// iOS does not provide any native listening feature
if (isIOS) {
console.warn(
'onTokenChanged is not implemented on IOS, only for Android',
);
// eslint-disable-next-line no-console
console.warn('onTokenChanged is not implemented on IOS, only for Android');

Check warning on line 155 in packages/app-check/lib/index.js

View check run for this annotation

Codecov / codecov/patch

packages/app-check/lib/index.js#L155

Added line #L155 was not covered by tests
return () => {};
}
const nextFn = this._parseListener(onNextOrObserver);

Check warning on line 158 in packages/app-check/lib/index.js

View check run for this annotation

Codecov / codecov/patch

packages/app-check/lib/index.js#L158

Added line #L158 was not covered by tests
Expand All @@ -168,15 +167,13 @@ class FirebaseAppCheckModule extends FirebaseModule {
this.eventNameForApp('onAppCheckTokenChanged'),
nextFn,
);
if(this._listenerCount === 0)
this.native.addAppCheckListener();

if (this._listenerCount === 0) this.native.addAppCheckListener();

this._listenerCount++;
return () => {
subscription.remove()
subscription.remove();
this._listenerCount--;

Check warning on line 175 in packages/app-check/lib/index.js

View check run for this annotation

Codecov / codecov/patch

packages/app-check/lib/index.js#L172-L175

Added lines #L172 - L175 were not covered by tests
if (this._listenerCount === 0)
this.native.removeAppCheckListener();
if (this._listenerCount === 0) this.native.removeAppCheckListener();
};
}
}
Expand Down

0 comments on commit b2dd6a7

Please sign in to comment.