Skip to content

Commit 33cb334

Browse files
committed
Cleaning up linting errors
1 parent 43b9a17 commit 33cb334

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"lock": false,
1414
"tasks": {
15-
"check": "deno check **/*.ts && deno fmt --check",
15+
"check": "deno check **/*.ts && deno lint && deno fmt --check",
1616
"lint": "deno lint src test",
1717
"release": "release",
1818
"test": "deno test -A",

src/db.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,13 @@ async function connect(config: ClientConfig): Promise<Client> {
9696
return Promise.resolve();
9797
}
9898
async execute(sql: string, parameters?: Parameter[]) {
99+
// deno-lint-ignore no-explicit-any
99100
const [rsh] = await (nativeClient as any).execute(sql, parameters);
101+
// deno-lint-ignore no-explicit-any
100102
return { affectedRows: (rsh as any).affectedRows, lastInsertId: (rsh as any).insertId };
101103
}
102104
async query(sql: string, parameters?: Parameter[]) {
105+
// deno-lint-ignore no-explicit-any
103106
const [rows] = await (nativeClient as any).query(sql, parameters);
104107
return rows as Row[];
105108
}
@@ -138,10 +141,12 @@ async function connect(config: ClientConfig): Promise<Client> {
138141
return Promise.resolve();
139142
}
140143
execute(sql: string, parameters?: Parameter[]) {
144+
// deno-lint-ignore no-explicit-any
141145
nativeClient.query(sql, parameters as any);
142146
return Promise.resolve({ affectedRows: nativeClient.changes, lastInsertId: nativeClient.lastInsertRowId });
143147
}
144148
query(sql: string, parameters?: Parameter[]) {
149+
// deno-lint-ignore no-explicit-any
145150
return Promise.resolve(nativeClient.queryEntries(sql, parameters as any));
146151
}
147152
}();

src/ddl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export class DDL {
157157
if (schema.indices) sql += "\n" + schema.indices?.map((i) => this.createIndex(dbType, i, 0, table)).join("");
158158

159159
// Full text index
160-
const fullTextColumns = Object.entries(schema.properties).filter(([n, c]) => c.fullText).map(([n, _]) => n);
160+
const fullTextColumns = Object.entries(schema.properties).filter(([_, c]) => c.fullText).map(([n, _]) => n);
161161
if (fullTextColumns.length) sql += this.createFullTextIndex(dbType, fullTextColumns, 0, table);
162162

163163
const fixDanglingComma = (sql: string) => sql.replace(/,\n\)/, "\n);");

src/repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export class Repository<T extends Identifiable> extends EventTarget {
153153

154154
// This is the only method where full text search is permitted (it could be disastrous in DELETE for example)
155155
const properties = this.schema?.properties ?? {};
156-
const fullTextColumns = Object.entries(properties).filter(([n, p]) => p.fullText).map(([n, _]) => n);
156+
const fullTextColumns = Object.entries(properties).filter(([_, p]) => p.fullText).map(([n, _]) => n);
157157
if (DB.type === DB.Provider.SQLITE) fullTextColumns.length = 0;
158158

159159
// Build SQL (if there is a select, clean it to prevent SQL injection)

0 commit comments

Comments
 (0)