diff --git a/server/config-service.ts b/server/config-service.ts index 7d1d22e..e8846cd 100644 --- a/server/config-service.ts +++ b/server/config-service.ts @@ -5,9 +5,7 @@ import Config from '../types/Config'; const homedir = os.homedir(); -const configFile = process.env.MOCK - ? '.sample.npmfrogrc.json' - : '.npmfrogrc.json'; +const configFile = process.env.MOCK ? '.sample.npmfrogrc.json' : '.npmfrogrc.json'; let config: Config; try { diff --git a/src/views/PackageDetail.vue b/src/views/PackageDetail.vue index 22ccfe5..a68274a 100644 --- a/src/views/PackageDetail.vue +++ b/src/views/PackageDetail.vue @@ -98,12 +98,8 @@

@@ -112,7 +108,7 @@ > This file is too big to show it's content (> {{maxSizeToShowContent / 1000}} kB). - This filetype ({{data.activeTreeItem.type}}) is not supported. + This filetype ({{`${data.activeTreeItem.type}`}}) is not supported.

But you can download it here: @@ -526,10 +522,11 @@ export default class PackageDetail extends Vue { private isHighlightableType(item: TreeItem): boolean { return ( - item.type !== undefined && - (item.type.endsWith('json') || - item.type.endsWith('application/javascript') || - item.type.startsWith('text')) + item.type === null || + (item.type !== undefined && + (item.type.endsWith('json') || + item.type.endsWith('application/javascript') || + item.type.startsWith('text'))) ); } diff --git a/types/Crafter.ts b/types/Crafter.ts index 76c7964..724d925 100644 --- a/types/Crafter.ts +++ b/types/Crafter.ts @@ -24,10 +24,7 @@ export default class Crafter extends Searchable { private static lastUsedColorNumber: number = -1; private static colors: string[] = Object.keys(vuetifyColors).filter(color => { - return ( - !forbiddenColors.some(forbidden => forbidden === color) && - !color.startsWith('light') - ); + return !forbiddenColors.some(forbidden => forbidden === color) && !color.startsWith('light'); }); private static allCrafters: Crafter[] = []; @@ -61,9 +58,7 @@ export default class Crafter extends Searchable { Object.assign(this, author); } } - const alreadyCreatedCrafter = Crafter.allCrafters.find(crafter => - crafter.equals(this), - ); + const alreadyCreatedCrafter = Crafter.allCrafters.find(crafter => crafter.equals(this)); if (alreadyCreatedCrafter) { return alreadyCreatedCrafter; } else { @@ -75,10 +70,7 @@ export default class Crafter extends Searchable { if (other instanceof Crafter && other.equals(this)) { return true; } - if ( - other instanceof Package && - other.crafters.some(crafter => crafter.equals(this)) - ) { + if (other instanceof Package && other.crafters.some(crafter => crafter.equals(this))) { return true; } for (const item of packages) { @@ -101,12 +93,7 @@ export default class Crafter extends Searchable { `collaborator:${this.name}`, ); } - text.push( - this.name || '', - this.email || '', - this.url || '', - this.initials || '', - ); + text.push(this.name || '', this.email || '', this.url || '', this.initials || ''); return text; } @@ -118,10 +105,6 @@ export default class Crafter extends Searchable { if (this.email && other.email) { return this.email === other.email; } - return ( - this.name === other.name && - this.email === other.email && - this.url === other.url - ); + return this.name === other.name && this.email === other.email && this.url === other.url; } }