Update linter

This commit is contained in:
Thomas Nordquist
2020-04-16 10:56:46 +02:00
parent 19e8bfdb37
commit 30af13f793
53 changed files with 92 additions and 97 deletions

View File

@@ -156,8 +156,8 @@ export class TreeNode<ViewModel extends Destroyable> {
public path(): string {
if (!this.cachedPath) {
return this.branch()
.map((node) => node.sourceEdge && node.sourceEdge.name)
.filter((name) => name !== undefined)
.map(node => node.sourceEdge && node.sourceEdge.name)
.filter(name => name !== undefined)
.join('/')
}
@@ -214,7 +214,7 @@ export class TreeNode<ViewModel extends Destroyable> {
public leafMessageCount(): number {
if (this.cachedLeafMessageCount === undefined) {
this.cachedLeafMessageCount =
this.edgeArray.map((edge) => edge.target.leafMessageCount()).reduce((a, b) => a + b, 0) + this.messages
this.edgeArray.map(edge => edge.target.leafMessageCount()).reduce((a, b) => a + b, 0) + this.messages
}
return this.cachedLeafMessageCount as number
@@ -223,7 +223,7 @@ export class TreeNode<ViewModel extends Destroyable> {
public childTopicCount(): number {
if (this.cachedChildTopicCount === undefined) {
this.cachedChildTopicCount = this.edgeArray
.map((e) => e.target.childTopicCount())
.map(e => e.target.childTopicCount())
.reduce((a, b) => a + b, this.hasMessage() ? 1 : 0)
}
@@ -239,7 +239,7 @@ export class TreeNode<ViewModel extends Destroyable> {
const initialValue = this.message && this.message.value ? [this] : []
this.cachedChildTopics = this.edgeArray
.map((e) => e.target.childTopics())
.map(e => e.target.childTopics())
.reduce((a, b) => a.concat(b), initialValue)
}