ewu02 / gulp-html-angular-validate Goto Github PK
View Code? Open in Web Editor NEWhtml-angular-validate linter plugin for Gulp
html-angular-validate linter plugin for Gulp
How to run the linting on multiple or group of .html or tpl.html files?
By default the linting is only being applied to the first .html or tpl.html file in that path ./src/*/.html and the report looks like this:
{
"datetime": "2016-06-29T08:57:54.204Z",
"allpassed": false,
"fileschecked": 1,
"filessucceeded": 0,
"filesfailed": 1,
"failed": [{
"filepath": "/project/src/app/cart/shopping-cart.html",
"numerrs": 7,
"errors": [{
"msg": "Start tag seen without seeing a doctype first. Expected e.g. “”.",
"line": 1,
"col": 11
}, {
"msg": "Element “head” is missing a required instance of child element “title”.",
"line": 1,
"col": 11
}, {
"msg": "Element “back-link” not allowed as child of element “body” in this context. (Suppressing further errors from this subtree.)",
"line": 1,
"col": 11
}, {
"msg": "Element “error-summary” not allowed as child of element “div” in this context. (Suppressing further errors from this subtree.)",
"line": 60,
"col": 9
}, {
"msg": "The “details” element is not supported in all browsers. Please be sure to test, and consider using a polyfill.",
"line": 80,
"col": 41
}, {
"msg": "Attribute “aria-required” not allowed on element “input” at this point.",
"line": 114,
"col": 41
}, {
"msg": "Attribute “aria-required” not allowed on element “input” at this point.",
"line": 122,
"col": 41
}]
}]
}
In the readme.md, on the usage section, is missing the reference to gutil var.
The file is like this:
var gulp = require('gulp');
var validate = require('gulp-html-angular-validate');
And should include this:
var gutil = require('gulp-util');
When using Node 8.x and running my HTML linting steps I get a ton of deprecation warnings. One per HTML file. When there are errors, this makes it difficult to locate them.
I do realize that this might be an issue with html-angular-validate
itself and not this gulp plugin. I will happily open an issue with that project if it's determined that these warnings are not due to this project.
Seems like the example options for custom attributes and custom tags does not work for a stream containing multiple files.
This seems to always terminate with code 0
which indicates success. When I have validation issues I would expect it to terminate with code 1
to indicate a failure.
here's whet my console output looks like:
We have this task (and other gulp validation tasks such as TSLint and BootLint) running on our source control server to run automatically upon code being comitted and then post any failures into our Slack channel. This works fine for other gulp tasks that will exit properly to indicate errors, but our server cannot catch any validation errors caught by this task since it is not properly reporting errors.
Perhaps I am missing something simple, but i do not see a way to make it return proper error statuses.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.