💼 This rule is enabled in the following configs: strict-gjs, strict-gts.
Disallows the use of the action attribute on form elements.
In modern Ember applications, form submissions should be handled using the {{on}} modifier with the "submit" event instead of the action attribute. This provides better control and follows modern Ember patterns.
This rule disallows the use of the action attribute on <form> elements.
Examples of incorrect code for this rule:
<template>
<form action="/submit">
<input type="text" />
</form>
</template><template>
<form action="">
<button>Submit</button>
</form>
</template>Examples of correct code for this rule:
<template>
<form {{on "submit" this.handleSubmit}}>
<input type="text" />
</form>
</template><template>
<form>
<button type="submit">Submit</button>
</form>
</template>Replace:
<form action="/submit">With:
<form {{on "submit" this.handleSubmit}}>