From 46c112edfdcb40681a8997ec4f47b413a08fdd14 Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 5 Apr 2024 15:09:35 +0100 Subject: Enforce that text is wrapped in , remaining cases (#3421) * Toggle.Button -> Toggle.ButtonWithText * Simplify Prompt.Cancel/Action * Move lines down for better diff * Remove ButtonWithText * Simplify types * Enforce Button/ButtonText nesting * Add suggested wrapper in linter error * Check ancestry too * Also check literals * Rm ts-ignore --- .eslintrc.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index df0c76230..a999fd24b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,17 +23,12 @@ module.exports = { 'bsky-internal/avoid-unwrapped-text': [ 'error', { - impliedTextComponents: [ - 'Button', // TODO: Not always safe. - 'H1', - 'H2', - 'H3', - 'H4', - 'H5', - 'H6', - 'P', - ], + impliedTextComponents: ['H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'P'], impliedTextProps: [], + suggestedTextWrappers: { + Button: 'ButtonText', + 'ToggleButton.Button': 'ToggleButton.ButtonText', + }, }, ], 'simple-import-sort/imports': [ -- cgit 1.4.1