From c3922be06e3ab0586b354610fe7909fa8bcd987d Mon Sep 17 00:00:00 2001 From: Dani Guardiola Date: Tue, 28 May 2024 17:54:54 +0200 Subject: [PATCH] Disable entities rule inline. --- .eslintrc.js | 1 - packages/components/src/animate/stories/index.story.tsx | 2 ++ packages/components/src/dropdown/stories/index.story.tsx | 4 ++++ .../components/src/keyboard-shortcuts/stories/index.story.tsx | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8a9a6dffc2305..9240b96c033b4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -108,7 +108,6 @@ module.exports = { 'error', { props: 'never', children: 'never' }, ], - 'react/no-unescaped-entities': 'off', '@wordpress/dependency-group': 'error', '@wordpress/wp-global-usage': 'error', '@wordpress/react-no-unsafe-timeout': 'error', diff --git a/packages/components/src/animate/stories/index.story.tsx b/packages/components/src/animate/stories/index.story.tsx index 365e7bcaedf85..de28495a97fc5 100644 --- a/packages/components/src/animate/stories/index.story.tsx +++ b/packages/components/src/animate/stories/index.story.tsx @@ -28,8 +28,10 @@ Default.args = { children: ( { className } ) => (

+ { /* eslint-disable react/no-unescaped-entities */ } No default animation. Use one of type = "appear", "slide-in", or "loading". + { /* eslint-enable react/no-unescaped-entities */ }

), diff --git a/packages/components/src/dropdown/stories/index.story.tsx b/packages/components/src/dropdown/stories/index.story.tsx index 7964e5b356895..3df2f78345066 100644 --- a/packages/components/src/dropdown/stories/index.story.tsx +++ b/packages/components/src/dropdown/stories/index.story.tsx @@ -66,7 +66,9 @@ WithMorePadding.args = { ...Default.args, renderContent: () => ( + { /* eslint-disable react/no-unescaped-entities */ } Content wrapped with paddingSize="medium". + { /* eslint-enable react/no-unescaped-entities */ } ), }; @@ -81,7 +83,9 @@ WithNoPadding.args = { ...Default.args, renderContent: () => ( + { /* eslint-disable react/no-unescaped-entities */ } Content wrapped with paddingSize="none". + { /* eslint-enable react/no-unescaped-entities */ } ), }; diff --git a/packages/components/src/keyboard-shortcuts/stories/index.story.tsx b/packages/components/src/keyboard-shortcuts/stories/index.story.tsx index df7df46e5edfc..9e3a1e207451b 100644 --- a/packages/components/src/keyboard-shortcuts/stories/index.story.tsx +++ b/packages/components/src/keyboard-shortcuts/stories/index.story.tsx @@ -32,7 +32,9 @@ Default.args = { }, children: (
+ { /* eslint-disable react/no-unescaped-entities */ }

Hit the "a" or "b" key in this textarea:

+ { /* eslint-enable react/no-unescaped-entities */ }