From 5248e38f772438d7f40bb92785edbd814c94024d Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Mon, 20 Nov 2023 20:42:08 +0100 Subject: [PATCH] chore(lint): enable requireDefaultForNonUnion option --- .eslintrc.js | 5 ++++- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4aa087a69ce..a4484d52187 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -106,7 +106,10 @@ module.exports = defineConfig({ 'error', { allowNumber: true, allowBoolean: true }, ], - '@typescript-eslint/switch-exhaustiveness-check': 'error', + '@typescript-eslint/switch-exhaustiveness-check': [ + 'error', + { requireDefaultForNonUnion: true }, + ], '@typescript-eslint/unbound-method': 'off', '@typescript-eslint/unified-signatures': 'off', // incompatible with our api docs generation diff --git a/package.json b/package.json index 8c6d03c068b..a0df05738e1 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@eslint-types/deprecation": "2.0.0-1", "@eslint-types/jsdoc": "~46.9.0", "@eslint-types/prettier": "5.0.1-1", - "@eslint-types/typescript-eslint": "~6.11.0", + "@eslint-types/typescript-eslint": "~6.12.0", "@eslint-types/unicorn": "~49.0.0", "@types/markdown-it": "~13.0.6", "@types/node": "~20.9.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b05f467d90..fdda6adc0a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,8 +17,8 @@ devDependencies: specifier: 5.0.1-1 version: 5.0.1-1 '@eslint-types/typescript-eslint': - specifier: ~6.11.0 - version: 6.11.0 + specifier: ~6.12.0 + version: 6.12.0 '@eslint-types/unicorn': specifier: ~49.0.0 version: 49.0.0 @@ -900,8 +900,8 @@ packages: resolution: {integrity: sha512-z6B+TnNPZn9GiwfGBgkyE2eK8tnvnzE4Uy/4EkJHB0GJwin8jYD9RMAAwJauKQgUnJ42/Iox6k7BVnHpSbcmBg==} dev: true - /@eslint-types/typescript-eslint@6.11.0: - resolution: {integrity: sha512-6IpcTD2brrOtSvvjmHvLHqubrmqj1wFhGWda+lA5fPlPIqhJYccL/mz2yONKQfQdh9kV7xd2tuVq7O2ylZd3iA==} + /@eslint-types/typescript-eslint@6.12.0: + resolution: {integrity: sha512-N8cbOYjyFl2BFgDhDgHhTGpgiMkFg0CoITG5hdBm9ZGmcEgUvFBnHvHG7qJl3qVEmFnoKUdfSAcr7MRb2/Jxvw==} dev: true /@eslint-types/unicorn@49.0.0: