mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
Sonarcloud issues fixes (#3499)
* Sonarcloud issues fixes * Code smell fixes * Refactoring to remove new code duplications * Sonarcloud code smell fixes part I * Sonarcloud code smell fixes part II * Missing code smell fix * Add new ESLint rules to cover fixed SonarCloud issues * Add missing command * Add missing is existing check
This commit is contained in:
@@ -52,6 +52,4 @@ export class NavigateToParentFolder implements Action {
|
||||
|
||||
export class NavigateToPreviousPage implements Action {
|
||||
readonly type = RouterActionTypes.NavigateToPreviousPage;
|
||||
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ export enum SearchActionTypes {
|
||||
|
||||
export class SearchAction implements Action {
|
||||
readonly type = SearchActionTypes.Search;
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
export class SearchByTermAction implements Action {
|
||||
|
||||
@@ -28,14 +28,10 @@ import { TemplateActionTypes } from './template-action-types';
|
||||
|
||||
export class FileFromTemplate implements Action {
|
||||
readonly type = TemplateActionTypes.FileFromTemplate;
|
||||
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
export class FolderFromTemplate implements Action {
|
||||
readonly type = TemplateActionTypes.FolderFromTemplate;
|
||||
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
export class CreateFromTemplate implements Action {
|
||||
|
||||
@@ -67,7 +67,7 @@ export class RouterEffects {
|
||||
this.actions$.pipe(
|
||||
ofType<NavigateToFolder>(RouterActionTypes.NavigateFolder),
|
||||
map((action) => {
|
||||
if (action.payload && action.payload.entry) {
|
||||
if (action.payload?.entry) {
|
||||
this.navigateToFolder(action.payload.entry);
|
||||
}
|
||||
})
|
||||
@@ -80,7 +80,7 @@ export class RouterEffects {
|
||||
this.actions$.pipe(
|
||||
ofType<NavigateToParentFolder>(RouterActionTypes.NavigateParentFolder),
|
||||
map((action) => {
|
||||
if (action.payload && action.payload.entry) {
|
||||
if (action.payload?.entry) {
|
||||
this.navigateToParentFolder(action.payload.entry);
|
||||
}
|
||||
})
|
||||
@@ -101,7 +101,7 @@ export class RouterEffects {
|
||||
let link: any[] = null;
|
||||
const { path, id } = node;
|
||||
|
||||
if (path && path.name && path.elements) {
|
||||
if (path?.name && path?.elements) {
|
||||
const isLibraryPath = this.isLibraryContent(path);
|
||||
|
||||
const parent = path.elements[path.elements.length - 1];
|
||||
@@ -126,7 +126,7 @@ export class RouterEffects {
|
||||
let link: any[] = null;
|
||||
const { path } = node;
|
||||
|
||||
if (path && path.name && path.elements) {
|
||||
if (path?.name && path?.elements) {
|
||||
const isLibraryPath = this.isLibraryContent(path);
|
||||
|
||||
const parent = path.elements[path.elements.length - 1];
|
||||
|
||||
Reference in New Issue
Block a user