mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 20:00:02 +00:00
fix(editor): Switch CodeNodeEditor linter parser to esprima-next (#4524)
* ⬆️ Switch to `esprima-next` * 📦 Update `package-lock.json` * ⚡ Use `esprima-next` * 📘 Ignore type issue * 📦 Update `package-lock.json`
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import { Diagnostic, linter as createLinter } from '@codemirror/lint';
|
||||
import * as esprima from 'esprima';
|
||||
import * as esprima from 'esprima-next';
|
||||
|
||||
import {
|
||||
DEFAULT_LINTER_DELAY_IN_MS,
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import * as esprima from 'esprima-next';
|
||||
import type { Completion } from '@codemirror/autocomplete';
|
||||
import type { Node } from 'estree';
|
||||
import type { RangeNode } from './types';
|
||||
|
||||
export function walk<T extends RangeNode>(
|
||||
node: Node,
|
||||
node: Node | esprima.Program,
|
||||
test: (node: Node) => boolean,
|
||||
found: Node[] = [],
|
||||
) {
|
||||
// @ts-ignore
|
||||
if (test(node)) found.push(node);
|
||||
|
||||
for (const key in node) {
|
||||
|
||||
Reference in New Issue
Block a user