From fa26a44789e6cd808cfcf0007d7c4e10b333cef7 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Tue, 7 Nov 2023 23:43:58 +0100 Subject: infra(typescript-eslint): switch-exhaustiveness-check (#2519) --- .eslintrc.js | 1 + src/modules/color/index.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 16d720b9..6636c8f3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -101,6 +101,7 @@ module.exports = defineConfig({ 'error', { allowNumber: true, allowBoolean: true }, ], + '@typescript-eslint/switch-exhaustiveness-check': 'error', '@typescript-eslint/unbound-method': 'off', '@typescript-eslint/unified-signatures': 'off', // incompatible with our api docs generation diff --git a/src/modules/color/index.ts b/src/modules/color/index.ts index ee626e09..5962ef71 100644 --- a/src/modules/color/index.ts +++ b/src/modules/color/index.ts @@ -64,6 +64,8 @@ function formatHexColor( case 'lower': hexColor = hexColor.toLowerCase(); break; + case 'mixed': + // Do nothing } if (options?.prefix) { @@ -156,6 +158,7 @@ function toColorFormat( return toCSS(values, cssFunction, space); case 'binary': return toBinary(values); + case 'decimal': default: return values; } -- cgit v1.2.3