fix eslint warnigs for core project (#7506)

This commit is contained in:
Denys Vuika
2022-02-17 14:35:33 +00:00
committed by GitHub
parent 5b7f255eec
commit bca5a783ab
246 changed files with 5127 additions and 5065 deletions

View File

@@ -93,7 +93,7 @@ export class CardViewSelectItemComponent extends BaseCardView<CardViewSelectItem
onChange(event: MatSelectChange): void {
const selectedOption = event.value !== undefined ? event.value : null;
this.cardViewUpdateService.update(<CardViewSelectItemModel<string>> { ...this.property }, selectedOption);
this.cardViewUpdateService.update({ ...this.property } as CardViewSelectItemModel<string>, selectedOption);
this.property.value = selectedOption;
}

View File

@@ -44,9 +44,9 @@ export class TestComponent {
showInputFilter = true;
multiple = false;
standardOptions = [
{ 'id': '1', 'name': 'one' },
{ 'id': '2', 'name': 'two' },
{ 'id': '3', 'name': 'three' }
{ id: '1', name: 'one' },
{ id: '2', name: 'two' },
{ id: '3', name: 'three' }
];
options = this.standardOptions;
@@ -136,7 +136,7 @@ describe('SelectFilterInputComponent', () => {
component.onModelChange('some-search-term');
expect(component.term).toBe('some-search-term');
component.selectFilterInput.nativeElement.dispatchEvent(new KeyboardEvent('keydown', {'keyCode': ESCAPE} as any));
component.selectFilterInput.nativeElement.dispatchEvent(new KeyboardEvent('keydown', {keyCode: ESCAPE} as any));
fixture.detectChanges();
expect(component.term).toBe('');
});
@@ -152,10 +152,10 @@ describe('SelectFilterInputComponent', () => {
afterEach(() => testFixture.destroy());
it('should preserve the values for multiple search', async () => {
const userSelection = [{ 'id': '3', 'name': 'three' }];
const userSelection = [{ id: '3', name: 'three' }];
const preSelected = [
{ 'id': '1', 'name': 'one' },
{ 'id': '2', 'name': 'two' }
{ id: '1', name: 'one' },
{ id: '2', name: 'two' }
];
testComponent.field.value = preSelected;
testComponent.multiple = true;

View File

@@ -25,7 +25,7 @@ import { takeUntil } from 'rxjs/operators';
selector: 'adf-select-filter-input',
templateUrl: './select-filter-input.component.html',
styleUrls: ['./select-filter-input.component.scss'],
host: { 'class': 'adf-select-filter-input' },
host: { class: 'adf-select-filter-input' },
encapsulation: ViewEncapsulation.None
})
export class SelectFilterInputComponent implements OnInit, OnDestroy {
@@ -79,6 +79,7 @@ export class SelectFilterInputComponent implements OnInit, OnDestroy {
this.previousSelected = values;
if (restoreSelection) {
// eslint-disable-next-line no-underscore-dangle
this.matSelect._onChange(values);
}
});