Skip to content

Commit 02ed613

Browse files
committed
Revert "Fix lint warnings"
This reverts commit cdf7e48.
1 parent 986f04f commit 02ed613

File tree

9 files changed

+8
-38
lines changed

9 files changed

+8
-38
lines changed

array_parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class ArrayParser {
7979
consumeDimensions(): void {
8080
if (this.source[0] === "[") {
8181
while (!this.isEof()) {
82-
const char = this.nextCharacter();
82+
let char = this.nextCharacter();
8383
if (char.value === "=") break;
8484
}
8585
}

decode.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,16 @@ function decodeBytea(byteaStr: string): Uint8Array {
139139
}
140140

141141
function decodeByteaHex(byteaStr: string): Uint8Array {
142-
const bytesStr = byteaStr.slice(2);
143-
const bytes = new Uint8Array(bytesStr.length / 2);
142+
let bytesStr = byteaStr.slice(2);
143+
let bytes = new Uint8Array(bytesStr.length / 2);
144144
for (let i = 0, j = 0; i < bytesStr.length; i += 2, j++) {
145145
bytes[j] = parseInt(bytesStr[i] + bytesStr[i + 1], HEX);
146146
}
147147
return bytes;
148148
}
149149

150150
function decodeByteaEscape(byteaStr: string): Uint8Array {
151-
const bytes = [];
151+
let bytes = [];
152152
let i = 0;
153153
let k = 0;
154154
while (i < byteaStr.length) {

encode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function encodeDate(date: Date): string {
4141

4242
function escapeArrayElement(value: unknown): string {
4343
// deno-lint-ignore no-explicit-any
44-
const strValue = (value as any).toString();
44+
let strValue = (value as any).toString();
4545
const escapedValue = strValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
4646

4747
return `"${escapedValue}"`;
@@ -73,7 +73,7 @@ function encodeArray(array: Array<unknown>): string {
7373
}
7474

7575
function encodeBytes(value: Uint8Array): string {
76-
const hex = Array.from(value)
76+
let hex = Array.from(value)
7777
.map((val) => (val < 10 ? `0${val.toString(16)}` : val.toString(16)))
7878
.join("");
7979
return `\\x${hex}`;

oid.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,17 @@ export const Oid = {
1414
xid: 28,
1515
cid: 29,
1616
oidvector: 30,
17-
// deno-lint-ignore camelcase
1817
pg_ddl_command: 32,
19-
// deno-lint-ignore camelcase
2018
pg_type: 71,
21-
// deno-lint-ignore camelcase
2219
pg_attribute: 75,
23-
// deno-lint-ignore camelcase
2420
pg_proc: 81,
25-
// deno-lint-ignore camelcase
2621
pg_class: 83,
2722
json: 114,
2823
xml: 142,
2924
_xml: 143,
30-
// deno-lint-ignore camelcase
3125
pg_node_tree: 194,
32-
// deno-lint-ignore camelcase
3326
json_array: 199,
3427
smgr: 210,
35-
// deno-lint-ignore camelcase
3628
index_am_handler: 325,
3729
point: 600,
3830
lseg: 601,
@@ -99,7 +91,6 @@ export const Oid = {
9991
interval: 1186,
10092
_interval: 1187,
10193
_numeric: 1231,
102-
// deno-lint-ignore camelcase
10394
pg_database: 1248,
10495
_cstring: 1263,
10596
timetz: 1266,
@@ -127,30 +118,21 @@ export const Oid = {
127118
anyarray: 2277,
128119
void: 2278,
129120
trigger: 2279,
130-
// deno-lint-ignore camelcase
131121
language_handler: 2280,
132122
internal: 2281,
133123
opaque: 2282,
134124
anyelement: 2283,
135125
_record: 2287,
136126
anynonarray: 2776,
137-
// deno-lint-ignore camelcase
138127
pg_authid: 2842,
139-
// deno-lint-ignore camelcase
140128
pg_auth_members: 2843,
141-
// deno-lint-ignore camelcase
142129
_txid_snapshot: 2949,
143130
uuid: 2950,
144131
_uuid: 2951,
145-
// deno-lint-ignore camelcase
146132
txid_snapshot: 2970,
147-
// deno-lint-ignore camelcase
148133
fdw_handler: 3115,
149-
// deno-lint-ignore camelcase
150134
pg_lsn: 3220,
151-
// deno-lint-ignore camelcase
152135
_pg_lsn: 3221,
153-
// deno-lint-ignore camelcase
154136
tsm_handler: 3310,
155137
anyenum: 3500,
156138
tsvector: 3614,
@@ -164,10 +146,8 @@ export const Oid = {
164146
regdictionary: 3769,
165147
_regdictionary: 3770,
166148
jsonb: 3802,
167-
// deno-lint-ignore camelcase
168149
jsonb_array: 3807,
169150
anyrange: 3831,
170-
// deno-lint-ignore camelcase
171151
event_trigger: 3838,
172152
int4range: 3904,
173153
_int4range: 3905,
@@ -181,7 +161,6 @@ export const Oid = {
181161
_daterange: 3913,
182162
int8range: 3926,
183163
_int8range: 3927,
184-
// deno-lint-ignore camelcase
185164
pg_shseclabel: 4066,
186165
regnamespace: 4089,
187166
_regnamespace: 4090,

tests/data_types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ testClient(async function bpcharNestedArray() {
269269
});
270270

271271
testClient(async function jsonArray() {
272-
// deno-lint-ignore camelcase
273272
const json_array = await CLIENT.query(
274273
`SELECT ARRAY_AGG(A) FROM (
275274
SELECT JSON_BUILD_OBJECT( 'X', '1' ) AS A
@@ -280,7 +279,6 @@ testClient(async function jsonArray() {
280279

281280
assertEquals(json_array.rows[0][0], [{ X: "1" }, { Y: "2" }]);
282281

283-
// deno-lint-ignore camelcase
284282
const json_array_nested = await CLIENT.query(
285283
`SELECT ARRAY[ARRAY[ARRAY_AGG(A), ARRAY_AGG(A)], ARRAY[ARRAY_AGG(A), ARRAY_AGG(A)]] FROM (
286284
SELECT JSON_BUILD_OBJECT( 'X', '1' ) AS A

tests/encode.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ test("encodeObject", function () {
6363
});
6464

6565
test("encodeUint8Array", function () {
66-
// deno-lint-ignore camelcase
6766
const buf_1 = new Uint8Array([1, 2, 3]);
68-
// deno-lint-ignore camelcase
6967
const buf_2 = new Uint8Array([2, 10, 500]);
7068

7169
assertEquals("\\x010203", encode(buf_1));

tests/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export function getTestClient(
44
client: Client,
55
defSetupQueries?: Array<string>,
66
) {
7-
return function testClient(
7+
return async function testClient(
88
t: Deno.TestDefinition["fn"],
99
setupQueries?: Array<string>,
1010
) {

tests/pool.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Pool } from "../pool.ts";
33
import { delay } from "../utils.ts";
44
import { DEFAULT_SETUP, TEST_CONNECTION_PARAMS } from "./constants.ts";
55

6-
function testPool(
6+
async function testPool(
77
t: (pool: Pool) => void | Promise<void>,
88
setupQueries?: Array<string> | null,
99
lazy?: boolean,
@@ -63,11 +63,9 @@ testPool(
6363
await p;
6464
assertEquals(POOL.available, 1);
6565

66-
// deno-lint-ignore camelcase
6766
const qs_thunks = [...Array(25)].map((_, i) =>
6867
POOL.query("SELECT pg_sleep(0.1) is null, $1::text as id;", i)
6968
);
70-
// deno-lint-ignore camelcase
7169
const qs_promises = Promise.all(qs_thunks);
7270
await delay(1);
7371
assertEquals(POOL.available, 0);
@@ -103,11 +101,9 @@ testPool(async function manyQueries(POOL) {
103101
await p;
104102
assertEquals(POOL.available, 10);
105103

106-
// deno-lint-ignore camelcase
107104
const qs_thunks = [...Array(25)].map((_, i) =>
108105
POOL.query("SELECT pg_sleep(0.1) is null, $1::text as id;", i)
109106
);
110-
// deno-lint-ignore camelcase
111107
const qs_promises = Promise.all(qs_thunks);
112108
await delay(1);
113109
assertEquals(POOL.available, 0);

utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ export interface DsnResult {
7373
export function parseDsn(dsn: string): DsnResult {
7474
//URL object won't parse the URL if it doesn't recognize the protocol
7575
//This line replaces the protocol with http and then leaves it up to URL
76-
// deno-lint-ignore camelcase
7776
const [protocol, stripped_url] = dsn.match(/(?:(?!:\/\/).)+/g) ?? ["", ""];
7877
const url = new URL(`http:${stripped_url}`);
7978

0 commit comments

Comments
 (0)