ng-attr-hint
A static linting tool for angular ng directives.
Usage
Install from npm
npm install ng-attr-hint
var ngAttrHint = ; // callback; // promise;
Gulp task
Output ofAPI
function(options, callback)
Constructor which takes options and an optional callback. if callback is not provided, function will return a promise instance.
Parameters:
options
{
files: "glob filename-pattern" || [glob filename-pattern],
data: "content"
}
callback
Optional function which will be used to return the array of hint object.
function format(hints, formatPattern)
format the hint object to array of strings
Parameters:
hints
Output of ngAttrHint (An array of hint objects)
formatPattern
Optional Paramater. formatPattern, if provided, will be used for formatting.
Use '{field}' to interpolate hint object.
Default pattern : '[{file}:{line}] [{type}] ({attrs}) {message}'
ngAttrHint
object format:
file: stringline: numbertype: stringattrs: stringmessage: string
Plugins
TODOs
- Unit tests
- demo page
License
This plugin is licensed under the MIT license.
Copyright (c) 2015 Prince John Wesley