diff --git a/rewrite-javascript/rewrite/src/javascript/format.ts b/rewrite-javascript/rewrite/src/javascript/format.ts index b20a874455..39345fbdec 100644 --- a/rewrite-javascript/rewrite/src/javascript/format.ts +++ b/rewrite-javascript/rewrite/src/javascript/format.ts @@ -85,13 +85,6 @@ export class NormalizeWhitespaceVisitor
extends JavaScriptVisitor
{
}
return super.postVisit(tree, p);
}
-
- private concatenatePrefix(node: Draft extends JavaScriptVisitor {
@@ -193,11 +186,6 @@ export class SpacesVisitor extends JavaScriptVisitor {
protected async visitClassDeclaration(classDecl: J.ClassDeclaration, p: P): Promise extends JavaScriptVisitor {
draft.parameters = await this.spaceBeforeContainer(draft.parameters, this.style.beforeParentheses.functionDeclarationParentheses);
// TODO typeParameters handling - see visitClassDeclaration
- // TODO
- // if (m.leadingAnnotations.length > 1) {
- // m = m.withLeadingAnnotations(this.spaceBetweenAnnotations(m.leadingAnnotations));
- // }
});
}
@@ -349,11 +333,6 @@ export class SpacesVisitor extends JavaScriptVisitor {
draft.arguments.elements[0] = await this.spaceAfterRightPadded(await this.spaceBeforeRightPaddedElement(draft.arguments.elements[0], this.style.within.functionCallParentheses), false);
}
// TODO typeParameters handling - see visitClassDeclaration
-
- // TODO
- // m = m.getPadding().withArguments(spaceBefore(m.getPadding().getArguments(), style.getBeforeParentheses().getMethodCall()));
- // if (m.getArguments().isEmpty() || m.getArguments()[0] instanceof J.Empty) {
- // ...
});
}
@@ -586,20 +565,6 @@ export class WrappingAndBracesVisitor extends JavaScriptVisitor {
return super.postVisit(tree, p);
}
- public async visitStatement(statement: Statement, p: P): Promise extends JavaScriptVisitor {
if (!draft.end.whitespace.includes("\n")) {
draft.end.whitespace = draft.end.whitespace + "\n";
}
- // TODO check if it's relevant to TS/JS
- // draft.end = this.keepMaximumLines(draft.end, this.style.keepMaximum.beforeEndOfBlock);
});
}
@@ -1078,17 +1041,6 @@ export class BlankLinesVisitor extends JavaScriptVisitor {
this.keepMaximumBlankLines(e, this.style.keepMaximum.inCode);
return e;
}
- // TODO check if it's relevant to TS/JS
- // protected async visitNewClass(newClass: J.NewClass, p: P): Promise extends JavaScriptVisitor {
}
export class TabsAndIndentsVisitor extends JavaScriptVisitor {
- private readonly newline: string;
private readonly singleIndent: string;
constructor(private readonly tabsAndIndentsStyle: TabsAndIndentsStyle, private stopAfter?: Tree) {
super();
- this.newline = "\n"; // TODO this should be configurable and come from some style too
if (this.tabsAndIndentsStyle.useTabCharacter) {
this.singleIndent = "\t";