Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@angular-eslint/template-parser

Package Overview
Dependencies
Maintainers
1
Versions
791
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular-eslint/template-parser - npm Package Compare versions

Comparing version 0.0.1-alpha.18 to 0.0.1-alpha.19

2

dist/index.js

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

var e,t=require("@angular/compiler"),r=(e=require("events"))&&"object"==typeof e&&"default"in e?e.default:e,n=require("eslint-scope"),o=n.ScopeManager,a=n.Scope,l=require("eslint/lib/linter/node-event-generator"),i=new WeakMap,s={Program:["templateNodes"],Element:["children","outputs"],BoundEvent:["handler"]};function u(e){var t=null;return"comments"!==e&&"leadingComments"!==e&&"loc"!==e&&"parent"!==e&&"range"!==e&&"tokens"!==e&&"trailingComments"!==e&&null!==(t=this[e])&&"object"==typeof t&&("string"==typeof t.type||Array.isArray(t))}function c(e){return Object.keys(e).filter(u,e)}function p(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type}function y(e,n){var u={type:"Program",comments:[],tokens:[],templateNodes:t.parseTemplate(e,n.filePath).nodes,range:[0,1],loc:{start:{line:0,column:0},end:{line:0,column:1}},value:e},y=new o({});return new a(y,"module",null,u,!1),function e(t){var r=0,n=0,o=s[t.type]||c(t);for(r=0;r<o.length;++r){var a=t[o[r]],l=Array.isArray(a);if(void 0!==a.type&&(a.__originalType=a.type),l||a.type||(a.type=a.constructor.name),l)for(n=0;n<a.length;++n){var i=a[n];void 0!==i.type&&(i.__originalType=i.type),i.type||(i.type=i.constructor.name),p(i)&&e(i)}else p(a)&&e(a)}}(u),{ast:u,scopeManager:y,visitorKeys:s,services:{convertNodeSourceSpanToLoc:function(e){return{start:{line:e.start.line+1,column:e.start.col},end:{line:e.end.line+1,column:e.end.col}}},defineTemplateBodyVisitor:function(e,t){var n=u;if(null==t&&(t={}),null==n)return t;var o=i.get(n);if(null==o){(o=new r).setMaxListeners(0),i.set(n,o);var a=t["Program:exit"];t["Program:exit"]=function(e){try{"function"==typeof a&&a(e);var r=new l(o);!function e(t,r,n){var o=0,a=0;n.enterNode(t,r);var l=(n.visitorKeys||s)[t.type]||c(t);for(o=0;o<l.length;++o){var i=t[l[o]];if(Array.isArray(i))for(a=0;a<i.length;++a){var u=i[a];p(u)&&e(u,t,n)}else p(i)&&e(i,t,n)}n.leaveNode(t,r)}(n,null,r)}finally{t["Program:exit"]=a,i.delete(n)}}}for(var y=0,f=Object.keys(e);y<f.length;y+=1){var m=f[y];o.on(m,e[m])}return t}}}}module.exports={parseForESLint:y,parse:function(e,t){return y(e,t).ast}};
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("@angular/compiler"),r=e(require("events")),n=require("eslint-scope"),o=e(require("eslint/lib/linter/node-event-generator")),a=new WeakMap,i={Program:["templateNodes"],Element:["children","outputs"],BoundEvent:["handler"],BoundText:["value"],ASTWithSource:["ast"],Interpolation:["expressions"],PrefixNot:["expression"],Binary:["left","right"],Template:["templateAttrs","children"],BoundAttribute:["value"]};function l(e){var t=null;return"comments"!==e&&"leadingComments"!==e&&"loc"!==e&&"parent"!==e&&"range"!==e&&"tokens"!==e&&"trailingComments"!==e&&null!==(t=this[e])&&"object"==typeof t&&("string"==typeof t.type||Array.isArray(t))}function s(e){return Object.keys(e).filter(l,e)}function u(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type}function c(e){return{start:{line:e.start.line+1,column:e.start.col},end:{line:e.end.line+1,column:e.end.col}}}function f(e,l){var f={type:"Program",comments:[],tokens:[],range:[0,0],loc:{start:{line:0,column:0},end:{line:0,column:0}},templateNodes:t.parseTemplate(e,l.filePath,{preserveWhitespaces:!1}).nodes,value:e},p=new n.ScopeManager({});new n.Scope(p,"module",null,f,!1),function e(t){var r=0,n=0,o=i[t.type]||s(t);for(r=0;r<o.length;++r){var a=t[o[r]],l=Array.isArray(a);if(void 0!==a.type&&(a.__originalType=a.type),l||a.type||(a.type=a.constructor.name),l)for(n=0;n<a.length;++n){var c=a[n];void 0!==c.type&&(c.__originalType=c.type),c.type||(c.type=c.constructor.name),u(c)&&e(c)}else u(a)&&e(a)}}(f);var d=function(e){var t;return e.templateNodes.forEach(function(e){var r=e.startSourceSpan||e.sourceSpan;t?r&&r.start.offset<t.start.offset&&(t=r):t=r}),t}(f),v=function(e){var t;return e.templateNodes.forEach(function(e){var r=e.endSourceSpan||e.sourceSpan;t?r&&r.end.offset>t.end.offset&&(t=r):t=r}),t}(f);return f.range=[d.start.offset,v.end.offset],f.loc={start:c(d).start,end:c(v).end},{ast:f,scopeManager:p,visitorKeys:i,services:{convertNodeSourceSpanToLoc:c,defineTemplateBodyVisitor:function(e,t){var n=f;if(null==t&&(t={}),null==n)return t;var l=a.get(n);if(null==l){(l=new r).setMaxListeners(0),a.set(n,l);var c=t["Program:exit"];t["Program:exit"]=function(e){try{"function"==typeof c&&c(e);var r=new o(l);!function e(t,r,n){var o=0,a=0;n.enterNode(t,r);var l=(n.visitorKeys||i)[t.type]||s(t);for(o=0;o<l.length;++o){var c=t[l[o]];if(Array.isArray(c))for(a=0;a<c.length;++a){var f=c[a];u(f)&&e(f,t,n)}else u(c)&&e(c,t,n)}n.leaveNode(t,r)}(n,null,r)}finally{t["Program:exit"]=c,a.delete(n)}}}for(var p=0,d=Object.keys(e);p<d.length;p+=1){var v=d[p];l.on(v,e[v])}return t}}}}module.exports={parseForESLint:f,parse:function(e,t){return f(e,t).ast}};
{
"name": "@angular-eslint/template-parser",
"version": "0.0.1-alpha.18",
"version": "0.0.1-alpha.19",
"description": "Angular Template parser for ESLint",

@@ -26,3 +26,3 @@ "license": "MIT",

},
"gitHead": "a1fa84453b178ad182f25c33d9a147e67881ef54"
"gitHead": "94ce0202f8135cb91cd20f1668fffe760741925a"
}
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