feat: separate prettier from eslint

This commit is contained in:
Rainer Killinger
2023-01-11 13:25:18 +01:00
committed by Thea Schöbl
parent 939fb6ef0f
commit a88d000ccd
381 changed files with 17952 additions and 38411 deletions

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
/* eslint-disable @typescript-eslint/no-non-null-assertion,@typescript-eslint/no-explicit-any */
@@ -18,11 +18,7 @@ import {CUSTOM_ELEMENTS_SCHEMA, DebugElement} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {ActivatedRoute, RouterModule} from '@angular/router';
import {IonTitle} from '@ionic/angular';
import {
TranslateLoader,
TranslateModule,
TranslateService,
} from '@ngx-translate/core';
import {TranslateLoader, TranslateModule, TranslateService} from '@ngx-translate/core';
import {sampleThingsMap} from '../../../_helpers/data/sample-things';
import {DataRoutingModule} from '../data-routing.module';
import {DataModule} from '../data.module';
@@ -63,13 +59,7 @@ describe('DataDetailComponent', () => {
},
};
const storageProviderSpy = jasmine.createSpyObj('StorageProvider', [
'init',
'get',
'has',
'put',
'search',
]);
const storageProviderSpy = jasmine.createSpyObj('StorageProvider', ['init', 'get', 'has', 'put', 'search']);
beforeEach(() => {
TestBed.configureTestingModule({
@@ -98,9 +88,7 @@ describe('DataDetailComponent', () => {
beforeEach(() => {
dataProvider = TestBed.inject(DataProvider);
translateService = TestBed.inject(TranslateService);
spyOn(dataProvider, 'get' as any).and.returnValue(
Promise.resolve(sampleThing),
);
spyOn(dataProvider, 'get' as any).and.returnValue(Promise.resolve(sampleThing));
spyOn(DataDetailComponent.prototype, 'getItem').and.callThrough();
fixture = TestBed.createComponent(DataDetailComponent);
comp = fixture.componentInstance;
@@ -118,17 +106,11 @@ describe('DataDetailComponent', () => {
it('should get a data item', () => {
comp.getItem(sampleThing.uid, false);
expect(DataDetailComponent.prototype.getItem).toHaveBeenCalledWith(
sampleThing.uid,
false,
);
expect(DataDetailComponent.prototype.getItem).toHaveBeenCalledWith(sampleThing.uid, false);
});
it('should get a data item when the view is entered', () => {
comp.ionViewWillEnter();
expect(DataDetailComponent.prototype.getItem).toHaveBeenCalledWith(
sampleThing.uid,
false,
);
expect(DataDetailComponent.prototype.getItem).toHaveBeenCalledWith(sampleThing.uid, false);
});
});