Skip to content

chore: re-enable no-unused vars eslint rule and align to ts #3445

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

DavideViolante
Copy link
Contributor

  • enable no-unused-vars eslint rule that was off
  • fix errors about that rule, but ignore unused params in functions (like the already existing TS rule)
  • remove some unused disable eslint lines

@@ -78,11 +78,9 @@ const parse = (query: ParseOpts): Buffer => {
// normalize missing query names to allow for null
const name = query.name || ''
if (name.length > 63) {
/* eslint-disable no-console */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe no-console should be enabled instead?

Copy link
Contributor Author

@DavideViolante DavideViolante Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to enable now and there are 80+ errors in the following files:

/node-postgres/packages/pg-cloudflare/src/index.ts
/node-postgres/packages/pg-native/bench/index.js
/node-postgres/packages/pg-native/bench/leaks.js
/node-postgres/packages/pg-native/test/query-async.js
/node-postgres/packages/pg-pool/test/error-handling.js
/node-postgres/packages/pg-pool/test/idle-timeout-exit.js
/node-postgres/packages/pg-pool/test/lifetime-timeout.js
/node-postgres/packages/pg-pool/test/setup.js
/node-postgres/packages/pg-protocol/src/b.ts
/node-postgres/packages/pg-protocol/src/serializer.ts
/node-postgres/packages/pg-query-stream/test/close.ts
/node-postgres/packages/pg-query-stream/test/error.ts
/node-postgres/packages/pg/bench.js
/node-postgres/packages/pg/lib/native/query.js
/node-postgres/packages/pg/script/create-test-tables.js
/node-postgres/packages/pg/script/dump-db-types.js
/node-postgres/packages/pg/test/integration/client/api-tests.js
/node-postgres/packages/pg/test/integration/client/array-tests.js
/node-postgres/packages/pg/test/integration/client/async-stack-trace-tests.js
/node-postgres/packages/pg/test/integration/client/big-simple-query-tests.js
/node-postgres/packages/pg/test/integration/client/idle_in_transaction_session_timeout-tests.js
/node-postgres/packages/pg/test/integration/client/json-type-parsing-tests.js
/node-postgres/packages/pg/test/integration/client/no-data-tests.js
/node-postgres/packages/pg/test/integration/client/notice-tests.js
/node-postgres/packages/pg/test/integration/client/query-as-promise-tests.js
/node-postgres/packages/pg/test/integration/client/query-error-handling-tests.js
/node-postgres/packages/pg/test/integration/client/type-coercion-tests.js
/node-postgres/packages/pg/test/integration/gh-issues/131-tests.js
/node-postgres/packages/pg/test/suite.js
/node-postgres/packages/pg/test/test-helper.js

Most of them are tests, but some are not, like this file (serializer). I think most of these logs are useful.

@brianc
Copy link
Owner

brianc commented Apr 28, 2025

Thank you for this! ❤️

@brianc brianc merged commit f528433 into brianc:master Apr 28, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants