Skip to content

Commit

Permalink
style: apply automated linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
megalinter-bot committed Jul 4, 2023
1 parent 2a1f91f commit e3910e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions DSL/src/language-server/formatting/safe-ds-formatter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {AbstractFormatter, AstNode, CstNode, findCommentNode, Formatting, isAstNode} from 'langium';
import { AbstractFormatter, AstNode, CstNode, findCommentNode, Formatting, isAstNode } from 'langium';
import * as ast from '../generated/ast';
import { SdsImport, SdsImportAlias, SdsModule } from '../generated/ast';
import { annotationCallsOrEmpty, typeArgumentsOrEmpty } from '../helpers/astShortcuts';
Expand Down Expand Up @@ -204,7 +204,7 @@ export class SafeDSFormatter extends AbstractFormatter {
// Package
if (annotations.length === 0) {
const packageKeyword = formatter.keyword('package');
const cstNodes = packageKeyword.nodes
const cstNodes = packageKeyword.nodes;

if (cstNodes.length > 0 && this.hasComment(cstNodes[0])) {
packageKeyword.prepend(newLine());
Expand Down Expand Up @@ -910,12 +910,12 @@ export class SafeDSFormatter extends AbstractFormatter {
* @param node The node to get the comment for.
*/
private getCommentNode(node: AstNode | CstNode | undefined): CstNode | undefined {
const commentNames = ["ML_COMMENT", "SL_COMMENT"]
const commentNames = ['ML_COMMENT', 'SL_COMMENT'];

if (isAstNode(node)) {
return findCommentNode(node.$cstNode, commentNames)
return findCommentNode(node.$cstNode, commentNames);
} else {
return findCommentNode(node, commentNames)
return findCommentNode(node, commentNames);
}
}
}

0 comments on commit e3910e3

Please sign in to comment.