chore(lint): require semicolons
Relying on ASI (automatic semicolon insertion) is allowed in TypeScript because JavaScript allows it. However, when we run clang-format it doesn’t understand that these statements are terminated with a newline and changes the indentation, in bad cases even breaking the code. Fixes #817
This commit is contained in:
@ -167,7 +167,7 @@ class _ParseAST {
|
||||
expectIdentifierOrKeyword(): string {
|
||||
var n = this.next;
|
||||
if (!n.isIdentifier() && !n.isKeyword()) {
|
||||
this.error(`Unexpected token ${n}, expected identifier or keyword`)
|
||||
this.error(`Unexpected token ${n}, expected identifier or keyword`);
|
||||
}
|
||||
this.advance();
|
||||
return n.toString();
|
||||
@ -176,7 +176,7 @@ class _ParseAST {
|
||||
expectIdentifierOrKeywordOrString(): string {
|
||||
var n = this.next;
|
||||
if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {
|
||||
this.error(`Unexpected token ${n}, expected identifier, keyword, or string`)
|
||||
this.error(`Unexpected token ${n}, expected identifier, keyword, or string`);
|
||||
}
|
||||
this.advance();
|
||||
return n.toString();
|
||||
|
Reference in New Issue
Block a user