Skip to content

Fix template-require-form-method: throw on bad config; default disabled#2698

Open
johanrd wants to merge 1 commit intoember-cli:masterfrom
johanrd:day_fix/template-require-form-method
Open

Fix template-require-form-method: throw on bad config; default disabled#2698
johanrd wants to merge 1 commit intoember-cli:masterfrom
johanrd:day_fix/template-require-form-method

Conversation

@johanrd
Copy link
Copy Markdown
Contributor

@johanrd johanrd commented Apr 13, 2026

Summary

  • parseConfig(undefined) returns false — rule is disabled when no options provided (matches upstream default)
  • parseConfig throws on invalid allowedMethods values instead of silently disabling
  • Schema accepts boolean root config for parity with upstream

Test plan

  • No options → rule disabled (bare <form> not flagged)
  • options: [true] → rule enabled with all methods allowed
  • options: [false] → rule disabled
  • options: [{ allowedMethods: ['PATCH'] }] → throws configuration error

parseConfig now throws on invalid allowedMethods (matches upstream's
strictness instead of silently disabling). parseConfig(undefined)
returns false so the rule doesn't run when options are omitted
(matches upstream default). Schema accepts boolean root for parity.
@johanrd johanrd marked this pull request as ready for review April 13, 2026 17:04
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