Skip to content

Commit da0f50f

Browse files
author
Brian Carlson
committed
Update some linting and linting related deps
1 parent 27a2754 commit da0f50f

File tree

10 files changed

+164
-179
lines changed

10 files changed

+164
-179
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"extends": ["eslint:recommended", "plugin:prettier/recommended", "prettier"],
55
"ignorePatterns": ["node_modules", "coverage", "packages/pg-protocol/dist/**/*", "packages/pg-query-stream/dist/**/*"],
66
"parserOptions": {
7-
"ecmaVersion": 2017,
7+
"ecmaVersion": 2022,
88
"sourceType": "module"
99
},
1010
"env": {

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@
2020
"lint": "eslint --cache 'packages/**/*.{js,ts,tsx}'"
2121
},
2222
"devDependencies": {
23-
"@typescript-eslint/eslint-plugin": "^7.0.0",
24-
"@typescript-eslint/parser": "^6.17.0",
23+
"@types/node": "^20.0.0",
24+
"@typescript-eslint/eslint-plugin": "^8.37.0",
25+
"@typescript-eslint/parser": "^8.0.0",
2526
"eslint": "^8.56.0",
2627
"eslint-config-prettier": "^10.1.2",
2728
"eslint-plugin-node": "^11.1.0",
2829
"eslint-plugin-prettier": "^5.1.2",
2930
"lerna": "^3.19.0",
3031
"prettier": "3.0.3",
31-
"typescript": "^4.0.3"
32+
"typescript": "^5.2.0"
3233
},
3334
"prettier": {
3435
"semi": false,

packages/pg-connection-string/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function parse(str, options = {}) {
2727
try {
2828
try {
2929
result = new URL(str, 'postgres://base')
30-
} catch (e) {
30+
} catch {
3131
// The URL is invalid so try again with a dummy host
3232
result = new URL(str.replace('@/', '@___DUMMY___/'), 'postgres://base')
3333
dummyHost = true

packages/pg-pool/test/error-handling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('pool error handling', function () {
4242
const pool = new Pool()
4343
try {
4444
await pool.query(null)
45-
} catch (e) {
45+
} catch {
4646
caught = true
4747
}
4848
pool.end()

packages/pg-query-stream/test/async-iterator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ if (!process.version.startsWith('v8')) {
9696
for await (const row of stream) {
9797
rows.push(row)
9898
}
99-
} catch (e) {
99+
} catch {
100100
// swallow error - node 17 throws if stream is aborted
101101
}
102102
assert.strictEqual(rows.length, 1)

packages/pg/lib/crypto/utils-webcrypto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function randomBytes(length) {
3535
async function md5(string) {
3636
try {
3737
return nodeCrypto.createHash('md5').update(string, 'utf-8').digest('hex')
38-
} catch (e) {
38+
} catch {
3939
// `createHash()` failed so we are probably not in Node.js, use the WebCrypto API instead.
4040
// Note that the MD5 algorithm on WebCrypto is not available in Node.js.
4141
// This is why we cannot just use WebCrypto in all environments.

packages/pg/test/integration/connection-pool/yield-support-tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ new helper.Suite().test(
1414
let threw = false
1515
try {
1616
yield client.query('SELECT LKDSJDSLKFJ')
17-
} catch (e) {
17+
} catch {
1818
threw = true
1919
}
2020
assert(threw)

packages/pg/test/integration/gh-issues/1105-tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ suite.testAsync('timeout causing query crashes', async () => {
1111
while (count++ < 5000) {
1212
try {
1313
await client.query('INSERT INTO foobar(name) VALUES ($1)', [Math.random() * 1000 + ''])
14-
} catch (e) {
14+
} catch {
1515
await client.query('ROLLBACK')
1616
}
1717
}

packages/pg/test/integration/gh-issues/2085-tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ suite.testAsync('it should fail with self-signed cert error w/o rejectUnauthoriz
2828
const client = new helper.pg.Client({ ssl })
2929
try {
3030
await client.connect()
31-
} catch (e) {
31+
} catch {
3232
return
3333
}
3434
throw new Error('this test should have thrown an error due to self-signed cert')

0 commit comments

Comments
 (0)