formcorelint

1.0.1 • Public • Published

formcorelint

A linter for proper formcore markup.

Install:

npm install -g formcorelint

Usage:

# File
> formcorelint ./test/test.html

# URL
> formcorelint http://master.origin.formcore.fgview.com/

Annotations for more accurate linting

Sometimes we can’t glean what a particular form field is supposed to do. For this, we may need additional annotations on the elements to determine their use. The linter will tell you when this is necessary, so don’t worry about adding these unless the linter lets you know. Add a data-formcore-type attribute to help the linter out.

Valid data-formcore-type Values

  • creditcard: Credit Card
  • creditcard-security-code: Credit Card Security Code
  • numeric: Not necessarily a parseable number. Can have leading zeros (e.g. { 1, 2, 001, 002, 003, 400, … })
  • integer-positive: Integer >= 0, also known as Whole Numbers (e.g. { 0, 1, 2, 3, … })
  • price-positive: Price, whole Dollar, integer amounts >= $0
  • price-float-positive: Price, Dollars and Cents >= $0
  • price: Price, any whole Dollar amount.
  • price-float: Price, any Dollars and Cents amount.
  • tel-us: US Telephone Number
  • zip-us: US Zip Code

Readme

Keywords

none

Package Sidebar

Install

npm i formcorelint

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • zachleat
  • jlembeck
  • scottjehl
  • maggiewachs
  • johnmbender
  • filamentgroup-admin