Skip to content

Commit 9471a83

Browse files
committed
Fix lint
1 parent 631f3d3 commit 9471a83

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/lualib/Error.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function getErrorStack(constructor: () => any): string | undefined {
2424

2525
if (_VERSION.includes("Lua 5.0")) {
2626
return debug.traceback(`[Level ${level}]`);
27+
// @ts-ignore Fails when compiled with Lua 5.0 types
2728
} else if (_VERSION === "Lua 5.1") {
2829
// Lua 5.1 and LuaJIT have a bug where it's not possible to specify the level without a message.
2930
// @ts-ignore Fails when compiled with Lua 5.0 types

test/unit/error.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,15 @@ util.testEachVersion(
355355
...util.expectEachVersionExceptJit(builder => {
356356
builder.expectToHaveNoDiagnostics();
357357
const luaResult = builder.getLuaExecutionResult();
358-
expect(luaResult.split('\n').length).toBe(4);
358+
// eslint-disable-next-line jest/no-standalone-expect
359+
expect(luaResult.split('\n')).toHaveLength(4);
359360
}),
360361

361362
// 5.0 debug.traceback doesn't support levels
362-
[tstl.LuaTarget.Lua50]: builder => {
363+
[tstl.LuaTarget.Lua50](builder) {
363364
builder.expectToHaveNoDiagnostics();
364365
const luaResult = builder.getLuaExecutionResult();
366+
// eslint-disable-next-line jest/no-standalone-expect
365367
expect(luaResult).toContain("Level 4");
366368
},
367369
}

0 commit comments

Comments
 (0)