formcorelint
v1.0.1
Published
A linter for proper formcore markup.
Downloads
6
Keywords
Readme
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 Cardcreditcard-security-code
: Credit Card Security Codenumeric
: 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 >= $0price-float-positive
: Price, Dollars and Cents >= $0price
: Price, any whole Dollar amount.price-float
: Price, any Dollars and Cents amount.tel-us
: US Telephone Numberzip-us
: US Zip Code