From 9da1bb0f4aa44849b56e8c2064afd582ea8b36f8 Mon Sep 17 00:00:00 2001 From: Thomas Hockaday Date: Tue, 3 Oct 2023 19:15:21 +0100 Subject: [PATCH] [New] `no-invalid-html-attribute`: add support for `apple-touch-startup-image` `rel` attributes in `link` tags --- CHANGELOG.md | 2 ++ lib/rules/no-invalid-html-attribute.js | 1 + tests/lib/rules/no-invalid-html-attribute.js | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dfc22d380..1b69232437 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,14 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ### Added * [`sort-prop-types`]: give errors on TS types ([#3615][] @akulsr0) +* [`no-invalid-html-attribute`]: add support for `apple-touch-startup-image` `rel` attributes in `link` tags ([#3638][] @thomashockaday) ### Fixed * [`jsx-no-leaked-render`]: preserve RHS parens for multiline jsx elements while fixing ([#3623][] @akulsr0) * [`jsx-key`]: detect conditional returns ([#3630][] @yialo) * [`jsx-newline`]: prevent a crash when `allowMultilines ([#3633][] @ljharb) +[#3638]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3638 [#3633]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3633 [#3630]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3630 [#3623]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3623 diff --git a/lib/rules/no-invalid-html-attribute.js b/lib/rules/no-invalid-html-attribute.js index 01d4927d2b..1dd4d0f44b 100644 --- a/lib/rules/no-invalid-html-attribute.js +++ b/lib/rules/no-invalid-html-attribute.js @@ -17,6 +17,7 @@ const getMessageData = require('../util/message'); const rel = new Map([ ['alternate', new Set(['link', 'area', 'a'])], ['apple-touch-icon', new Set(['link'])], + ['apple-touch-startup-image', new Set(['link'])], ['author', new Set(['link', 'area', 'a'])], ['bookmark', new Set(['area', 'a'])], ['canonical', new Set(['link'])], diff --git a/tests/lib/rules/no-invalid-html-attribute.js b/tests/lib/rules/no-invalid-html-attribute.js index aae4c39253..f1e20aa9a6 100644 --- a/tests/lib/rules/no-invalid-html-attribute.js +++ b/tests/lib/rules/no-invalid-html-attribute.js @@ -230,6 +230,12 @@ ruleTester.run('no-invalid-html-attribute', rule, { { code: '', }, + { + code: '', + }, + { + code: '', + }, { code: '', },