We would like to have an option for fixer to add a new line after jsdoc style fixing.
"/** @override */\n" + indentation instead of just "/** @override */ "
So this:
export class ChildMyClass extends MyClass
{
/** @override */ public method(parameters: string[]): void {
parameters.forEach(console.error);
}
}
becomes this:
export class ChildMyClass extends MyClass
{
/** @override */
public method(parameters: string[]): void {
parameters.forEach(console.error);
}
}
A crude implementation would be:
else {
// No Jsdoc found, create a new one with just the tag
let text = node.getFullText();
const tokenStart = text.indexOf(node.getText());
text = text.substr(0, tokenStart);
const lastNL = text.lastIndexOf("\n");
const indent = text.substr(lastNL + 1);
return Lint.Replacement.appendText(node.getStart(), `/** @${this.getKeyword()} */\n` + indent);
}
Checking seems to work OK regardless of the new line.
We would like to have an option for fixer to add a new line after jsdoc style fixing.
"/** @override */\n" + indentation
instead of just"/** @override */ "
So this:
becomes this:
A crude implementation would be:
Checking seems to work OK regardless of the new line.
Is this possible? Thanks!