Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* @author Toru Nagashima
* @copyright 2017 Toru Nagashima. All rights reserved.
* See LICENSE file in root directory for full license.
*/
import Evk, { VisitorKeys } from "eslint-visitor-keys"
import { Node } from "./nodes"
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const KEYS = Evk.unionWith({
VAttribute: ["key", "value"],
VDirectiveKey: ["name", "argument", "modifiers"],
VDocumentFragment: ["children"],
VElement: ["startTag", "children", "endTag"],
VEndTag: [],
VExpressionContainer: ["expression"],
VFilter: ["callee", "arguments"],
VFilterSequenceExpression: ["expression", "filters"],
VForExpression: ["left", "right"],
VIdentifier: [],
VLiteral: [],
VOnExpression: ["body"],
VSlotScopeExpression: ["params"],
VStartTag: ["attributes"],
VText: [],
})
import * as eslintVisitorKeys from 'eslint-visitor-keys';
export const visitorKeys = eslintVisitorKeys.unionWith({
// Additional estree nodes.
Import: [],
// Additional Properties.
ArrayPattern: ['decorators', 'elements', 'typeAnnotation'],
ArrowFunctionExpression: ['typeParameters', 'params', 'returnType', 'body'],
ClassDeclaration: [
'decorators',
'id',
'typeParameters',
'superClass',
'superTypeParameters',
'implements',
'body',
],
ClassExpression: [
'decorators',
/**
* @fileoverview The visitor keys for the new and updated node types
* @author Michał Sajnóg
* MIT License
*/
"use strict";
const Evk = require("eslint-visitor-keys");
module.exports = Evk.unionWith({
// Additional Properties.
ArrayPattern: ["elements", "typeAnnotation"],
ArrowFunctionExpression: ["typeParameters", "params", "returnType", "body"],
ClassDeclaration: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "implements", "body"],
ClassExpression: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "implements", "body"],
FunctionDeclaration: ["id", "typeParameters", "params", "returnType", "body"],
FunctionExpression: ["id", "typeParameters", "params", "returnType", "body"],
Identifier: ["decorators", "typeAnnotation"],
MethodDefinition: ["decorators", "key", "value"],
ObjectPattern: ["properties", "typeAnnotation"],
RestElement: ["argument", "typeAnnotation"],
NewExpression: ["callee", "typeParameters", "arguments"],
CallExpression: ["callee", "typeParameters", "arguments"],
// Additional Nodes.
BigIntLiteral: [],