Skip to content

Update some linting and linting related deps #3519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"extends": ["eslint:recommended", "plugin:prettier/recommended", "prettier"],
"ignorePatterns": ["node_modules", "coverage", "packages/pg-protocol/dist/**/*", "packages/pg-query-stream/dist/**/*"],
"parserOptions": {
"ecmaVersion": 2017,
"ecmaVersion": 2022,
"sourceType": "module"
},
"env": {
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
"lint": "eslint --cache 'packages/**/*.{js,ts,tsx}'"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^6.17.0",
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "^8.37.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^10.1.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.1.2",
"lerna": "^3.19.0",
"prettier": "3.0.3",
"typescript": "^4.0.3"
"typescript": "^5.2.0"
},
"prettier": {
"semi": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/pg-connection-string/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function parse(str, options = {}) {
try {
try {
result = new URL(str, 'postgres://base')
} catch (e) {
} catch {
// The URL is invalid so try again with a dummy host
result = new URL(str.replace('@/', '@___DUMMY___/'), 'postgres://base')
dummyHost = true
Expand Down
2 changes: 1 addition & 1 deletion packages/pg-pool/test/error-handling.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('pool error handling', function () {
const pool = new Pool()
try {
await pool.query(null)
} catch (e) {
} catch {
caught = true
}
pool.end()
Expand Down
2 changes: 1 addition & 1 deletion packages/pg-query-stream/test/async-iterator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if (!process.version.startsWith('v8')) {
for await (const row of stream) {
rows.push(row)
}
} catch (e) {
} catch {
// swallow error - node 17 throws if stream is aborted
}
assert.strictEqual(rows.length, 1)
Expand Down
2 changes: 1 addition & 1 deletion packages/pg/lib/crypto/utils-webcrypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function randomBytes(length) {
async function md5(string) {
try {
return nodeCrypto.createHash('md5').update(string, 'utf-8').digest('hex')
} catch (e) {
} catch {
// `createHash()` failed so we are probably not in Node.js, use the WebCrypto API instead.
// Note that the MD5 algorithm on WebCrypto is not available in Node.js.
// This is why we cannot just use WebCrypto in all environments.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ new helper.Suite().test(
let threw = false
try {
yield client.query('SELECT LKDSJDSLKFJ')
} catch (e) {
} catch {
threw = true
}
assert(threw)
Expand Down
2 changes: 1 addition & 1 deletion packages/pg/test/integration/gh-issues/1105-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ suite.testAsync('timeout causing query crashes', async () => {
while (count++ < 5000) {
try {
await client.query('INSERT INTO foobar(name) VALUES ($1)', [Math.random() * 1000 + ''])
} catch (e) {
} catch {
await client.query('ROLLBACK')
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/pg/test/integration/gh-issues/2085-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ suite.testAsync('it should fail with self-signed cert error w/o rejectUnauthoriz
const client = new helper.pg.Client({ ssl })
try {
await client.connect()
} catch (e) {
} catch {
return
}
throw new Error('this test should have thrown an error due to self-signed cert')
Expand Down
Loading
Loading