eslint-template-visitor
Advanced tools
Comparing version 0.0.0-alpha.2 to 0.0.0-alpha.3
@@ -157,3 +157,4 @@ | ||
for (const [ key, value ] of Object.entries(visitor)) { | ||
for (const key of Object.keys(visitor)) { | ||
const value = visitor[key]; | ||
const template = this._templates.get(key); | ||
@@ -171,3 +172,4 @@ | ||
for (const [ newKey, newValue ] of Object.entries(newVisitor)) { | ||
for (const newKey of Object.keys(newVisitor)) { | ||
const newValue = newVisitor[newKey]; | ||
newVisitor[newKey] = newValue.length === 1 ? newValue[0] : (...args) => { | ||
@@ -174,0 +176,0 @@ newValue.forEach(handler => handler(...args)); |
@@ -7,3 +7,4 @@ | ||
for (const [ key, value ] of Object.entries(visitor)) { | ||
for (const key of Object.keys(visitor)) { | ||
const value = visitor[key]; | ||
newVisitor[key] = function (node, ...rest) { | ||
@@ -10,0 +11,0 @@ value.call(this, node, ...rest); |
{ | ||
"name": "eslint-template-visitor", | ||
"version": "0.0.0-alpha.2", | ||
"version": "0.0.0-alpha.3", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "GPL-3.0-or-later OR MIT", |
# ESLint Template Visitor | ||
[![Build Status](https://travis-ci.org/futpib/eslint-template-visitor.svg?branch=master)](https://travis-ci.org/futpib/eslint-template-visitor) | ||
[![Build Status](https://travis-ci.org/futpib/eslint-template-visitor.svg?branch=master)](https://travis-ci.org/futpib/eslint-template-visitor) [![Coverage Status](https://coveralls.io/repos/github/futpib/eslint-template-visitor/badge.svg?branch=master)](https://coveralls.io/github/futpib/eslint-template-visitor?branch=master) | ||
Simplify eslint rules by visiting templates |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20758
644