How to use the eslint-visitor-keys.getKeys function in eslint-visitor-keys

To help you get started, we’ve selected a few eslint-visitor-keys examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mysticatea / eslint-utils / src / has-side-effect.js View on Github external
$visitChildren(node, options, visitorKeys) {
            const { type } = node

            for (const key of visitorKeys[type] || evk.getKeys(node)) {
                const value = node[key]

                if (Array.isArray(value)) {
                    for (const element of value) {
                        if (
                            element &&
                            this.$visit(element, options, visitorKeys)
                        ) {
                            return true
                        }
                    }
                } else if (value && this.$visit(value, options, visitorKeys)) {
                    return true
                }
            }
github eslint / eslint / lib / shared / traverser.js View on Github external
static getKeys(node) {
        return vk.getKeys(node);
    }
github graalvm / graaljs / tools / node_modules / eslint / lib / util / traverser.js View on Github external
function getVisitorKeys(visitorKeys, node) {
    let keys = visitorKeys[node.type];

    if (!keys) {
        keys = vk.getKeys(node);
        debug("Unknown node type \"%s\": Estimated visitor keys %j", node.type, keys);
    }

    return keys;
}
github arangodb / arangodb / js / node / node_modules / eslint / lib / util / traverser.js View on Github external
function getVisitorKeys(visitorKeys, node) {
    let keys = visitorKeys[node.type];

    if (!keys) {
        keys = vk.getKeys(node);
        debug("Unknown node type \"%s\": Estimated visitor keys %j", node.type, keys);
    }

    return keys;
}
github claykohut / ethtxt / node_modules / eslint / lib / util / traverser.js View on Github external
function getVisitorKeys(visitorKeys, node) {
    let keys = visitorKeys[node.type];

    if (!keys) {
        keys = vk.getKeys(node);
        debug("Unknown node type \"%s\": Estimated visitor keys %j", node.type, keys);
    }

    return keys;
}
github eslint / eslint / lib / shared / traverser.js View on Github external
function getVisitorKeys(visitorKeys, node) {
    let keys = visitorKeys[node.type];

    if (!keys) {
        keys = vk.getKeys(node);
        debug("Unknown node type \"%s\": Estimated visitor keys %j", node.type, keys);
    }

    return keys;
}

eslint-visitor-keys

Constants and utilities about visitor keys to traverse AST.

BSD-2-Clause
Latest version published 19 days ago

Package Health Score

91 / 100
Full package analysis

Similar packages