mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Resolve lint issues due to new default rules
We could turn these rules off, but it seems that they indicate some important inconsistencies.
A few cases have been ignored inline because they should be investigated in more detail, which is out of scope for this PR:
- Metadata representation components compare `BrowseByDataType` to a `ResourceType`. Could be related to #2949.
- We assume that dynamic form dates are always represented by strings, but they can also be `Date` or `object` according to the library (see da1742ce05/projects/ng-dynamic-forms/core/src/lib/model/dynamic-date-control.model.ts (L5)
)
This commit is contained in:
@@ -68,8 +68,8 @@ export abstract class FieldParser {
|
||||
|
||||
public parse() {
|
||||
if (((this.getInitValueCount() > 1 && !this.configData.repeatable) || (this.configData.repeatable))
|
||||
&& (this.configData.input.type !== ParserType.List)
|
||||
&& (this.configData.input.type !== ParserType.Tag)
|
||||
&& (this.configData.input.type !== ParserType.List.valueOf())
|
||||
&& (this.configData.input.type !== ParserType.Tag.valueOf())
|
||||
) {
|
||||
let arrayCounter = 0;
|
||||
let fieldArrayCounter = 0;
|
||||
@@ -81,7 +81,7 @@ export abstract class FieldParser {
|
||||
}
|
||||
|
||||
let isDraggable = true;
|
||||
if (this.configData.input.type === ParserType.Onebox && this.configData?.selectableMetadata?.length > 1) {
|
||||
if (this.configData.input.type === ParserType.Onebox.valueOf() && this.configData?.selectableMetadata?.length > 1) {
|
||||
isDraggable = false;
|
||||
}
|
||||
const config = {
|
||||
@@ -344,12 +344,12 @@ export abstract class FieldParser {
|
||||
&& isNotEmpty(fieldScope)
|
||||
&& isNotEmpty(visibility)
|
||||
&& ((
|
||||
submissionScope === SubmissionScopeType.WorkspaceItem
|
||||
submissionScope === SubmissionScopeType.WorkspaceItem.valueOf()
|
||||
&& visibility.main === VisibilityType.READONLY
|
||||
)
|
||||
||
|
||||
(visibility.other === VisibilityType.READONLY
|
||||
&& submissionScope === SubmissionScopeType.WorkflowItem
|
||||
&& submissionScope === SubmissionScopeType.WorkflowItem.valueOf()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user