Skip to content

chore(deps): update typescript-eslint (6.11.0 -> 6.18.1) #7545

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 2 commits into from
Jan 21, 2024

Conversation

gluxon
Copy link
Member

@gluxon gluxon commented Jan 21, 2024

Updating @typescript-eslint/* dependencies and fixing a new @typescript-eslint/no-floating-promises error.

typescript-eslint/typescript-eslint#8261

```
TypeError: Cannot read properties of undefined (reading 'some')
Occurred while linting /home/runner/work/pnpm/pnpm/cli/default-reporter/src/reporterForClient/pkgsDiff.ts:70
Rule: "@typescript-eslint/prefer-nullish-coalescing"
    at LogicalExpression[operator = "||"] (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/@typescript-eslint+eslint-plugin@6.19.0_@typescript-eslint+parser@6.19.0_eslint@8.56.0_typescript@5.3.3/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js:267:32)
    at ruleErrorHandler (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/linter.js:1076:28)
    at /home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
    at CodePathAnalyzer.enterNode (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:803:23)
    at /home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/linter.js:1111:32
```
```
packages/calc-dep-state/src/index.ts
  70:5  error  An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the `void` operator  @typescript-eslint/no-floating-promises
```
@gluxon
Copy link
Member Author

gluxon commented Jan 21, 2024

Upgrading to 6.18.1 due to a bug in the latest version of @typescript-eslint/eslint-plugin (6.19.0). typescript-eslint/typescript-eslint#8261

TypeError: Cannot read properties of undefined (reading 'some')
Occurred while linting /home/runner/work/pnpm/pnpm/cli/default-reporter/src/reporterForClient/pkgsDiff.ts:70
Rule: "@typescript-eslint/prefer-nullish-coalescing"
    at LogicalExpression[operator = "||"] (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/https://github.com/typescript-eslint+eslint-plugin@6.19.0_@typescript-eslint+parser@6.19.0_eslint@8.56.0_typescript@5.3.3/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js:267:32)
    at ruleErrorHandler (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/linter.js:1076:28)
    at /home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
    at CodePathAnalyzer.enterNode (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:803:23)
    at /home/runner/work/pnpm/pnpm/node_modules/.pnpm/eslint@8.56.0/node_modules/eslint/lib/linter/linter.js:1111:32

@@ -67,7 +67,7 @@ function calcDepStateObj (
export function lockfileToDepGraph (lockfile: Lockfile): DepsGraph {
const graph: DepsGraph = {}
if (lockfile.packages != null) {
Object.entries(lockfile.packages).map(async ([depPath, pkgSnapshot]) => {
for (const [depPath, pkgSnapshot] of Object.entries(lockfile.packages)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Here's the error:

packages/calc-dep-state/src/index.ts
  70:5  error  An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the `void` operator  @typescript-eslint/no-floating-promises

The async here was likely accidental.

@zkochan
Copy link
Member

zkochan commented Jan 21, 2024

Looks good

@gluxon gluxon marked this pull request as ready for review January 21, 2024 19:25
@gluxon gluxon requested a review from zkochan as a code owner January 21, 2024 19:25
@gluxon
Copy link
Member Author

gluxon commented Jan 21, 2024

Thanks!

@zkochan zkochan merged commit 5a9188e into pnpm:main Jan 21, 2024
@gluxon gluxon deleted the upgrade-typescript-eslint-6.18.1 branch February 19, 2024 19:12
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.

2 participants