From 6d5057dd98ae4ce5256d489b109750f3acd41b64 Mon Sep 17 00:00:00 2001 From: danactive Date: Sat, 5 Jun 2021 12:21:41 -0700 Subject: [PATCH] fix(CI): Remove codeclimate and bettercodehub as too many distractions --- .bettercodehub.yml | 4 ---- .codeclimate.yml | 20 -------------------- README.md | 1 - app/src/lib/utils.js | 6 +----- 4 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 .bettercodehub.yml delete mode 100644 .codeclimate.yml diff --git a/.bettercodehub.yml b/.bettercodehub.yml deleted file mode 100644 index 65f5a58f7..000000000 --- a/.bettercodehub.yml +++ /dev/null @@ -1,4 +0,0 @@ -exclude: - - /ui/*.* - - /api/server/plugins/editAlbum/public/lib/json_to_xml.js - - /api/server/plugins/album/public/lib/color-thief.js diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 8af30b907..000000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,20 +0,0 @@ -engines: - duplication: - enabled: true - config: - languages: - javascript: - mass_threshold: 70 - -ratings: - paths: - - "**.js" - - "**.jsx" - -exclude_paths: - - "server/plugins/album/public/lib/color-thief.js" - - "server/plugins/album/test/cases.js" - - "server/plugins/editAlbum/public/lib/json_to_xml.js" - - "server/plugins/editAlbum/public/admin-edit-xml-tested.js" - - "server/plugins/editAlbum/public/edit_admin_xml.js" - - "ui" diff --git a/README.md b/README.md index af4b678a2..5a6fdf914 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ Your personal **history** storyboarded with photo and video albums. Associate ph |---|---| | CI | [![Build Status](https://api.travis-ci.com/danactive/history.png?branch=master)](https://travis-ci.com/danactive/history) | | Dependencies | [![Dependencies Status](https://david-dm.org/danactive/history.svg)](https://david-dm.org/danactive/history) [![DevDependencies Status](https://david-dm.org/danactive/history/dev-status.svg)](https://david-dm.org/danactive/history#info=devDependencies) | -| Code Quality | [![Code Climate](https://codeclimate.com/github/danactive/history/badges/gpa.svg)](https://codeclimate.com/github/danactive/history) [![BCH compliance](https://bettercodehub.com/edge/badge/danactive/history?branch=master)](https://bettercodehub.com/) | | Security | [![Known Vulnerabilities](https://snyk.io/test/github/danactive/history/badge.svg)](https://app.snyk.io/org/danactive/project/ca45a886-fc61-402f-9cd1-69bf22b35f24) | | Test Coverage | [![Coverage Status](https://coveralls.io/repos/github/danactive/history/badge.svg?branch=master)](https://coveralls.io/github/danactive/history?branch=master) | | License | [![MIT Licensed](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](http://opensource.org/licenses/MIT) | diff --git a/app/src/lib/utils.js b/app/src/lib/utils.js index a446cf680..fd68a3bd2 100644 --- a/app/src/lib/utils.js +++ b/app/src/lib/utils.js @@ -42,11 +42,7 @@ const file = { }, mimeType: (extension) => customMime(extension) || mime.lookup(extension), mediumType: (extension) => { - if (!extension) { - return false - } - - if (typeof extension !== 'string') { + if (!extension || typeof extension !== 'string') { return false }