tslint arrow-parens rule (#4003)

This commit is contained in:
Eugenio Romano
2018-11-23 01:06:56 +00:00
committed by GitHub
parent 51bb6a420f
commit 34a30c0f14
194 changed files with 725 additions and 723 deletions
@@ -79,11 +79,11 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
switchMap(this.saveNode.bind(this))
)
.subscribe(
updatedNode => {
(updatedNode) => {
Object.assign(this.node, updatedNode);
this.alfrescoApiService.nodeUpdated.next(this.node);
},
error => this.logService.error(error)
(error) => this.logService.error(error)
);
this.loadProperties(this.node);
@@ -36,7 +36,7 @@ export class AspectOrientedConfigService implements ContentMetadataConfig {
const newGroup = this.getOrganisedPropertyGroup(propertyGroups, aspectName);
return groupAccumulator.concat(newGroup);
}, [])
.filter(organisedPropertyGroup => organisedPropertyGroup.properties.length > 0);
.filter((organisedPropertyGroup) => organisedPropertyGroup.properties.length > 0);
}
private getOrganisedPropertyGroup(propertyGroups, aspectName) {
@@ -52,7 +52,7 @@ export class AspectOrientedConfigService implements ContentMetadataConfig {
} else {
properties = (<string[]> aspectProperties)
.map((propertyName) => getProperty(propertyGroups, aspectName, propertyName))
.filter(props => props !== undefined);
.filter((props) => props !== undefined);
}
newGroup = [ { title: group.title, properties } ];
@@ -34,7 +34,7 @@ export class IndifferentConfigService implements ContentMetadataConfig {
properties = propertyGroup.properties;
return Object.assign({}, propertyGroup, {
properties: Object.keys(properties).map(propertyName => properties[propertyName])
properties: Object.keys(properties).map((propertyName) => properties[propertyName])
});
});
}
@@ -51,7 +51,7 @@ export class LayoutOrientedConfigService implements ContentMetadataConfig {
private flattenItems(items) {
return items.reduce((accumulator, item) => {
const properties = Array.isArray(item.properties) ? item.properties : [item.properties];
const flattenedProperties = properties.map(propertyName => {
const flattenedProperties = properties.map((propertyName) => {
return {
groupName: item.aspect || item.type,
propertyName
@@ -64,7 +64,7 @@ export class LayoutOrientedConfigService implements ContentMetadataConfig {
private getMatchingGroups(groupName: string): LayoutOrientedConfigItem[] {
return this.config
.map(layoutBlock => layoutBlock.items)
.map((layoutBlock) => layoutBlock.items)
.reduce((accumulator, items) => accumulator.concat(items), [])
.filter((item) => item.aspect === groupName || item.type === groupName);
}
@@ -22,7 +22,7 @@ const emptyGroup = {
};
function convertObjectToArray(object: any): Property[] {
return Object.keys(object).map(key => object[key]);
return Object.keys(object).map((key) => object[key]);
}
export function getGroup(propertyGroups: PropertyGroupContainer, groupName: string): PropertyGroup | undefined {
@@ -48,13 +48,13 @@ export class ContentMetadataService {
const config = this.contentMetadataConfigFactory.get(presetName),
groupNames = node.aspectNames
.concat(node.nodeType)
.filter(groupName => config.isGroupAllowed(groupName));
.filter((groupName) => config.isGroupAllowed(groupName));
if (groupNames.length > 0) {
groupedProperties = this.propertyDescriptorsService.load(groupNames).pipe(
map(groups => config.reorganiseByConfig(groups)),
map(groups => this.setTitleToNameIfNotSet(groups)),
map(groups => this.propertyGroupTranslatorService.translateToCardViewGroups(groups, node.properties))
map((groups) => config.reorganiseByConfig(groups)),
map((groups) => this.setTitleToNameIfNotSet(groups)),
map((groups) => this.propertyGroupTranslatorService.translateToCardViewGroups(groups, node.properties))
);
}
}
@@ -63,7 +63,7 @@ export class ContentMetadataService {
}
setTitleToNameIfNotSet(propertyGroups: OrganisedPropertyGroup[]): OrganisedPropertyGroup[] {
propertyGroups.map(propertyGroup => {
propertyGroups.map((propertyGroup) => {
propertyGroup.title = propertyGroup.title || propertyGroup.name;
});
return propertyGroups;
@@ -30,8 +30,8 @@ export class PropertyDescriptorsService {
load(groupNames: string[]): Observable<PropertyGroupContainer> {
const groupFetchStreams = groupNames
.map(groupName => groupName.replace(':', '_'))
.map(groupName => defer( () => this.alfrescoApiService.classesApi.getClass(groupName)) );
.map((groupName) => groupName.replace(':', '_'))
.map((groupName) => defer( () => this.alfrescoApiService.classesApi.getClass(groupName)) );
return forkJoin(groupFetchStreams).pipe(
map(this.convertToObject)
@@ -50,7 +50,7 @@ export class PropertyGroupTranslatorService {
}
public translateToCardViewGroups(propertyGroups: OrganisedPropertyGroup[], propertyValues): CardViewGroup[] {
return propertyGroups.map(propertyGroup => {
return propertyGroups.map((propertyGroup) => {
const translatedPropertyGroup: any = Object.assign({}, propertyGroup);
translatedPropertyGroup.properties = this.translateArray(propertyGroup.properties, propertyValues);
return translatedPropertyGroup;
@@ -58,7 +58,7 @@ export class PropertyGroupTranslatorService {
}
private translateArray(properties: Property[], propertyValues: any): CardViewItem[] {
return properties.map(property => {
return properties.map((property) => {
return this.translate(property, propertyValues);
});
}