Skip to content

fix(linter): exclude .introductory from headingless check#5249

Open
marcoscaceres wants to merge 1 commit intomainfrom
fix/4201-introductory-headingless
Open

fix(linter): exclude .introductory from headingless check#5249
marcoscaceres wants to merge 1 commit intomainfrom
fix/4201-introductory-headingless

Conversation

@marcoscaceres
Copy link
Copy Markdown
Contributor

Closes #4201

@marcoscaceres marcoscaceres requested a review from Copilot May 4, 2026 01:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the no-headingless-sections linter rule to exclude “introductory” sections from the heading requirement (per #4201).

Changes:

  • Excludes section.introductory from the headingless-sections query selector.
  • Adds a spec ensuring introductory sections without headings do not trigger warnings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/spec/core/linter-rules/no-headingless-sections-spec.js Adds test coverage for excluding .introductory sections from warnings.
src/core/linter-rules/no-headingless-sections.js Updates selector to skip .introductory sections during linting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<h2>Normal section</h2>
</section>
`;
const opts = makeStandardOps(config, body);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makeStandardOps is the correct name — it's exported from tests/spec/SpecHelper.js. Not a typo.

@marcoscaceres marcoscaceres marked this pull request as ready for review May 4, 2026 11:08
@marcoscaceres
Copy link
Copy Markdown
Contributor Author

@copilot Can you confirm all your feedback has been addressed? Can you fix anything that was not addressed?

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

@copilot Can you confirm all your feedback has been addressed? Can you fix anything that was not addressed?

All feedback has been addressed. The only review comment was about makeStandardOps being a potential typo, which you correctly clarified is the right name (exported from tests/spec/SpecHelper.js:255). No further changes are needed — the PR is ready as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introductory sections require h2-6, despite not needing a header

3 participants