Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

html-validate-angular

2.0.2 • Public • Published

html-validate-angular

Transform angularjs components and routes with inline templates for use with html-validate.

Example

export const FooComponent = {
    template: '<button>foo</button>',
};
export function routeConfig($routeProvider){
    $routeProvider
        .when('/route', {template: '<p>foo</i>'})
    ;
}

In both cases it will allow html-validate to parse and detect errors in the templates:

component.js
  2:13  error  Button is missing type attribute  button-type

route.js
  3:37  error  Mismatched close-tag, expected '</p>' but found '</i>'  close-order

Usage

npm install --save-dev html-validate-angular

In .htmlvalidate.json:

{
  "transform": {
    "^.*\\.js$": "html-validate-angular"
  }
}

install

npm i html-validate-angular

Downloadsweekly downloads

4

version

2.0.2

license

MIT

repository

Gitgit

last publish

collaborators

  • avatar
Report a vulnerability