chore: Upgrade Prettier 1.8 -> 2.0 (#1436)
This commit is contained in:
@ -36,18 +36,18 @@ export default class CollectionsStore extends BaseStore<Collection> {
|
||||
get orderedData(): Collection[] {
|
||||
return filter(
|
||||
naturalSort(Array.from(this.data.values()), "name"),
|
||||
d => !d.deletedAt
|
||||
(d) => !d.deletedAt
|
||||
);
|
||||
}
|
||||
|
||||
@computed
|
||||
get public(): Collection[] {
|
||||
return this.orderedData.filter(collection => !collection.private);
|
||||
return this.orderedData.filter((collection) => !collection.private);
|
||||
}
|
||||
|
||||
@computed
|
||||
get private(): Collection[] {
|
||||
return this.orderedData.filter(collection => collection.private);
|
||||
return this.orderedData.filter((collection) => collection.private);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -57,7 +57,7 @@ export default class CollectionsStore extends BaseStore<Collection> {
|
||||
get pathsToDocuments(): DocumentPath[] {
|
||||
let results = [];
|
||||
const travelDocuments = (documentList, collectionId, path) =>
|
||||
documentList.forEach(document => {
|
||||
documentList.forEach((document) => {
|
||||
const { id, title, url } = document;
|
||||
const node = { id, collectionId, title, url, type: "document" };
|
||||
results.push(concat(path, node));
|
||||
@ -65,7 +65,7 @@ export default class CollectionsStore extends BaseStore<Collection> {
|
||||
});
|
||||
|
||||
if (this.isLoaded) {
|
||||
this.data.forEach(collection => {
|
||||
this.data.forEach((collection) => {
|
||||
const { id, name, url } = collection;
|
||||
const node = {
|
||||
id,
|
||||
@ -79,7 +79,7 @@ export default class CollectionsStore extends BaseStore<Collection> {
|
||||
});
|
||||
}
|
||||
|
||||
return results.map(result => {
|
||||
return results.map((result) => {
|
||||
const tail = last(result);
|
||||
return {
|
||||
...tail,
|
||||
@ -89,11 +89,11 @@ export default class CollectionsStore extends BaseStore<Collection> {
|
||||
}
|
||||
|
||||
getPathForDocument(documentId: string): ?DocumentPath {
|
||||
return this.pathsToDocuments.find(path => path.id === documentId);
|
||||
return this.pathsToDocuments.find((path) => path.id === documentId);
|
||||
}
|
||||
|
||||
titleForDocument(documentUrl: string): ?string {
|
||||
const path = this.pathsToDocuments.find(path => path.url === documentUrl);
|
||||
const path = this.pathsToDocuments.find((path) => path.url === documentUrl);
|
||||
if (path) return path.title;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user