Skip to content

Update packages and linting - #1542

Open
zorkow wants to merge 2 commits into
fix/lintingfrom
update/packages
Open

Update packages and linting#1542
zorkow wants to merge 2 commits into
fix/lintingfrom
update/packages

Conversation

@zorkow

@zorkow zorkow commented Aug 7, 2026

Copy link
Copy Markdown
Member
  • Updates all packages to latest version except for typescript
  • Fixes all linting errors of the form no-useless-assignment. These generally make things clearer. The only exceptions are in Wrappers/mo.ts and Wrappers/mmultiscripts.ts where it makes things slightly uglier.

@zorkow
zorkow requested a review from dpvc August 7, 2026 11:37

@dpvc dpvc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue with an incorrect comment, but otherwise ok.

GetTemplate(parser: TexParser, cmd: string, cs: string): number | string[] {
// @test Def Double Let, Def ReDef, Def Let
let c = parser.GetNext();
parser.GetNext(); // Remove initial '{' from the string

@dpvc dpvc Aug 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is removing spaces, not {. After #1539, it will also remove comments.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetNext removes spaces and gets the next non-whitespace characters. But then we ignore that and then c to the next character. So does that not mean that we are effectively ignore the initial characters, which in the tests was always { ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, GetNext() does return the next character, but doesn't move past it. And the next character isn't a { in the case where you have a template, like \def\x#1{...} or \def\x#1,#2\end{...}.

public GetNext(): string {
while (this.nextIsSpace()) {
this.i++;
}
return this.getCodePoint();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants