boolean-trivia lint rule: Enforce space between comment and argument

This commit is contained in:
Andy Hanson
2017-04-11 09:37:31 -07:00
parent c38d2a188a
commit ed5eca2b7b
23 changed files with 147 additions and 128 deletions

View File

@@ -118,7 +118,7 @@ namespace ts.codefix {
stringTypeNode,
/*initializer*/ undefined);
const indexSignature = createIndexSignatureDeclaration(
/*decorators*/undefined,
/*decorators*/ undefined,
/*modifiers*/ undefined,
[indexingParameter],
typeNode);

View File

@@ -194,7 +194,7 @@ namespace ts.codefix {
modifiers,
name,
optional,
/*typeParameters*/undefined,
/*typeParameters*/ undefined,
parameters,
/*returnType*/ undefined);
}
@@ -217,9 +217,9 @@ namespace ts.codefix {
[createThrow(
createNew(
createIdentifier("Error"),
/*typeArguments*/undefined,
/*typeArguments*/ undefined,
[createLiteral("Method not implemented.")]))],
/*multiline*/true);
/*multiline*/ true);
}
function createVisibilityModifier(flags: ModifierFlags) {

View File

@@ -116,7 +116,7 @@ namespace ts.codefix {
const nextToken = getTokenAtPosition(sourceFile, importClause.name.end);
if (nextToken && nextToken.kind === SyntaxKind.CommaToken) {
// shift first non-whitespace position after comma to the start position of the node
return deleteRange({ pos: start, end: skipTrivia(sourceFile.text, nextToken.end, /*stopAfterLineBreaks*/ false, /*stopAtComments*/true) });
return deleteRange({ pos: start, end: skipTrivia(sourceFile.text, nextToken.end, /*stopAfterLineBreaks*/ false, /*stopAtComments*/ true) });
}
else {
return deleteNode(importClause.name);