From f4754422e64d755a04d00026a3babf70a6e2a21d Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 10 Mar 2022 11:46:58 -0500 Subject: [PATCH] Add default-case-last rule and fix issues --- .eslintrc.js | 1 + src/components/subtitlesettings/subtitleappearancehelper.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index fa7afae712..f5c83f13dc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -37,6 +37,7 @@ module.exports = { 'brace-style': ['error', '1tbs', { 'allowSingleLine': true }], 'comma-dangle': ['error', 'never'], 'comma-spacing': ['error'], + 'default-case-last': ['error'], 'eol-last': ['error'], 'indent': ['error', 4, { 'SwitchCase': 1 }], 'jsx-quotes': ['error', 'prefer-single'], diff --git a/src/components/subtitlesettings/subtitleappearancehelper.js b/src/components/subtitlesettings/subtitleappearancehelper.js index 1834cafa17..52a84bc2dc 100644 --- a/src/components/subtitlesettings/subtitleappearancehelper.js +++ b/src/components/subtitlesettings/subtitleappearancehelper.js @@ -22,8 +22,8 @@ function getTextStyles(settings, preview) { case 'large': list.push({ name: 'font-size', value: '1.72em' }); break; - default: case 'medium': + default: list.push({ name: 'font-size', value: '1.36em' }); break; } @@ -41,8 +41,8 @@ function getTextStyles(settings, preview) { case 'none': list.push({ name: 'text-shadow', value: 'none' }); break; - default: case 'dropshadow': + default: list.push({ name: 'text-shadow', value: '#000000 0px 0px 7px' }); break; }