From 818531c5f5bcd796740d75e3c2830e088e1f9387 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 12:43:53 +0000 Subject: [PATCH 1/2] Initial plan From 6546ef9b41e569fc4afbde8d1981a631045af6f9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 12:57:02 +0000 Subject: [PATCH 2/2] Fix no-skip-heading-levels rule missing h4 tag in validation array Co-authored-by: yeonjuan <41323220+yeonjuan@users.noreply.github.com> --- .../lib/rules/no-skip-heading-levels.js | 2 +- .../tests/rules/no-skip-heading-levels.test.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/lib/rules/no-skip-heading-levels.js b/packages/eslint-plugin/lib/rules/no-skip-heading-levels.js index 000dcd5d..bb5ff9b8 100644 --- a/packages/eslint-plugin/lib/rules/no-skip-heading-levels.js +++ b/packages/eslint-plugin/lib/rules/no-skip-heading-levels.js @@ -40,7 +40,7 @@ module.exports = { return { Tag(node) { - if (!["h1", "h2", "h3", "h5", "h6"].includes(node.name)) { + if (!["h1", "h2", "h3", "h4", "h5", "h6"].includes(node.name)) { return; } headings.push({ diff --git a/packages/eslint-plugin/tests/rules/no-skip-heading-levels.test.js b/packages/eslint-plugin/tests/rules/no-skip-heading-levels.test.js index e75acaf9..c5bb32ec 100644 --- a/packages/eslint-plugin/tests/rules/no-skip-heading-levels.test.js +++ b/packages/eslint-plugin/tests/rules/no-skip-heading-levels.test.js @@ -45,6 +45,18 @@ ruleTester.run("no-skip-heading-levels", rule, {

one heading

+`, + }, + { + code: ` +
+

Heading 1

+

Heading 2

+

Heading 3

+

Heading 4

+
Heading 5
+
Heading 6
+
`, }, ],