Skip to content

Commit 9f1a967

Browse files
committed
fix(sea): F3 round-3 — eslint no-unused-vars on 4 underscore-prefix args
DA F3 round-1 M3 finding: airbnb-typescript's `no-unused-vars` rule does not honor the `_`-prefix convention, so the 4 args in this test file that are interface-mandated but unused (the IDBSQLLogger `log(_level, _message)` noop method and the sinon spy `(_sql, _options) => stmt`) were reported as errors. Verified the rule config: `.eslintrc` uses `airbnb-typescript/base` which inherits airbnb-base's `no-unused-vars` with no `argsIgnorePattern` override. Two-line fix: `// eslint-disable-next-line` directly above each site. Both args remain in the signature because they're shape- mandated by the consumer (IDBSQLLogger interface, sinon spy function type matching SeaNativeConnection.executeStatement). Verified `yarn lint` no longer emits errors for `tests/unit/sea/execution-query-tags.test.ts`. Pre-existing lint errors on `operation-lifecycle-e2e.test.ts` and `SeaSessionBackend.ts` are upstream on `sea-auth-u2m` and not introduced or addressed by this commit. Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
1 parent 8c5618c commit 9f1a967

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/unit/sea/execution-query-tags.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class FakeNativeStatement implements SeaNativeStatement {
5757

5858
function makeFakeContext(): IClientContext {
5959
const logger: IDBSQLLogger = {
60+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6061
log(_level: LogLevel, _message: string): void {
6162
// no-op
6263
},
@@ -84,6 +85,7 @@ describe('SeaSessionBackend — query tags threading', () => {
8485

8586
beforeEach(() => {
8687
const stmt = new FakeNativeStatement();
88+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
8789
executeSpy = sinon.spy(async (_sql: string, _options?: SeaNativeExecuteOptions) => stmt);
8890
connection = {
8991
executeStatement: executeSpy,

0 commit comments

Comments
 (0)