@gavant/ember-template-lint-forms

0.0.2 • Public • Published

ember-template-lint-forms

Ember handlebars template linter rules for validating form elements. This plugin assumes that your project has ember-template-lint installed.

Installation

yarn add --dev @gavant/ember-template-lint-forms

Then update your template-lintrc.js file to contain the following:

module.exports = {
    extends: ['recommended', '@gavant/ember-template-lint-forms:forms'],
    plugins: ['@gavant/ember-template-lint-forms'],
    rules: {
        ....
    }
};

Limitations & Caveats

Currently, this plugin only validates that textual input elements (e.g. type="text|password|email|...") have a maxlength attribute defined.

Only native HTML <input> elements and <AngleBracket> invocation style ember components <Input> and <FlInput> (from the ember-floating-labels addon) are validated.

Future Improvements

  • [ ] Add more validation rules!
  • [ ] Allow customizing what ember components should be validated (e.g. <MyAwesomeInput>)

Readme

Keywords

none

Package Sidebar

Install

npm i @gavant/ember-template-lint-forms

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

4.68 kB

Total Files

5

Last publish

Collaborators

  • bmurray
  • gavantdev
  • billdami
  • bakerac4