ESLint: fix dangling commas

This commit is contained in:
Yury Bondarenko
2023-06-27 16:23:06 +02:00
parent 725dbc3743
commit 917c36dbe7
1789 changed files with 12452 additions and 12452 deletions

View File

@@ -5,7 +5,7 @@ import {
UntypedFormGroup,
NG_ASYNC_VALIDATORS,
NG_VALIDATORS,
ReactiveFormsModule
ReactiveFormsModule,
} from '@angular/forms';
import {
DynamicCheckboxGroupModel,
@@ -88,13 +88,13 @@ describe('FormBuilderService test suite', () => {
{ provide: DynamicFormValidationService, useValue: {} },
{ provide: NG_VALIDATORS, useValue: testValidator, multi: true },
{ provide: NG_ASYNC_VALIDATORS, useValue: testAsyncValidator, multi: true },
{ provide: ConfigurationDataService, useValue: configSpy }
]
{ provide: ConfigurationDataService, useValue: configSpy },
],
});
const vocabularyOptions: VocabularyOptions = {
name: 'type_programme',
closed: false
closed: false,
};
testModel = [
@@ -105,22 +105,22 @@ describe('FormBuilderService test suite', () => {
options: [
{
label: 'Option 1',
value: 'option-1'
value: 'option-1',
},
{
label: 'Option 2',
value: 'option-2'
}
value: 'option-2',
},
],
value: 'option-3'
}
value: 'option-3',
},
),
new DynamicInputModel(
{
id: 'testInput',
mask: '(000) 000-0000',
}
},
),
new DynamicCheckboxGroupModel(
@@ -130,17 +130,17 @@ describe('FormBuilderService test suite', () => {
new DynamicCheckboxModel(
{
id: 'testCheckboxGroup1',
value: true
}
value: true,
},
),
new DynamicCheckboxModel(
{
id: 'testCheckboxGroup2',
value: true
}
)
]
}
value: true,
},
),
],
},
),
new DynamicRadioGroupModel<string>(
@@ -149,15 +149,15 @@ describe('FormBuilderService test suite', () => {
options: [
{
label: 'Option 1',
value: 'option-1'
value: 'option-1',
},
{
label: 'Option 2',
value: 'option-2'
}
value: 'option-2',
},
],
value: 'option-3'
}
value: 'option-3',
},
),
new DynamicTextAreaModel({ id: 'testTextArea' }),
@@ -173,12 +173,12 @@ describe('FormBuilderService test suite', () => {
new DynamicInputModel({ id: 'testFormArrayGroupInput' }),
new DynamicFormArrayModel({
id: 'testNestedFormArray', groupFactory: () => [
new DynamicInputModel({ id: 'testNestedFormArrayGroupInput' })
]
})
new DynamicInputModel({ id: 'testNestedFormArrayGroupInput' }),
],
}),
];
}
}
},
},
),
new DynamicFormGroupModel(
@@ -186,9 +186,9 @@ describe('FormBuilderService test suite', () => {
id: 'testFormGroup',
group: [
new DynamicInputModel({ id: 'nestedTestInput' }),
new DynamicTextAreaModel({ id: 'nestedTestTextArea' })
]
}
new DynamicTextAreaModel({ id: 'nestedTestTextArea' }),
],
},
),
new DynamicSliderModel({ id: 'testSlider' }),
@@ -221,7 +221,7 @@ describe('FormBuilderService test suite', () => {
repeatable: false,
metadataFields: [],
submissionId: '1234',
hasSelectableMetadata: false
hasSelectableMetadata: false,
}),
new DynamicTagModel({
@@ -229,7 +229,7 @@ describe('FormBuilderService test suite', () => {
repeatable: false,
metadataFields: [],
submissionId: '1234',
hasSelectableMetadata: false
hasSelectableMetadata: false,
}),
new DynamicListCheckboxGroupModel({
@@ -262,9 +262,9 @@ describe('FormBuilderService test suite', () => {
selectableMetadata: [{
controlledVocabulary: 'RPAuthority',
closed: false,
metadata: 'dc.contributor.author'
}]
} as FormFieldModel]
metadata: 'dc.contributor.author',
}],
} as FormFieldModel],
} as FormRowModel, {
fields: [{
hints: 'Enter the affiliation of the author.',
@@ -276,9 +276,9 @@ describe('FormBuilderService test suite', () => {
selectableMetadata: [{
controlledVocabulary: 'OUAuthority',
closed: false,
metadata: 'local.contributor.affiliation'
}]
} as FormFieldModel]
metadata: 'local.contributor.affiliation',
}],
} as FormFieldModel],
} as FormRowModel],
mandatoryField: '',
name: 'testRelationGroup',
@@ -287,7 +287,7 @@ describe('FormBuilderService test suite', () => {
submissionScope: '',
repeatable: false,
metadataFields: [],
hasSelectableMetadata: true
hasSelectableMetadata: true,
}),
new DynamicDsDatePickerModel({ id: 'testDate' }),
@@ -297,7 +297,7 @@ describe('FormBuilderService test suite', () => {
repeatable: false,
metadataFields: [],
submissionId: '1234',
hasSelectableMetadata: true
hasSelectableMetadata: true,
}),
new DynamicLookupNameModel({
@@ -305,7 +305,7 @@ describe('FormBuilderService test suite', () => {
repeatable: false,
metadataFields: [],
submissionId: '1234',
hasSelectableMetadata: true
hasSelectableMetadata: true,
}),
new DynamicQualdropModel({ id: 'testCombobox', readOnly: false, required: false }),
@@ -320,7 +320,7 @@ describe('FormBuilderService test suite', () => {
isDraggable: true,
groupFactory: () => {
return [
new DynamicInputModel({ id: 'testFormRowArrayGroupInput' })
new DynamicInputModel({ id: 'testFormRowArrayGroupInput' }),
];
},
required: false,
@@ -328,7 +328,7 @@ describe('FormBuilderService test suite', () => {
metadataFields: ['dc.contributor.author'],
hasSelectableMetadata: true,
showButtons: true,
typeBindRelations: [{ match: 'VISIBLE', operator: 'OR', when: [{id: 'dc.type', value: 'Book' }]}]
typeBindRelations: [{ match: 'VISIBLE', operator: 'OR', when: [{id: 'dc.type', value: 'Book' }]}],
},
),
@@ -337,8 +337,8 @@ describe('FormBuilderService test suite', () => {
group: [
new DynamicInputModel({ id: 'testConcatGroup_CONCAT_FIRST_INPUT' }),
new DynamicInputModel({ id: 'testConcatGroup_CONCAT_SECOND_INPUT' }),
]
} as any)
],
} as any),
];
testFormConfiguration = {
@@ -356,10 +356,10 @@ describe('FormBuilderService test suite', () => {
{
metadata: 'journal',
controlledVocabulary: 'JOURNALAuthority',
closed: false
}
closed: false,
},
],
languageCodes: []
languageCodes: [],
} as FormFieldModel,
{
input: { type: 'onebox' },
@@ -369,10 +369,10 @@ describe('FormBuilderService test suite', () => {
hints: ' Enter issue number.',
selectableMetadata: [
{
metadata: 'issue'
}
metadata: 'issue',
},
],
languageCodes: []
languageCodes: [],
} as FormFieldModel,
{
input: { type: 'name' },
@@ -382,12 +382,12 @@ describe('FormBuilderService test suite', () => {
hints: 'Enter full name.',
selectableMetadata: [
{
metadata: 'name'
}
metadata: 'name',
},
],
languageCodes: []
} as FormFieldModel
]
languageCodes: [],
} as FormFieldModel,
],
} as FormRowModel,
{
fields: [
@@ -407,8 +407,8 @@ describe('FormBuilderService test suite', () => {
{ metadata: 'dc.identifier.isbn', label: 'ISBN' },
{ metadata: 'dc.identifier.doi', label: 'DOI' },
{ metadata: 'dc.identifier.pmid', label: 'PubMed ID' },
{ metadata: 'dc.identifier.arxiv', label: 'arXiv' }
]
{ metadata: 'dc.identifier.arxiv', label: 'arXiv' },
],
}, {
input: { type: 'onebox' },
label: 'Publisher',
@@ -417,12 +417,12 @@ describe('FormBuilderService test suite', () => {
hints: 'Enter the name of the publisher of the previously issued instance of this item.',
selectableMetadata: [
{
metadata: 'publisher'
}
metadata: 'publisher',
},
],
languageCodes: []
}
]
languageCodes: [],
},
],
} as FormRowModel,
{
fields: [
@@ -436,23 +436,23 @@ describe('FormBuilderService test suite', () => {
{
metadata: 'conference',
controlledVocabulary: 'EVENTAuthority',
closed: false
}
closed: false,
},
],
languageCodes: []
}
]
} as FormRowModel
languageCodes: [],
},
],
} as FormRowModel,
],
self: {
href: 'testFormConfiguration.url'
href: 'testFormConfiguration.url',
},
type: 'submissionform',
_links: {
self: {
href: 'testFormConfiguration.url'
}
}
href: 'testFormConfiguration.url',
},
},
} as any;
});
@@ -519,14 +519,14 @@ describe('FormBuilderService test suite', () => {
((formModel[0] as DynamicRowGroupModel).get(1) as DsDynamicInputModel).value = 'test';
value = {
issue: [new FormFieldMetadataValueObject('test')]
issue: [new FormFieldMetadataValueObject('test')],
};
expect(service.getValueFromModel(formModel)).toEqual(value);
((formModel[2] as DynamicRowGroupModel).get(0) as DynamicOneboxModel).value = 'test one';
value = {
issue: [new FormFieldMetadataValueObject('test')],
conference: [new FormFieldMetadataValueObject('test one')]
conference: [new FormFieldMetadataValueObject('test one')],
};
expect(service.getValueFromModel(formModel)).toEqual(value);
});