How to use the espree.Syntax function in espree

To help you get started, we’ve selected a few espree 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 elastic / timelion / node_modules / gulp-eslint / node_modules / eslint / lib / rules / no-restricted-syntax.js View on Github external
return context.options.reduce(function(result, nodeType) {
        result[nodeType] = warn;

        return result;
    }, {});

};

module.exports.schema = {
    "type": "array",
    "items": [
        {
            "enum": [0, 1, 2]
        },
        {
            "enum": Object.keys(nodeTypes).map(function(k) {
                return nodeTypes[k];
            })
        }
    ],
    "uniqueItems": true,
    "minItems": 1
};

espree

An Esprima-compatible JavaScript parser built on Acorn

BSD-2-Clause
Latest version published 10 days ago

Package Health Score

91 / 100
Full package analysis