Skip to content

feat(prefer-form-submission): detect direct submit event dispatch - #1364

Open
Sloppy0726 wants to merge 1 commit into
testing-library:mainfrom
Sloppy0726:pr/prefer-form-submission
Open

feat(prefer-form-submission): detect direct submit event dispatch#1364
Sloppy0726 wants to merge 1 commit into
testing-library:mainfrom
Sloppy0726:pr/prefer-form-submission

Conversation

@Sloppy0726

Copy link
Copy Markdown

Checks

  • I have read the contributing guidelines.

Changes

  • Add an opt-in prefer-form-submission rule.
  • Report fireEvent.submit and manually dispatched submit events.
  • Recommend form.requestSubmit() or submit-button interaction.
  • Cover official and custom imports, aliases, namespaces, CommonJS, and scoped low-level-event escapes.

Context

Direct submit-event dispatch invokes listeners without running the form submission algorithm or constraint validation. This can make invalid forms look successfully submitted in tests.

Validated with lint, TypeScript, generated docs/config checks, bundle validation, and the full 17,337-test coverage suite.

@Sloppy0726
Sloppy0726 marked this pull request as ready for review July 16, 2026 07:40
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.

1 participant