mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
no-unused-expressions: [error, { allowTernary: true }]
This commit is contained in:
+1
-1
@@ -92,7 +92,7 @@
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-unsafe-finally": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-unused-expressions": ["error", { "allowTernary": true }],
|
||||
"no-unused-labels": "error",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
|
||||
@@ -214,17 +214,9 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor {
|
||||
}
|
||||
|
||||
function insertAccessor(changeTracker: textChanges.ChangeTracker, file: SourceFile, accessor: AccessorDeclaration, declaration: AcceptedDeclaration, container: ContainerDeclaration) {
|
||||
if (isParameterPropertyDeclaration(declaration)) {
|
||||
changeTracker.insertNodeAtClassStart(file, <ClassLikeDeclaration>container, accessor);
|
||||
}
|
||||
else {
|
||||
if (isPropertyAssignment(declaration)) {
|
||||
changeTracker.insertNodeAfterComma(file, declaration, accessor);
|
||||
}
|
||||
else {
|
||||
changeTracker.insertNodeAfter(file, declaration, accessor);
|
||||
}
|
||||
}
|
||||
isParameterPropertyDeclaration(declaration) ? changeTracker.insertNodeAtClassStart(file, <ClassLikeDeclaration>container, accessor) :
|
||||
isPropertyAssignment(declaration) ? changeTracker.insertNodeAfterComma(file, declaration, accessor) :
|
||||
changeTracker.insertNodeAfter(file, declaration, accessor);
|
||||
}
|
||||
|
||||
function updateReadonlyPropertyInitializerStatementConstructor(changeTracker: textChanges.ChangeTracker, file: SourceFile, constructor: ConstructorDeclaration, fieldName: string, originalName: string) {
|
||||
|
||||
Reference in New Issue
Block a user