Skip to content

Commit 559a20e

Browse files
committed
chore: fix demo linting
1 parent 5777127 commit 559a20e

File tree

7 files changed

+19
-29
lines changed

7 files changed

+19
-29
lines changed

apps/nativescript-demo-ng/.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"prefix": "",
2525
"style": "kebab-case"
2626
}
27-
]
27+
],
28+
"@typescript-eslint/no-explicit-any": "warn",
29+
"@typescript-eslint/no-unused-vars": "warn"
2830
}
2931
},
3032
{

apps/nativescript-demo-ng/src/app/app-routing.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { NgModule } from '@angular/core';
2-
import { NativeScriptRouterModule, NSEmptyOutletComponent } from '@nativescript/angular';
32
import { Routes } from '@angular/router';
3+
import { NativeScriptRouterModule } from '@nativescript/angular';
44

5-
import { ItemsComponent } from './item/items.component';
65
import { ItemDetailComponent } from './item/item-detail.component';
6+
import { ItemsComponent } from './item/items.component';
77
// import { HomeComponent } from './home/home.component';
88
// import { BootGuardService } from './boot-guard.service';
99

@@ -21,7 +21,7 @@ const routes: Routes = [
2121
// {
2222
// path: 'home',
2323
// component: HomeComponent,
24-
// canActivate: [BootGuardService],
24+
// canActivate: [() => Promise.resolve(true)],
2525
// children: [
2626
// {
2727
// path: 'start',

apps/nativescript-demo-ng/src/app/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2-
import { NativeScriptModule, NativeScriptCommonModule, NativeScriptHttpClientModule, NativeDialogModule } from '@nativescript/angular';
2+
import { NativeDialogModule, NativeScriptHttpClientModule, NativeScriptModule } from '@nativescript/angular';
33

44
import { AppRoutingModule } from './app-routing.module';
55
import { AppComponent } from './app.component';
6-
import { ItemsComponent } from './item/items.component';
76
import { ItemDetailComponent } from './item/item-detail.component';
7+
import { ItemsComponent } from './item/items.component';
88
import { ModalComponent } from './modal/modal.component';
99

1010
/**

apps/nativescript-demo-ng/src/app/boot-guard.service.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

apps/nativescript-demo-ng/src/app/modal/modal.component.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Inject, OnDestroy, OnInit, Optional, ViewContainerRef, inject } from '@angular/core';
1+
import { Component, OnDestroy, OnInit, Optional, ViewContainerRef, inject } from '@angular/core';
22
import { ModalDialogService, NativeDialogRef, NativeDialogService } from '@nativescript/angular';
33
import { ItemService } from '../item/item.service';
44

@@ -12,7 +12,12 @@ export class ModalComponent implements OnInit, OnDestroy {
1212
logo: string;
1313
color: string;
1414

15-
constructor(@Optional() private ref: NativeDialogRef<ModalComponent>, private nativeDialog: NativeDialogService, private modalDialog: ModalDialogService, private vcRef: ViewContainerRef) {
15+
constructor(
16+
@Optional() private ref: NativeDialogRef<ModalComponent>,
17+
private nativeDialog: NativeDialogService,
18+
private modalDialog: ModalDialogService,
19+
private vcRef: ViewContainerRef,
20+
) {
1621
this.logo = this.itemService.flavors[this.itemService.currentFlavor].logo;
1722
this.color = this.itemService.flavors[this.itemService.currentFlavor].color;
1823
}
@@ -21,8 +26,8 @@ export class ModalComponent implements OnInit, OnDestroy {
2126
this.itemService.currentFlavor++;
2227
this.nativeDialog.open(ModalComponent, {
2328
nativeOptions: {
24-
fullscreen: !!global.isAndroid
25-
}
29+
fullscreen: !!global.isAndroid,
30+
},
2631
});
2732
// this.modalDialog.showModal(ModalComponent, {
2833
// viewContainerRef: this.vcRef

apps/nativescript-demo-ng/src/tests/detached-loader-tests.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class LoaderComponentBase {
1717
}
1818

1919
@Component({
20-
selector: 'loader-component-on-push',
20+
selector: 'loader-component',
2121
template: `
2222
<StackLayout>
2323
<DetachedContainer #loader></DetachedContainer>

apps/nativescript-demo-ng/src/tests/property-sets.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class TestView extends View implements NgView {
77
public meta: ViewClassMeta = { skipAddToDom: false };
88
public nodeType = 1;
99
public nodeName = 'TestView';
10-
// @ts-ignore
10+
// @ts-expect-error setter
1111
public parentNode: NgView = null;
1212
public previousSibling: NgView;
1313
public nextSibling: NgView;

0 commit comments

Comments
 (0)