update tslint -> eslint

This commit is contained in:
2021-05-21 20:17:26 +02:00
parent 80260df71f
commit a195fafa6b
252 changed files with 3080 additions and 2420 deletions

View File

@@ -1,8 +1,11 @@
<div *ngIf="songs$|async as songs" class="view">
<div *ngIf="songs$ | async as songs" class="view">
<swiper>
<div *ngFor="let song of songs" class="song">
<app-song-text [showSwitch]="false" [text]="song|async"
chordMode="hide"></app-song-text>
<app-song-text
[showSwitch]="false"
[text]="song | async"
chordMode="hide"
></app-song-text>
</div>
</swiper>
</div>

View File

@@ -6,12 +6,13 @@ describe('GuestComponent', () => {
let component: GuestComponent;
let fixture: ComponentFixture<GuestComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [GuestComponent]
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
declarations: [GuestComponent],
}).compileComponents();
})
.compileComponents();
}));
);
beforeEach(() => {
fixture = TestBed.createComponent(GuestComponent);
@@ -20,6 +21,6 @@ describe('GuestComponent', () => {
});
it('should create', () => {
expect(component).toBeTruthy();
void expect(component).toBeTruthy();
});
});

View File

@@ -8,28 +8,18 @@ import {ShowSongService} from '../shows/services/show-song.service';
@Component({
selector: 'app-guest',
templateUrl: './guest.component.html',
styleUrls: ['./guest.component.less']
styleUrls: ['./guest.component.less'],
})
export class GuestComponent implements OnInit {
public songs$: Observable<Observable<string>[]>;
constructor(
private songService: SongService,
private globalSettingsService: GlobalSettingsService,
private showSongService: ShowSongService,
) {
}
public constructor(private songService: SongService, private globalSettingsService: GlobalSettingsService, private showSongService: ShowSongService) {}
public ngOnInit(): void {
this.songs$ = this.globalSettingsService.get$.pipe(
map(_ => _.currentShow),
switchMap(_ => this.showSongService.list$(_)),
map(_ => _
.sort((x, y) => x.order - y.order)
.map(showSong => this.songService.read$(showSong.songId).pipe(map(song => song.text)))
)
map(_ => _.sort((x, y) => x.order - y.order).map(showSong => this.songService.read$(showSong.songId).pipe(map(song => song.text))))
);
}
}

View File

@@ -13,23 +13,16 @@ const DEFAULT_SWIPER_CONFIG: SwiperConfigInterface = {
scrollbar: false,
navigation: true,
pagination: false,
};
@NgModule({
declarations: [GuestComponent],
imports: [
CommonModule,
RouterModule.forChild([{path: '', component: GuestComponent}]),
SwiperModule,
SongTextModule
],
imports: [CommonModule, RouterModule.forChild([{path: '', component: GuestComponent}]), SwiperModule, SongTextModule],
providers: [
{
provide: SWIPER_CONFIG,
useValue: DEFAULT_SWIPER_CONFIG
}
]
useValue: DEFAULT_SWIPER_CONFIG,
},
],
})
export class GuestModule {
}
export class GuestModule {}