fix(editor): remove wrong linting from Code node editor (#4384)

🔥 Remove wrong linting from Code node
This commit is contained in:
Iván Ovejero
2022-10-19 17:21:14 +02:00
committed by GitHub
parent 50c18a789a
commit 77d041ba78
2 changed files with 0 additions and 29 deletions

View File

@@ -263,34 +263,6 @@ export const linterExtension = (Vue as CodeNodeEditorMixin).extend({
});
}
/**
* Lint for `.all()` called with argument in `runOnceForAllItems` mode
*
* $input.itemMatching()
*/
if (this.mode === 'runOnceForAllItems') {
type TargetNode = RangeNode & { callee: RangeNode & { property: RangeNode } };
const isItemMatchingCallWithoutArg = (node: Node) =>
node.type === 'CallExpression' &&
node.callee.type === 'MemberExpression' &&
node.callee.property.type === 'Identifier' &&
node.callee.property.name === 'all' &&
node.arguments.length !== 0;
walk<TargetNode>(ast, isItemMatchingCallWithoutArg).forEach((node) => {
const [start, end] = this.getRange(node.callee.property);
lintings.push({
from: start,
to: end + '()'.length,
severity: DEFAULT_LINTER_SEVERITY,
message: this.$locale.baseText('codeNodeEditor.linter.allItems.allCalledWithArg'),
});
});
}
/**
* Lint for `.first()` or `.last()` called with argument in `runOnceForAllItems` mode
*