New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

htmlhint

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmlhint - npm Package Compare versions

Comparing version 0.13.1-beta.1 to 0.13.1-beta.2

dist/cli/formatter.js

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [0.13.1-beta.2](https://github.com/htmlhint/HTMLHint/compare/v0.13.1-beta.1...v0.13.1-beta.2) (2020-05-31)
### Bug Fixes
* remove unused dependency esm ([#430](https://github.com/htmlhint/HTMLHint/issues/430)) ([7e8429d](https://github.com/htmlhint/HTMLHint/commit/7e8429dc8d57f6cbf891570d644f72729644826d))
## [0.13.1-beta.1](https://github.com/htmlhint/HTMLHint/compare/v0.13.0...v0.13.1-beta.1) (2020-05-30)

@@ -2,0 +9,0 @@

2

dist/htmlhint.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).HTMLHint={})}(this,(function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t){return e(t={exports:{}},t.exports),t.exports}var n=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this._listeners={},this._mapCdataTags=this.makeMap("script,style"),this._arrBlocks=[],this.lastEvent=null}return e.prototype.makeMap=function(e){for(var t={},a=e.split(","),n=0;n<a.length;n++)t[a[n]]=!0;return t},e.prototype.parse=function(e){var t,a,n,r,i,s,o,l,u=this,d=this._mapCdataTags,c=/<(?:\/([^\s>]+)\s*|!--([\s\S]*?)--|!([^>]*?)|([\w\-:]+)((?:\s+[^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]*))?)*?)\s*(\/?))>/g,f=/\s*([^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+)(?:\s*=\s*(?:(")([^"]*)"|(')([^']*)'|([^\s"'>]*)))?/g,p=/\r?\n/g,h=0,g=0,v=0,m=1,b=this._arrBlocks;this.fire("start",{pos:0,line:1,col:1});for(var y=function(e,t,a,n){var r=a-v+1;for(void 0===n&&(n={}),n.raw=t,n.pos=a,n.line=m,n.col=r,b.push(n),u.fire(e,n);p.exec(t);)m++,v=a+p.lastIndex};t=c.exec(e);)if((a=t.index)>h&&(l=e.substring(h,a),i?o.push(l):y("text",l,h)),h=c.lastIndex,!(n=t[1])||(i&&n===i&&(y("cdata",l=o.join(""),g,{tagName:i,attrs:s}),i=null,s=null,o=null),i))if(i)o.push(t[0]);else if(n=t[4]){r=[];for(var w=t[5],L=void 0,O=0;L=f.exec(w);){var _=L[1],P=L[2]?L[2]:L[4]?L[4]:"",j=L[3]?L[3]:L[5]?L[5]:L[6]?L[6]:"";r.push({name:_,value:j,quote:P,index:L.index,raw:L[0]}),O+=L[0].length}O===w.length?(y("tagstart",t[0],a,{tagName:n,attrs:r,close:t[6]}),d[n]&&(i=n,s=r.concat(),o=[],g=h)):y("text",t[0],a)}else(t[2]||t[3])&&y("comment",t[0],a,{content:t[2]||t[3],long:!!t[2]});else y("tagend",t[0],a,{tagName:n});e.length>h&&y("text",l=e.substring(h,e.length),h),this.fire("end",{pos:h,line:m,col:e.length-v+1})},e.prototype.addListener=function(e,t){for(var a,n=this._listeners,r=e.split(/[,\s]/),i=0,s=r.length;i<s;i++)void 0===n[a=r[i]]&&(n[a]=[]),n[a].push(t)},e.prototype.fire=function(e,t){void 0===t&&(t={}),t.type=e;var a=[],n=this._listeners[e],r=this._listeners.all;void 0!==n&&(a=a.concat(n)),void 0!==r&&(a=a.concat(r));var i=this.lastEvent;null!==i&&(delete i.lastEvent,t.lastEvent=i),this.lastEvent=t;for(var s=0,o=a.length;s<o;s++)a[s].call(this,t)},e.prototype.removeListener=function(e,t){var a=this._listeners[e];if(void 0!==a)for(var n=0,r=a.length;n<r;n++)if(a[n]===t){a.splice(n,1);break}},e.prototype.fixPos=function(e,t){var a,n=e.raw.substr(0,t).split(/\r?\n/),r=n.length-1,i=e.line;return r>0?(i+=r,a=n[r].length+1):a=e.col+t,{line:i,col:a}},e.prototype.getMapAttrs=function(e){for(var t,a={},n=0,r=e.length;n<r;n++)a[(t=e[n]).name]=t.value;return a},e}();t.default=a}));t(n);var r=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){this.html=e,this.lines=e.split(/\r?\n/);var a=e.match(/\r?\n/);this.brLen=null!==a?a[0].length:0,this.ruleset=t,this.messages=[],this.error=this.report.bind(this,"error"),this.warn=this.report.bind(this,"warning"),this.info=this.report.bind(this,"info")}return e.prototype.report=function(e,t,a,n,r,i){for(var s,o,l=this.lines,u=this.brLen,d=a-1,c=l.length;d<c&&(n>(o=(s=l[d]).length)&&a<c);d++)a++,1!==(n-=o)&&(n-=u);this.messages.push({type:e,message:t,raw:i,evidence:s,line:a,col:n,rule:{id:r.id,description:r.description,link:"https://github.com/thedaviddias/HTMLHint/wiki/"+r.id}})},e}();t.default=a}));t(r);var i=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"alt-require",description:"The alt attribute of an <img> element must be present and alt attribute of area[href] and input[type=image] must have a value.",init:function(e,t){var a=this;e.addListener("tagstart",(function(n){var r,i=n.tagName.toLowerCase(),s=e.getMapAttrs(n.attrs),o=n.col+i.length+1;"img"!==i||"alt"in s?("area"===i&&"href"in s||"input"===i&&"image"===s.type)&&("alt"in s&&""!==s.alt||(r="area"===i?"area[href]":"input[type=image]",t.warn("The alt attribute of "+r+" must have a value.",n.line,o,a,n.raw))):t.warn("An alt attribute must be present on <img> elements.",n.line,o,a,n.raw)}))}}}));t(i);var s=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-lowercase",description:"All attribute names must be in lowercase.",init:function(e,t,a){var n=this,r=Array.isArray(a)?a:[];e.addListener("tagstart",(function(e){for(var a,i=e.attrs,s=e.col+e.tagName.length+1,o=function(o,l){var u=(a=i[o]).name;r.find((function(e){return function(e,t){if(t instanceof RegExp)return!!t.test(e)&&{match:e,pattern:t};var a=t[0],n=t[t.length-1],r=t[t.length-2],i="/"===a&&("/"===n||"/"===r&&"i"===n);return i?i&&"i"===n?new RegExp(t.slice(1,-2),"i").test(e):new RegExp(t.slice(1,-1)).test(e):e===t}(u,e)}))||u===u.toLowerCase()||t.error("The attribute name of [ "+u+" ] must be in lowercase.",e.line,s+a.index,n,a.raw)},l=0,u=i.length;l<u;l++)o(l)}))}}}));t(s);var o=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-sorted",description:"Attribute tags must be in proper order.",init:function(e,t){for(var a=this,n={},r=["class","id","name","src","for","type","href","value","title","alt","role"],i=0;i<r.length;i++)n[r[i]]=i;e.addListener("tagstart",(function(e){for(var r=e.attrs,i=[],s=0;s<r.length;s++)i.push(r[s].name);var o=JSON.stringify(i);i.sort((function(e,t){return null==n[e]&&null==n[t]?0:null==n[e]?1:null==n[t]?-1:n[e]-n[t]||e.localeCompare(t)})),o!==JSON.stringify(i)&&t.error("Inaccurate order "+o+" should be in hierarchy "+JSON.stringify(i)+" ",e.line,e.col,a)}))}}}));t(o);var l=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-no-duplication",description:"Elements cannot have duplicate attributes.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var n,r,i=e.attrs,s=e.col+e.tagName.length+1,o={},l=0,u=i.length;l<u;l++)!0===o[r=(n=i[l]).name]&&t.error("Duplicate of attribute name [ "+n.name+" ] was found.",e.line,s+n.index,a,n.raw),o[r]=!0}))}}}));t(l);var u=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-unsafe-chars",description:"Attribute values cannot contain unsafe chars.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var n,r,i=e.attrs,s=e.col+e.tagName.length+1,o=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,l=0,u=i.length;l<u;l++)if(null!==(r=(n=i[l]).value.match(o))){var d=escape(r[0]).replace(/%u/,"\\u").replace(/%/,"\\x");t.warn("The value of attribute [ "+n.name+" ] cannot contain an unsafe char [ "+d+" ].",e.line,s+n.index,a,n.raw)}}))}}}));t(u);var d=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-double-quotes",description:"Attribute values must be in double quotes.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var n,r=e.attrs,i=e.col+e.tagName.length+1,s=0,o=r.length;s<o;s++)(""!==(n=r[s]).value&&'"'!==n.quote||""===n.value&&"'"===n.quote)&&t.error("The value of attribute [ "+n.name+" ] must be in double quotes.",e.line,i+n.index,a,n.raw)}))}}}));t(d);var c=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-not-empty",description:"All attributes must have values.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var n,r=e.attrs,i=e.col+e.tagName.length+1,s=0,o=r.length;s<o;s++)""===(n=r[s]).quote&&""===n.value&&t.warn("The attribute [ "+n.name+" ] must have a value.",e.line,i+n.index,a,n.raw)}))}}}));t(c);var f=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-single-quotes",description:"Attribute values must be in single quotes.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var n,r=e.attrs,i=e.col+e.tagName.length+1,s=0,o=r.length;s<o;s++)(""!==(n=r[s]).value&&"'"!==n.quote||""===n.value&&'"'===n.quote)&&t.error("The value of attribute [ "+n.name+" ] must be in single quotes.",e.line,i+n.index,a,n.raw)}))}}}));t(f);var p=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-whitespace",description:"All attributes should be separated by only one space and not have leading/trailing whitespace.",init:function(e,t,a){var n=this,r=Array.isArray(a)?a:[];e.addListener("tagstart",(function(e){var a,i=e.attrs,s=e.col+e.tagName.length+1;i.forEach((function(i){a=i;var o=i.name;-1===r.indexOf(o)&&(i.value.trim(i.value)!==i.value&&t.error("The attributes of [ "+o+" ] must not have trailing whitespace.",e.line,s+a.index,n,a.raw),i.value.replace(/ +(?= )/g,"")!==i.value&&t.error("The attributes of [ "+o+" ] must be separated by only one space.",e.line,s+a.index,n,a.raw))}))}))}}}));t(p);var h=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"doctype-first",description:"Doctype must be declared first.",init:function(e,t){var a=this,n=function(r){"start"===r.type||"text"===r.type&&/^\s*$/.test(r.raw)||(("comment"!==r.type&&!1===r.long||!1===/^DOCTYPE\s+/i.test(r.content))&&t.error("Doctype must be declared first.",r.line,r.col,a,r.raw),e.removeListener("all",n))};e.addListener("all",n)}}}));t(h);var g=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"doctype-html5",description:'Invalid doctype. Use: "<!DOCTYPE html>"',init:function(e,t){var a=this,n=function(e){!1===e.long&&"doctype html"!==e.content.toLowerCase()&&t.warn('Invalid doctype. Use: "<!DOCTYPE html>"',e.line,e.col,a,e.raw)},r=function(){e.removeListener("comment",n),e.removeListener("tagstart",r)};e.addListener("all",n),e.addListener("tagstart",r)}}}));t(g);var v=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"head-script-disabled",description:"The <script> tag cannot be used in a <head> tag.",init:function(e,t){var a=this,n=/^(text\/javascript|application\/javascript)$/i,r=!1,i=function(i){var s=e.getMapAttrs(i.attrs).type,o=i.tagName.toLowerCase();"head"===o&&(r=!0),!0!==r||"script"!==o||s&&!0!==n.test(s)||t.warn("The <script> tag cannot be used in a <head> tag.",i.line,i.col,a,i.raw)},s=function(t){"head"===t.tagName.toLowerCase()&&(e.removeListener("tagstart",i),e.removeListener("tagend",s))};e.addListener("tagstart",i),e.addListener("tagend",s)}}}));t(v);var m=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"href-abs-or-rel",description:"An href attribute must be either absolute or relative.",init:function(e,t,a){var n=this,r="abs"===a?"absolute":"relative";e.addListener("tagstart",(function(e){for(var a,i=e.attrs,s=e.col+e.tagName.length+1,o=0,l=i.length;o<l;o++)if("href"===(a=i[o]).name){("absolute"===r&&!1===/^\w+?:/.test(a.value)||"relative"===r&&!0===/^https?:\/\//.test(a.value))&&t.warn("The value of the href attribute [ "+a.value+" ] must be "+r+".",e.line,s+a.index,n,a.raw);break}}))}}}));t(m);var b=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-class-ad-disabled",description:"The id and class attributes cannot use the ad keyword, it will be blocked by adblock software.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var n,r,i=e.attrs,s=e.col+e.tagName.length+1,o=0,l=i.length;o<l;o++)r=(n=i[o]).name,/^(id|class)$/i.test(r)&&/(^|[-_])ad([-_]|$)/i.test(n.value)&&t.warn("The value of attribute "+r+" cannot use the ad keyword.",e.line,s+n.index,a,n.raw)}))}}}));t(b);var y=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-class-value",description:"The id and class attribute values must meet the specified rules.",init:function(e,t,a){var n,r=this;if((n="string"==typeof a?{underline:{regId:/^[a-z\d]+(_[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by an underscore."},dash:{regId:/^[a-z\d]+(-[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by a dash."},hump:{regId:/^[a-z][a-zA-Z\d]*([A-Z][a-zA-Z\d]*)*$/,message:"The id and class attribute values must meet the camelCase style."}}[a]:a)&&n.regId){var i=n.regId,s=n.message;i instanceof RegExp||(i=new RegExp(i)),e.addListener("tagstart",(function(e){for(var a,n=e.attrs,o=e.col+e.tagName.length+1,l=0,u=n.length;l<u;l++)if("id"===(a=n[l]).name.toLowerCase()&&!1===i.test(a.value)&&t.warn(s,e.line,o+a.index,r,a.raw),"class"===a.name.toLowerCase())for(var d=a.value.split(/\s+/g),c=void 0,f=0,p=d.length;f<p;f++)(c=d[f])&&!1===i.test(c)&&t.warn(s,e.line,o+a.index,r,c)}))}}}}));t(y);var w=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-unique",description:"The value of id attributes must be unique.",init:function(e,t){var a=this,n={};e.addListener("tagstart",(function(e){for(var r,i,s=e.attrs,o=e.col+e.tagName.length+1,l=0,u=s.length;l<u;l++)if("id"===(r=s[l]).name.toLowerCase()){(i=r.value)&&(void 0===n[i]?n[i]=1:n[i]++,n[i]>1&&t.error("The id value [ "+i+" ] must be unique.",e.line,o+r.index,a,r.raw));break}}))}}}));t(w);var L=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"inline-script-disabled",description:"Inline script cannot be used.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var n,r,i=e.attrs,s=e.col+e.tagName.length+1,o=/^on(unload|message|submit|select|scroll|resize|mouseover|mouseout|mousemove|mouseleave|mouseenter|mousedown|load|keyup|keypress|keydown|focus|dblclick|click|change|blur|error)$/i,l=0,u=i.length;l<u;l++)r=(n=i[l]).name.toLowerCase(),!0===o.test(r)?t.warn("Inline script [ "+n.raw+" ] cannot be used.",e.line,s+n.index,a,n.raw):"src"!==r&&"href"!==r||/^\s*javascript:/i.test(n.value)&&t.warn("Inline script [ "+n.raw+" ] cannot be used.",e.line,s+n.index,a,n.raw)}))}}}));t(L);var O=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"inline-style-disabled",description:"Inline style cannot be used.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var n,r=e.attrs,i=e.col+e.tagName.length+1,s=0,o=r.length;s<o;s++)"style"===(n=r[s]).name.toLowerCase()&&t.warn("Inline style [ "+n.raw+" ] cannot be used.",e.line,i+n.index,a,n.raw)}))}}}));t(O);var _=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"input-requires-label",description:"All [ input ] tags must have a corresponding [ label ] tag. ",init:function(e,t){var a=this,n=[],r=[];e.addListener("tagstart",(function(t){var a=t.tagName.toLowerCase(),i=e.getMapAttrs(t.attrs),s=t.col+a.length+1;"input"===a&&r.push({event:t,col:s,id:i.id}),"label"===a&&"for"in i&&""!==i.for&&n.push({event:t,col:s,forValue:i.for})})),e.addListener("end",(function(){r.forEach((function(e){(function(e){var t=!1;return n.forEach((function(a){e.id&&e.id===a.forValue&&(t=!0)})),t})(e)||t.warn("No matching [ label ] tag found.",e.event.line,e.col,a,e.event.raw)}))}))}}}));t(_);var P=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"script-disabled",description:"The <script> tag cannot be used.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){"script"===e.tagName.toLowerCase()&&t.error("The <script> tag cannot be used.",e.line,e.col,a,e.raw)}))}}}));t(P);var j=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"space-tab-mixed-disabled",description:"Do not mix tabs and spaces for indentation.",init:function(e,t,a){var n=this,r="nomix",i=null;if("string"==typeof a){var s=a.match(/^([a-z]+)(\d+)?/);r=s[1],i=s[2]&&parseInt(s[2],10)}e.addListener("text",(function(a){for(var s,o=a.raw,l=/(^|\r?\n)([ \t]+)/g;s=l.exec(o);){var u=e.fixPos(a,s.index+s[1].length);if(1===u.col){var d=s[2];"space"===r?i?!1!==/^ +$/.test(d)&&d.length%i==0||t.warn("Please use space for indentation and keep "+i+" length.",u.line,1,n,a.raw):!1===/^ +$/.test(d)&&t.warn("Please use space for indentation.",u.line,1,n,a.raw):"tab"===r&&!1===/^\t+$/.test(d)?t.warn("Please use tab for indentation.",u.line,1,n,a.raw):!0===/ +\t|\t+ /.test(d)&&t.warn("Do not mix tabs and spaces for indentation.",u.line,1,n,a.raw)}}}))}}}));t(j);var x=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"spec-char-escape",description:"Special characters must be escaped.",init:function(e,t){var a=this;e.addListener("text",(function(n){for(var r,i=n.raw,s=/([<>])|( \& )/g;r=s.exec(i);){var o=e.fixPos(n,r.index);t.error("Special characters must be escaped : [ "+r[0]+" ].",o.line,o.col,a,n.raw)}}))}}}));t(x);var M=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"src-not-empty",description:"The src attribute of an img(script,link) must have a value.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var n,r=e.tagName,i=e.attrs,s=e.col+r.length+1,o=0,l=i.length;o<l;o++)n=i[o],(!0===/^(img|script|embed|bgsound|iframe)$/.test(r)&&"src"===n.name||"link"===r&&"href"===n.name||"object"===r&&"data"===n.name)&&""===n.value&&t.error("The attribute [ "+n.name+" ] of the tag [ "+r+" ] must have a value.",e.line,s+n.index,a,n.raw)}))}}}));t(M);var T=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"style-disabled",description:"<style> tags cannot be used.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){"style"===e.tagName.toLowerCase()&&t.warn("The <style> tag cannot be used.",e.line,e.col,a,e.raw)}))}}}));t(T);var N=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tag-pair",description:"Tag must be paired.",init:function(e,t){var a=this,n=[],r=e.makeMap("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",(function(e){var t=e.tagName.toLowerCase();void 0!==r[t]||e.close||n.push({tagName:t,line:e.line,raw:e.raw})})),e.addListener("tagend",(function(e){var r,i=e.tagName.toLowerCase();for(r=n.length-1;r>=0&&n[r].tagName!==i;r--);if(r>=0){for(var s=[],o=n.length-1;o>r;o--)s.push("</"+n[o].tagName+">");if(s.length>0){var l=n[n.length-1];t.error("Tag must be paired, missing: [ "+s.join("")+" ], start tag match failed [ "+l.raw+" ] on line "+l.line+".",e.line,e.col,a,e.raw)}n.length=r}else t.error("Tag must be paired, no start tag: [ "+e.raw+" ]",e.line,e.col,a,e.raw)})),e.addListener("end",(function(e){for(var r=[],i=n.length-1;i>=0;i--)r.push("</"+n[i].tagName+">");if(r.length>0){var s=n[n.length-1];t.error("Tag must be paired, missing: [ "+r.join("")+" ], open tag match failed [ "+s.raw+" ] on line "+s.line+".",e.line,e.col,a,"")}}))}}}));t(N);var A=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tag-self-close",description:"Empty tags must be self closed.",init:function(e,t){var a=this,n=e.makeMap("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",(function(e){var r=e.tagName.toLowerCase();void 0!==n[r]&&(e.close||t.warn("The empty tag : [ "+r+" ] must be self closed.",e.line,e.col,a,e.raw))}))}}}));t(A);var C=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tagname-lowercase",description:"All html element names must be in lowercase.",init:function(e,t,a){var n=this,r=Array.isArray(a)?a:[];e.addListener("tagstart,tagend",(function(e){var a=e.tagName;-1===r.indexOf(a)&&a!==a.toLowerCase()&&t.error("The html element name of [ "+a+" ] must be in lowercase.",e.line,e.col,n,e.raw)}))}}}));t(C);var k=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tagname-specialchars",description:"All html element names must be in lowercase.",init:function(e,t){var a=this,n=/[^a-zA-Z0-9\-:_]/;e.addListener("tagstart,tagend",(function(e){var r=e.tagName;n.test(r)&&t.error("The html element name of [ "+r+" ] contains special character.",e.line,e.col,a,e.raw)}))}}}));t(k);var q=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"title-require",description:"<title> must be present in <head> tag.",init:function(e,t){var a=this,n=!1,r=!1,i=function(e){var t=e.tagName.toLowerCase();"head"===t?n=!0:"title"===t&&n&&(r=!0)},s=function(n){var o=n.tagName.toLowerCase();if(r&&"title"===o){var l=n.lastEvent;("text"!==l.type||"text"===l.type&&!0===/^\s*$/.test(l.raw))&&t.error("<title></title> must not be empty.",n.line,n.col,a,n.raw)}else"head"===o&&(!1===r&&t.error("<title> must be present in <head> tag.",n.line,n.col,a,n.raw),e.removeListener("tagstart",i),e.removeListener("tagend",s))};e.addListener("tagstart",i),e.addListener("tagend",s)}}}));t(q);var E=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var a={a:{selfclosing:!1,attrsRequired:["href","title"],redundantAttrs:["alt"]},div:{selfclosing:!1},main:{selfclosing:!1,redundantAttrs:["role"]},nav:{selfclosing:!1,redundantAttrs:["role"]},script:{attrsOptional:[["async","async"],["defer","defer"]]},img:{selfclosing:!0,attrsRequired:["src","alt","title"]}};t.default={id:"tags-check",description:"Checks html tags.",init:function(e,t,n){var r=this;"boolean"!=typeof n&&function(e){for(var t,a=1;a<arguments.length;a++)for(var n in t=arguments[a])e[n]=t[n]}(a,n),e.addListener("tagstart",(function(e){var n=e.attrs,i=e.col+e.tagName.length+1,s=e.tagName.toLowerCase();if(a[s]){var o=a[s];!0!==o.selfclosing||e.close?!1===o.selfclosing&&e.close&&t.warn("The <"+s+"> tag must not be selfclosing.",e.line,e.col,r,e.raw):t.warn("The <"+s+"> tag must be selfclosing.",e.line,e.col,r,e.raw),o.attrsRequired&&o.attrsRequired.forEach((function(a){if(Array.isArray(a)){var o=a.map((function(e){return e})),l=o.shift(),u=o;n.some((function(e){return e.name===l}))?n.forEach((function(a){a.name===l&&-1===u.indexOf(a.value)&&t.error("The <"+s+"> tag must have attr '"+l+"' with one value of '"+u.join("' or '")+"'.",e.line,i,r,e.raw)})):t.error("The <"+s+"> tag must have attr '"+l+"'.",e.line,i,r,e.raw)}else n.some((function(e){return-1!==a.split("|").indexOf(e.name)}))||t.error("The <"+s+"> tag must have attr '"+a+"'.",e.line,i,r,e.raw)})),o.attrsOptional&&o.attrsOptional.forEach((function(a){if(Array.isArray(a)){var o=a.map((function(e){return e})),l=o.shift(),u=o;n.some((function(e){return e.name===l}))&&n.forEach((function(a){a.name===l&&-1===u.indexOf(a.value)&&t.error("The <"+s+"> tag must have optional attr '"+l+"' with one value of '"+u.join("' or '")+"'.",e.line,i,r,e.raw)}))}})),o.redundantAttrs&&o.redundantAttrs.forEach((function(a){n.some((function(e){return e.name===a}))&&t.error("The attr '"+a+"' is redundant for <"+s+"> and should be ommited.",e.line,i,r,e.raw)}))}}))}}}));t(E);var R=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-no-unnecessary-whitespace",description:"No spaces between attribute names and values.",init:function(e,t,a){var n=this,r=Array.isArray(a)?a:[];e.addListener("tagstart",(function(e){for(var a=e.attrs,i=e.col+e.tagName.length+1,s=0;s<a.length;s++)if(-1===r.indexOf(a[s].name)){var o=/(\s*)=(\s*)/.exec(a[s].raw.trim());!o||0===o[1].length&&0===o[2].length||t.error("The attribute '"+a[s].name+"' must not have spaces between the name and value.",e.line,i+a[s].index,n,a[s].raw)}}))}}}));t(R);var D=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"altRequire",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"attrLowercase",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"attrSort",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"attrNoDuplication",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"attrUnsafeChars",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"attrValueDoubleQuotes",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"attrValueNotEmpty",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"attrValueSingleQuotes",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"attrWhitespace",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"doctypeFirst",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"doctypeHTML5",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"headScriptDisabled",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"hrefAbsOrRel",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"idClsasAdDisabled",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"idClassValue",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"idUnique",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"inlineScriptDisabled",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,"inlineStyleDisabled",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"inputRequiresLabel",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"scriptDisabled",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"spaceTabMixedDisabled",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"specCharEscape",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"srcNotEmpty",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"styleDisabled",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"tagPair",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"tagSelfClose",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"tagnameLowercase",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"tagnameSpecialChars",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"titleRequire",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(t,"tagsCheck",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"attrNoUnnecessaryWhitespace",{enumerable:!0,get:function(){return R.default}})}));t(D);D.altRequire,D.attrLowercase,D.attrSort,D.attrNoDuplication,D.attrUnsafeChars,D.attrValueDoubleQuotes,D.attrValueNotEmpty,D.attrValueSingleQuotes,D.attrWhitespace,D.doctypeFirst,D.doctypeHTML5,D.headScriptDisabled,D.hrefAbsOrRel,D.idClsasAdDisabled,D.idClassValue,D.idUnique,D.inlineScriptDisabled,D.inlineStyleDisabled,D.inputRequiresLabel,D.scriptDisabled,D.spaceTabMixedDisabled,D.specCharEscape,D.srcNotEmpty,D.styleDisabled,D.tagPair,D.tagSelfClose,D.tagnameLowercase,D.tagnameSpecialChars,D.titleRequire,D.tagsCheck,D.attrNoUnnecessaryWhitespace;var H=a((function(e,t){function a(e,t){return new Array(e+1).join(t||" ")}Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLHint=t.HTMLParser=t.Reporter=t.HTMLRules=void 0,t.HTMLParser=n.default,t.Reporter=r.default,t.HTMLRules=D;var i=new(function(){function e(){this.rules={},this.defaultRuleset={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0}}return e.prototype.addRule=function(e){this.rules[e.id]=e},e.prototype.verify=function(e,t){void 0!==t&&0!==Object.keys(t).length||(t=this.defaultRuleset),e=e.replace(/^\s*<!--\s*htmlhint\s+([^\r\n]+?)\s*-->/i,(function(e,a){return void 0===t&&(t={}),a.replace(/(?:^|,)\s*([^:,]+)\s*(?:\:\s*([^,\s]+))?/g,(function(e,a,n){"false"===n?n=!1:"true"===n&&(n=!0),t[a]=void 0===n||n})),""}));var a,i=new n.default,s=new r.default(e,t),o=this.rules;for(var l in t)void 0!==(a=o[l])&&!1!==t[l]&&a.init(i,s,t[l]);return i.parse(e),s.messages},e.prototype.format=function(e,t){void 0===t&&(t={});var n=[],r={white:"",grey:"",red:"",reset:""};t.colors&&(r.white="",r.grey="",r.red="",r.reset="");var i=t.indent||0;return e.forEach((function(e){var t=e.evidence,s=e.line,o=e.col,l=t.length,u=o>41?o-40:1,d=t.length>o+60?o+60:l;o<41&&(d+=40-o+1),t=t.replace(/\t/g," ").substring(u-1,d),u>1&&(t="..."+t,u-=3),d<l&&(t+="..."),n.push(r.white+a(i)+"L"+s+" |"+r.grey+t+r.reset);var c=o-u,f=t.substring(0,c).match(/[^\u0000-\u00ff]/g);null!==f&&(c+=f.length),n.push(r.white+a(i)+a(String(s).length+3+c)+"^ "+r.red+e.message+" ("+e.rule.id+")"+r.reset)})),n},e}());t.HTMLHint=i,Object.keys(D).forEach((function(e){i.addRule(D[e])}))})),S=t(H),I=H.HTMLHint,$=H.HTMLParser,z=H.Reporter,V=H.HTMLRules;e.HTMLHint=I,e.HTMLParser=$,e.HTMLRules=V,e.Reporter=z,e.default=S,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).HTMLHint={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t,a){return e(a={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&a.path)}},a.exports),a.exports}var n=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this._listeners={},this._mapCdataTags=this.makeMap("script,style"),this._arrBlocks=[],this.lastEvent=null}return e.prototype.makeMap=function(e){for(var t={},a=e.split(","),r=0;r<a.length;r++)t[a[r]]=!0;return t},e.prototype.parse=function(e){var t,a,r,n,i,s,o=this,l=this._mapCdataTags,u=/<(?:\/([^\s>]+)\s*|!--([\s\S]*?)--|!([^>]*?)|([\w\-:]+)((?:\s+[^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]*))?)*?)\s*(\/?))>/g,d=/\s*([^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+)(?:\s*=\s*(?:(")([^"]*)"|(')([^']*)'|([^\s"'>]*)))?/g,c=/\r?\n/g,f=0,p=null,g=[],h=0,v=0,m=1,b=this._arrBlocks;this.fire("start",{pos:0,line:1,col:1});for(var y=function(e,t,a,r){var n=a-v+1;for(void 0===r&&(r={}),r.raw=t,r.pos=a,r.line=m,r.col=n,b.push(r),o.fire(e,r);c.exec(t);)m++,v=a+c.lastIndex};t=u.exec(e);)if((a=t.index)>f&&(s=e.substring(f,a),p?g.push(s):y("text",s,f)),f=u.lastIndex,!(r=t[1])||(p&&r===p&&(y("cdata",s=g.join(""),h,{tagName:p,attrs:i}),p=null,i=void 0,g=[]),p))if(p)g.push(t[0]);else if(r=t[4]){n=[];for(var w=t[5],L=void 0,O=0;L=d.exec(w);){var _=L[1],j=L[2]?L[2]:L[4]?L[4]:"",P=L[3]?L[3]:L[5]?L[5]:L[6]?L[6]:"";n.push({name:_,value:P,quote:j,index:L.index,raw:L[0]}),O+=L[0].length}O===w.length?(y("tagstart",t[0],a,{tagName:r,attrs:n,close:t[6]}),l[r]&&(p=r,i=n.concat(),g=[],h=f)):y("text",t[0],a)}else(t[2]||t[3])&&y("comment",t[0],a,{content:t[2]||t[3],long:!!t[2]});else y("tagend",t[0],a,{tagName:r});e.length>f&&y("text",s=e.substring(f,e.length),f),this.fire("end",{pos:f,line:m,col:e.length-v+1})},e.prototype.addListener=function(e,t){for(var a,r=this._listeners,n=e.split(/[,\s]/),i=0,s=n.length;i<s;i++)void 0===r[a=n[i]]&&(r[a]=[]),r[a].push(t)},e.prototype.fire=function(e,t){void 0===t&&(t={}),t.type=e;var a=[],r=this._listeners[e],n=this._listeners.all;void 0!==r&&(a=a.concat(r)),void 0!==n&&(a=a.concat(n));var i=this.lastEvent;null!==i&&(delete i.lastEvent,t.lastEvent=i),this.lastEvent=t;for(var s=0,o=a.length;s<o;s++)a[s].call(this,t)},e.prototype.removeListener=function(e,t){var a=this._listeners[e];if(void 0!==a)for(var r=0,n=a.length;r<n;r++)if(a[r]===t){a.splice(r,1);break}},e.prototype.fixPos=function(e,t){var a,r=e.raw.substr(0,t).split(/\r?\n/),n=r.length-1,i=e.line;return n>0?(i+=n,a=r[n].length+1):a=e.col+t,{line:i,col:a}},e.prototype.getMapAttrs=function(e){for(var t,a={},r=0,n=e.length;r<n;r++)a[(t=e[r]).name]=t.value;return a},e}();t.default=a}));a(n);var i=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){this.html=e,this.lines=e.split(/\r?\n/);var a=/\r?\n/.exec(e);this.brLen=null!==a?a[0].length:0,this.ruleset=t,this.messages=[]}return e.prototype.info=function(e,t,a,r,n){this.report("info",e,t,a,r,n)},e.prototype.warn=function(e,t,a,r,n){this.report("warning",e,t,a,r,n)},e.prototype.error=function(e,t,a,r,n){this.report("error",e,t,a,r,n)},e.prototype.report=function(e,t,a,r,n,i){for(var s=this.lines,o=this.brLen,l="",u=0,d=a-1,c=s.length;d<c&&(r>(u=(l=s[d]).length)&&a<c);d++)a++,1!==(r-=u)&&(r-=o);this.messages.push({type:e,message:t,raw:i,evidence:l,line:a,col:r,rule:{id:n.id,description:n.description,link:"https://github.com/thedaviddias/HTMLHint/wiki/"+n.id}})},e}();t.default=a}));a(i);var s=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"alt-require",description:"The alt attribute of an <img> element must be present and alt attribute of area[href] and input[type=image] must have a value.",init:function(e,t){var a=this;e.addListener("tagstart",(function(r){var n,i=r.tagName.toLowerCase(),s=e.getMapAttrs(r.attrs),o=r.col+i.length+1;"img"!==i||"alt"in s?("area"===i&&"href"in s||"input"===i&&"image"===s.type)&&("alt"in s&&""!==s.alt||(n="area"===i?"area[href]":"input[type=image]",t.warn("The alt attribute of "+n+" must have a value.",r.line,o,a,r.raw))):t.warn("An alt attribute must be present on <img> elements.",r.line,o,a,r.raw)}))}}}));a(s);var o=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-lowercase",description:"All attribute names must be in lowercase.",init:function(e,t,a){var r=this,n=Array.isArray(a)?a:[];e.addListener("tagstart",(function(e){for(var a,i=e.attrs,s=e.col+e.tagName.length+1,o=function(o,l){var u=(a=i[o]).name;n.find((function(e){return function(e,t){if(t instanceof RegExp)return!!t.test(e)&&{match:e,pattern:t};var a=t[0],r=t[t.length-1],n=t[t.length-2],i="/"===a&&("/"===r||"/"===n&&"i"===r);return i?i&&"i"===r?new RegExp(t.slice(1,-2),"i").test(e):new RegExp(t.slice(1,-1)).test(e):e===t}(u,e)}))||u===u.toLowerCase()||t.error("The attribute name of [ "+u+" ] must be in lowercase.",e.line,s+a.index,r,a.raw)},l=0,u=i.length;l<u;l++)o(l)}))}}}));a(o);var l=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-sorted",description:"Attribute tags must be in proper order.",init:function(e,t){for(var a=this,r={},n=["class","id","name","src","for","type","href","value","title","alt","role"],i=0;i<n.length;i++)r[n[i]]=i;e.addListener("tagstart",(function(e){for(var n=e.attrs,i=[],s=0;s<n.length;s++)i.push(n[s].name);var o=JSON.stringify(i);i.sort((function(e,t){return null==r[e]&&null==r[t]?0:null==r[e]?1:null==r[t]?-1:r[e]-r[t]||e.localeCompare(t)})),o!==JSON.stringify(i)&&t.error("Inaccurate order "+o+" should be in hierarchy "+JSON.stringify(i)+" ",e.line,e.col,a,e.raw)}))}}}));a(l);var u=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-no-duplication",description:"Elements cannot have duplicate attributes.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var r,n,i=e.attrs,s=e.col+e.tagName.length+1,o={},l=0,u=i.length;l<u;l++)!0===o[n=(r=i[l]).name]&&t.error("Duplicate of attribute name [ "+r.name+" ] was found.",e.line,s+r.index,a,r.raw),o[n]=!0}))}}}));a(u);var d=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-unsafe-chars",description:"Attribute values cannot contain unsafe chars.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var r,n,i=e.attrs,s=e.col+e.tagName.length+1,o=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,l=0,u=i.length;l<u;l++)if(r=i[l],null!==(n=o.exec(r.value))){var d=escape(n[0]).replace(/%u/,"\\u").replace(/%/,"\\x");t.warn("The value of attribute [ "+r.name+" ] cannot contain an unsafe char [ "+d+" ].",e.line,s+r.index,a,r.raw)}}))}}}));a(d);var c=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-double-quotes",description:"Attribute values must be in double quotes.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var r,n=e.attrs,i=e.col+e.tagName.length+1,s=0,o=n.length;s<o;s++)(""!==(r=n[s]).value&&'"'!==r.quote||""===r.value&&"'"===r.quote)&&t.error("The value of attribute [ "+r.name+" ] must be in double quotes.",e.line,i+r.index,a,r.raw)}))}}}));a(c);var f=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-not-empty",description:"All attributes must have values.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var r,n=e.attrs,i=e.col+e.tagName.length+1,s=0,o=n.length;s<o;s++)""===(r=n[s]).quote&&""===r.value&&t.warn("The attribute [ "+r.name+" ] must have a value.",e.line,i+r.index,a,r.raw)}))}}}));a(f);var p=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-single-quotes",description:"Attribute values must be in single quotes.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var r,n=e.attrs,i=e.col+e.tagName.length+1,s=0,o=n.length;s<o;s++)(""!==(r=n[s]).value&&"'"!==r.quote||""===r.value&&'"'===r.quote)&&t.error("The value of attribute [ "+r.name+" ] must be in single quotes.",e.line,i+r.index,a,r.raw)}))}}}));a(p);var g=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-whitespace",description:"All attributes should be separated by only one space and not have leading/trailing whitespace.",init:function(e,t,a){var r=this,n=Array.isArray(a)?a:[];e.addListener("tagstart",(function(e){var a,i=e.attrs,s=e.col+e.tagName.length+1;i.forEach((function(i){a=i;var o=i.name;-1===n.indexOf(o)&&(i.value.trim()!==i.value&&t.error("The attributes of [ "+o+" ] must not have trailing whitespace.",e.line,s+a.index,r,a.raw),i.value.replace(/ +(?= )/g,"")!==i.value&&t.error("The attributes of [ "+o+" ] must be separated by only one space.",e.line,s+a.index,r,a.raw))}))}))}}}));a(g);var h=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"doctype-first",description:"Doctype must be declared first.",init:function(e,t){var a=this,r=function(n){"start"===n.type||"text"===n.type&&/^\s*$/.test(n.raw)||(("comment"!==n.type&&!1===n.long||!1===/^DOCTYPE\s+/i.test(n.content))&&t.error("Doctype must be declared first.",n.line,n.col,a,n.raw),e.removeListener("all",r))};e.addListener("all",r)}}}));a(h);var v=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"doctype-html5",description:'Invalid doctype. Use: "<!DOCTYPE html>"',init:function(e,t){var a=this,r=function(e){!1===e.long&&"doctype html"!==e.content.toLowerCase()&&t.warn('Invalid doctype. Use: "<!DOCTYPE html>"',e.line,e.col,a,e.raw)},n=function(){e.removeListener("comment",r),e.removeListener("tagstart",n)};e.addListener("all",r),e.addListener("tagstart",n)}}}));a(v);var m=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"head-script-disabled",description:"The <script> tag cannot be used in a <head> tag.",init:function(e,t){var a=this,r=/^(text\/javascript|application\/javascript)$/i,n=!1,i=function(i){var s=e.getMapAttrs(i.attrs).type,o=i.tagName.toLowerCase();"head"===o&&(n=!0),!0!==n||"script"!==o||s&&!0!==r.test(s)||t.warn("The <script> tag cannot be used in a <head> tag.",i.line,i.col,a,i.raw)},s=function(t){"head"===t.tagName.toLowerCase()&&(e.removeListener("tagstart",i),e.removeListener("tagend",s))};e.addListener("tagstart",i),e.addListener("tagend",s)}}}));a(m);var b=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"href-abs-or-rel",description:"An href attribute must be either absolute or relative.",init:function(e,t,a){var r=this,n="abs"===a?"absolute":"relative";e.addListener("tagstart",(function(e){for(var a,i=e.attrs,s=e.col+e.tagName.length+1,o=0,l=i.length;o<l;o++)if("href"===(a=i[o]).name){("absolute"===n&&!1===/^\w+?:/.test(a.value)||"relative"===n&&!0===/^https?:\/\//.test(a.value))&&t.warn("The value of the href attribute [ "+a.value+" ] must be "+n+".",e.line,s+a.index,r,a.raw);break}}))}}}));a(b);var y=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-class-ad-disabled",description:"The id and class attributes cannot use the ad keyword, it will be blocked by adblock software.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var r,n,i=e.attrs,s=e.col+e.tagName.length+1,o=0,l=i.length;o<l;o++)n=(r=i[o]).name,/^(id|class)$/i.test(n)&&/(^|[-_])ad([-_]|$)/i.test(r.value)&&t.warn("The value of attribute "+n+" cannot use the ad keyword.",e.line,s+r.index,a,r.raw)}))}}}));a(y);var w=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-class-value",description:"The id and class attribute values must meet the specified rules.",init:function(e,t,a){var r,n=this;if("object"==typeof(r="string"==typeof a?{underline:{regId:/^[a-z\d]+(_[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by an underscore."},dash:{regId:/^[a-z\d]+(-[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by a dash."},hump:{regId:/^[a-z][a-zA-Z\d]*([A-Z][a-zA-Z\d]*)*$/,message:"The id and class attribute values must meet the camelCase style."}}[a]:a)&&r.regId){var i=r.regId,s=r.message;i instanceof RegExp||(i=new RegExp(i)),e.addListener("tagstart",(function(e){for(var a,r=e.attrs,o=e.col+e.tagName.length+1,l=0,u=r.length;l<u;l++)if("id"===(a=r[l]).name.toLowerCase()&&!1===i.test(a.value)&&t.warn(s,e.line,o+a.index,n,a.raw),"class"===a.name.toLowerCase())for(var d=a.value.split(/\s+/g),c=void 0,f=0,p=d.length;f<p;f++)(c=d[f])&&!1===i.test(c)&&t.warn(s,e.line,o+a.index,n,c)}))}}}}));a(w);var L=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-unique",description:"The value of id attributes must be unique.",init:function(e,t){var a=this,r={};e.addListener("tagstart",(function(e){for(var n,i,s=e.attrs,o=e.col+e.tagName.length+1,l=0,u=s.length;l<u;l++)if("id"===(n=s[l]).name.toLowerCase()){(i=n.value)&&(void 0===r[i]?r[i]=1:r[i]++,r[i]>1&&t.error("The id value [ "+i+" ] must be unique.",e.line,o+n.index,a,n.raw));break}}))}}}));a(L);var O=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"inline-script-disabled",description:"Inline script cannot be used.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var r,n,i=e.attrs,s=e.col+e.tagName.length+1,o=/^on(unload|message|submit|select|scroll|resize|mouseover|mouseout|mousemove|mouseleave|mouseenter|mousedown|load|keyup|keypress|keydown|focus|dblclick|click|change|blur|error)$/i,l=0,u=i.length;l<u;l++)n=(r=i[l]).name.toLowerCase(),!0===o.test(n)?t.warn("Inline script [ "+r.raw+" ] cannot be used.",e.line,s+r.index,a,r.raw):"src"!==n&&"href"!==n||/^\s*javascript:/i.test(r.value)&&t.warn("Inline script [ "+r.raw+" ] cannot be used.",e.line,s+r.index,a,r.raw)}))}}}));a(O);var _=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"inline-style-disabled",description:"Inline style cannot be used.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var r,n=e.attrs,i=e.col+e.tagName.length+1,s=0,o=n.length;s<o;s++)"style"===(r=n[s]).name.toLowerCase()&&t.warn("Inline style [ "+r.raw+" ] cannot be used.",e.line,i+r.index,a,r.raw)}))}}}));a(_);var j=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"input-requires-label",description:"All [ input ] tags must have a corresponding [ label ] tag. ",init:function(e,t){var a=this,r=[],n=[];e.addListener("tagstart",(function(t){var a=t.tagName.toLowerCase(),i=e.getMapAttrs(t.attrs),s=t.col+a.length+1;"input"===a&&n.push({event:t,col:s,id:i.id}),"label"===a&&"for"in i&&""!==i.for&&r.push({event:t,col:s,forValue:i.for})})),e.addListener("end",(function(){n.forEach((function(e){(function(e){var t=!1;return r.forEach((function(a){e.id&&e.id===a.forValue&&(t=!0)})),t})(e)||t.warn("No matching [ label ] tag found.",e.event.line,e.col,a,e.event.raw)}))}))}}}));a(j);var P=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"script-disabled",description:"The <script> tag cannot be used.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){"script"===e.tagName.toLowerCase()&&t.error("The <script> tag cannot be used.",e.line,e.col,a,e.raw)}))}}}));a(P);var x=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"space-tab-mixed-disabled",description:"Do not mix tabs and spaces for indentation.",init:function(e,t,a){var r=this,n="nomix",i=null;if("string"==typeof a){var s=/^([a-z]+)(\d+)?/.exec(a);s&&(n=s[1],i=s[2]&&parseInt(s[2],10))}e.addListener("text",(function(a){for(var s,o=a.raw,l=/(^|\r?\n)([ \t]+)/g;s=l.exec(o);){var u=e.fixPos(a,s.index+s[1].length);if(1===u.col){var d=s[2];"space"===n?i?!1!==/^ +$/.test(d)&&d.length%i==0||t.warn("Please use space for indentation and keep "+i+" length.",u.line,1,r,a.raw):!1===/^ +$/.test(d)&&t.warn("Please use space for indentation.",u.line,1,r,a.raw):"tab"===n&&!1===/^\t+$/.test(d)?t.warn("Please use tab for indentation.",u.line,1,r,a.raw):!0===/ +\t|\t+ /.test(d)&&t.warn("Do not mix tabs and spaces for indentation.",u.line,1,r,a.raw)}}}))}}}));a(x);var T=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"spec-char-escape",description:"Special characters must be escaped.",init:function(e,t){var a=this;e.addListener("text",(function(r){for(var n,i=r.raw,s=/([<>])|( \& )/g;n=s.exec(i);){var o=e.fixPos(r,n.index);t.error("Special characters must be escaped : [ "+n[0]+" ].",o.line,o.col,a,r.raw)}}))}}}));a(T);var M=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"src-not-empty",description:"The src attribute of an img(script,link) must have a value.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){for(var r,n=e.tagName,i=e.attrs,s=e.col+n.length+1,o=0,l=i.length;o<l;o++)r=i[o],(!0===/^(img|script|embed|bgsound|iframe)$/.test(n)&&"src"===r.name||"link"===n&&"href"===r.name||"object"===n&&"data"===r.name)&&""===r.value&&t.error("The attribute [ "+r.name+" ] of the tag [ "+n+" ] must have a value.",e.line,s+r.index,a,r.raw)}))}}}));a(M);var N=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"style-disabled",description:"<style> tags cannot be used.",init:function(e,t){var a=this;e.addListener("tagstart",(function(e){"style"===e.tagName.toLowerCase()&&t.warn("The <style> tag cannot be used.",e.line,e.col,a,e.raw)}))}}}));a(N);var A=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tag-pair",description:"Tag must be paired.",init:function(e,t){var a=this,r=[],n=e.makeMap("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",(function(e){var t=e.tagName.toLowerCase();void 0!==n[t]||e.close||r.push({tagName:t,line:e.line,raw:e.raw})})),e.addListener("tagend",(function(e){var n,i=e.tagName.toLowerCase();for(n=r.length-1;n>=0&&r[n].tagName!==i;n--);if(n>=0){for(var s=[],o=r.length-1;o>n;o--)s.push("</"+r[o].tagName+">");if(s.length>0){var l=r[r.length-1];t.error("Tag must be paired, missing: [ "+s.join("")+" ], start tag match failed [ "+l.raw+" ] on line "+l.line+".",e.line,e.col,a,e.raw)}r.length=n}else t.error("Tag must be paired, no start tag: [ "+e.raw+" ]",e.line,e.col,a,e.raw)})),e.addListener("end",(function(e){for(var n=[],i=r.length-1;i>=0;i--)n.push("</"+r[i].tagName+">");if(n.length>0){var s=r[r.length-1];t.error("Tag must be paired, missing: [ "+n.join("")+" ], open tag match failed [ "+s.raw+" ] on line "+s.line+".",e.line,e.col,a,"")}}))}}}));a(A);var C=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tag-self-close",description:"Empty tags must be self closed.",init:function(e,t){var a=this,r=e.makeMap("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",(function(e){var n=e.tagName.toLowerCase();void 0!==r[n]&&(e.close||t.warn("The empty tag : [ "+n+" ] must be self closed.",e.line,e.col,a,e.raw))}))}}}));a(C);var k=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tagname-lowercase",description:"All html element names must be in lowercase.",init:function(e,t,a){var r=this,n=Array.isArray(a)?a:[];e.addListener("tagstart,tagend",(function(e){var a=e.tagName;-1===n.indexOf(a)&&a!==a.toLowerCase()&&t.error("The html element name of [ "+a+" ] must be in lowercase.",e.line,e.col,r,e.raw)}))}}}));a(k);var q=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tagname-specialchars",description:"All html element names must be in lowercase.",init:function(e,t){var a=this,r=/[^a-zA-Z0-9\-:_]/;e.addListener("tagstart,tagend",(function(e){var n=e.tagName;r.test(n)&&t.error("The html element name of [ "+n+" ] contains special character.",e.line,e.col,a,e.raw)}))}}}));a(q);var E=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"title-require",description:"<title> must be present in <head> tag.",init:function(e,t){var a=this,r=!1,n=!1,i=function(e){var t=e.tagName.toLowerCase();"head"===t?r=!0:"title"===t&&r&&(n=!0)},s=function(r){var o=r.tagName.toLowerCase();if(n&&"title"===o){var l=r.lastEvent;("text"!==l.type||"text"===l.type&&!0===/^\s*$/.test(l.raw))&&t.error("<title></title> must not be empty.",r.line,r.col,a,r.raw)}else"head"===o&&(!1===n&&t.error("<title> must be present in <head> tag.",r.line,r.col,a,r.raw),e.removeListener("tagstart",i),e.removeListener("tagend",s))};e.addListener("tagstart",i),e.addListener("tagend",s)}}}));a(E);var R=r((function(e,a){var r=t&&t.__assign||function(){return(r=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var n in t=arguments[a])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0});var n={a:{selfclosing:!1,attrsRequired:["href","title"],redundantAttrs:["alt"]},div:{selfclosing:!1},main:{selfclosing:!1,redundantAttrs:["role"]},nav:{selfclosing:!1,redundantAttrs:["role"]},script:{attrsOptional:[["async","async"],["defer","defer"]]},img:{selfclosing:!0,attrsRequired:["src","alt","title"]}};a.default={id:"tags-check",description:"Checks html tags.",init:function(e,t,a){var i=this;n=r(r({},n),a),e.addListener("tagstart",(function(e){var a=e.attrs,r=e.col+e.tagName.length+1,s=e.tagName.toLowerCase();if(n[s]){var o=n[s];if(!0!==o.selfclosing||e.close?!1===o.selfclosing&&e.close&&t.warn("The <"+s+"> tag must not be selfclosing.",e.line,e.col,i,e.raw):t.warn("The <"+s+"> tag must be selfclosing.",e.line,e.col,i,e.raw),Array.isArray(o.attrsRequired))o.attrsRequired.forEach((function(n){if(Array.isArray(n)){var o=n.map((function(e){return e})),l=o.shift(),u=o;a.some((function(e){return e.name===l}))?a.forEach((function(a){a.name===l&&-1===u.indexOf(a.value)&&t.error("The <"+s+"> tag must have attr '"+l+"' with one value of '"+u.join("' or '")+"'.",e.line,r,i,e.raw)})):t.error("The <"+s+"> tag must have attr '"+l+"'.",e.line,r,i,e.raw)}else a.some((function(e){return-1!==n.split("|").indexOf(e.name)}))||t.error("The <"+s+"> tag must have attr '"+n+"'.",e.line,r,i,e.raw)}));if(Array.isArray(o.attrsOptional))o.attrsOptional.forEach((function(n){if(Array.isArray(n)){var o=n.map((function(e){return e})),l=o.shift(),u=o;a.some((function(e){return e.name===l}))&&a.forEach((function(a){a.name===l&&-1===u.indexOf(a.value)&&t.error("The <"+s+"> tag must have optional attr '"+l+"' with one value of '"+u.join("' or '")+"'.",e.line,r,i,e.raw)}))}}));if(Array.isArray(o.redundantAttrs))o.redundantAttrs.forEach((function(n){a.some((function(e){return e.name===n}))&&t.error("The attr '"+n+"' is redundant for <"+s+"> and should be ommited.",e.line,r,i,e.raw)}))}}))}}}));a(R);var D=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-no-unnecessary-whitespace",description:"No spaces between attribute names and values.",init:function(e,t,a){var r=this,n=Array.isArray(a)?a:[];e.addListener("tagstart",(function(e){for(var a=e.attrs,i=e.col+e.tagName.length+1,s=0;s<a.length;s++)if(-1===n.indexOf(a[s].name)){var o=/(\s*)=(\s*)/.exec(a[s].raw.trim());!o||0===o[1].length&&0===o[2].length||t.error("The attribute '"+a[s].name+"' must not have spaces between the name and value.",e.line,i+a[s].index,r,a[s].raw)}}))}}}));a(D);var H=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"altRequire",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"attrLowercase",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"attrSort",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"attrNoDuplication",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"attrUnsafeChars",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"attrValueDoubleQuotes",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"attrValueNotEmpty",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"attrValueSingleQuotes",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"attrWhitespace",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"doctypeFirst",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"doctypeHTML5",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"headScriptDisabled",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"hrefAbsOrRel",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"idClsasAdDisabled",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"idClassValue",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"idUnique",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,"inlineScriptDisabled",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"inlineStyleDisabled",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"inputRequiresLabel",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"scriptDisabled",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"spaceTabMixedDisabled",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"specCharEscape",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"srcNotEmpty",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"styleDisabled",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"tagPair",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"tagSelfClose",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"tagnameLowercase",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"tagnameSpecialChars",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(t,"titleRequire",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"tagsCheck",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(t,"attrNoUnnecessaryWhitespace",{enumerable:!0,get:function(){return D.default}})}));a(H);H.altRequire,H.attrLowercase,H.attrSort,H.attrNoDuplication,H.attrUnsafeChars,H.attrValueDoubleQuotes,H.attrValueNotEmpty,H.attrValueSingleQuotes,H.attrWhitespace,H.doctypeFirst,H.doctypeHTML5,H.headScriptDisabled,H.hrefAbsOrRel,H.idClsasAdDisabled,H.idClassValue,H.idUnique,H.inlineScriptDisabled,H.inlineStyleDisabled,H.inputRequiresLabel,H.scriptDisabled,H.spaceTabMixedDisabled,H.specCharEscape,H.srcNotEmpty,H.styleDisabled,H.tagPair,H.tagSelfClose,H.tagnameLowercase,H.tagnameSpecialChars,H.titleRequire,H.tagsCheck,H.attrNoUnnecessaryWhitespace;var S=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLParser=t.Reporter=t.HTMLRules=t.HTMLHint=void 0,t.HTMLParser=n.default,t.Reporter=i.default,t.HTMLRules=H;var a=function(){function e(){this.rules={},this.defaultRuleset={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0}}return e.prototype.addRule=function(e){this.rules[e.id]=e},e.prototype.verify=function(e,t){void 0===t&&(t=this.defaultRuleset),0===Object.keys(t).length&&(t=this.defaultRuleset),e=e.replace(/^\s*<!--\s*htmlhint\s+([^\r\n]+?)\s*-->/i,(function(e,a){return a.replace(/(?:^|,)\s*([^:,]+)\s*(?:\:\s*([^,\s]+))?/g,(function(e,a,r){return t[a]=!(void 0!==r&&r.length>0)||JSON.parse(r),""})),""}));var a,r=new n.default,s=new i.default(e,t),o=this.rules;for(var l in t)void 0!==(a=o[l])&&!1!==t[l]&&a.init(r,s,t[l]);return r.parse(e),s.messages},e.prototype.format=function(e,t){void 0===t&&(t={});var a=[],n={white:"",grey:"",red:"",reset:""};t.colors&&(n.white="",n.grey="",n.red="",n.reset="");var i=t.indent||0;return e.forEach((function(e){var t=e.evidence,s=e.line,o=e.col,l=t.length,u=o>41?o-40:1,d=t.length>o+60?o+60:l;o<41&&(d+=40-o+1),t=t.replace(/\t/g," ").substring(u-1,d),u>1&&(t="..."+t,u-=3),d<l&&(t+="..."),a.push(n.white+r(i)+"L"+s+" |"+n.grey+t+n.reset);var c=o-u,f=t.substring(0,c).match(/[^\u0000-\u00ff]/g);null!==f&&(c+=f.length),a.push(n.white+r(i)+r(String(s).length+3+c)+"^ "+n.red+e.message+" ("+e.rule.id+")"+n.reset)})),a},e}();function r(e,t){return new Array(e+1).join(t||" ")}t.HTMLHint=new a,Object.keys(H).forEach((function(e){t.HTMLHint.addRule(H[e])}))})),I=a(S),$=S.HTMLParser,z=S.Reporter,V=S.HTMLRules,F=S.HTMLHint;e.HTMLHint=F,e.HTMLParser=$,e.HTMLRules=V,e.Reporter=z,e.default=I,Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "htmlhint",
"version": "0.13.1-beta.1",
"version": "0.13.1-beta.2",
"description": "The Static Code Analysis Tool for your HTML",

@@ -24,3 +24,3 @@ "repository": {

"main": "dist/htmlhint.js",
"module": "src/core.js",
"module": "dist/core/core.js",
"scripts": {

@@ -64,6 +64,4 @@ "commit": "npx git-cz",

"commander": "5.1.0",
"esm": "3.2.25",
"glob": "7.1.6",
"parse-glob": "3.0.4",
"path-parse": "1.0.6",
"request": "2.88.2",

@@ -76,8 +74,8 @@ "strip-json-comments": "3.1.0",

"@commitlint/config-conventional": "8.3.4",
"@rollup/plugin-commonjs": "11.1.0",
"@rollup/plugin-node-resolve": "7.1.3",
"@rollup/plugin-commonjs": "12.0.0",
"@rollup/plugin-node-resolve": "8.0.0",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/commit-analyzer": "8.0.1",
"@semantic-release/git": "9.0.0",
"@semantic-release/github": "7.0.6",
"@semantic-release/github": "7.0.7",
"@semantic-release/npm": "7.0.5",

@@ -90,7 +88,7 @@ "@semantic-release/release-notes-generator": "9.0.1",

"@types/xml": "1.0.5",
"@typescript-eslint/eslint-plugin": "3.0.0",
"@typescript-eslint/parser": "3.0.0",
"@typescript-eslint/eslint-plugin": "3.0.2",
"@typescript-eslint/parser": "3.0.2",
"commitizen": "4.1.2",
"commitlint": "8.3.5",
"eslint": "7.0.0",
"eslint": "7.1.0",
"eslint-config-prettier": "6.11.0",

@@ -101,10 +99,10 @@ "eslint-plugin-prettier": "3.1.3",

"istanbul": "0.4.5",
"lint-staged": "10.2.2",
"mocha": "7.1.2",
"lint-staged": "10.2.7",
"mocha": "7.2.0",
"prettier": "2.0.5",
"pretty-quick": "2.0.1",
"rollup": "2.10.3",
"rollup": "2.12.0",
"rollup-plugin-babel": "4.4.0",
"rollup-plugin-terser": "5.3.0",
"semantic-release": "17.0.7",
"rollup-plugin-terser": "6.1.0",
"semantic-release": "17.0.8",
"typescript": "3.9.3"

@@ -111,0 +109,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc