Skip to content

typescript: upgrade eslint to v9 - #1802

Open
jtbandes wants to merge 2 commits into
mainfrom
jacob/upgrade-eslint
Open

typescript: upgrade eslint to v9#1802
jtbandes wants to merge 2 commits into
mainfrom
jacob/upgrade-eslint

Conversation

@jtbandes

@jtbandes jtbandes commented Aug 11, 2026

Copy link
Copy Markdown
Member

Changelog

None

Docs

None

Description

Upgrades ESLint, typescript-eslint, @foxglove/eslint-plugin and remove some unneeded dependencies.

I believe our eslint plugin is not yet ready for v10, but v9 is a significant change (requires rewriting config files) that will make a later v10 upgrade easier.

Comment thread .vscode/settings.json
"files.trimTrailingWhitespace": true,

"typescript.tsdk": "node_modules/typescript/lib",
"js/ts.tsdk.path": "node_modules/typescript/lib",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is js/ts.tsdk.path a real setting? The documented key for pointing VS Code (and Cursor) at the workspace TypeScript is typescript.tsdk, which is what this was. If js/ts.tsdk.path is silently ignored, contributors lose "Use Workspace Version" and their editor falls back to the bundled TS — an easy source of phantom type errors. Was this an intentional rename, or a slip?

Comment thread website/eslint.config.mjs Outdated

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Prior unresolved thread on .vscode/settings.json (js/ts.tsdk.path) still open — see above.

@clalancette clalancette left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I found three minor sites where I think we should actually fix the code rather than adding the suppression. The rest of it looks good to me.

Comment on lines +297 to 299
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
console.log(`- missing ${filePath}`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For what it is worth, this seems like a real bug to me. We don't know that fs.readFile threw because of a missing file; it could equally be permissions, etc. So I'd suggest actually printing the error in console.log, which would allow us to remove the no-unused-vars lint above.

Comment on lines +262 to 263
// eslint-disable-next-line @typescript-eslint/no-deprecated
await bag.readMessages(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similarly, I think here we should consider fixing this to use for await (const result of bag.messageIterator({ topics: ... })) { ... } and getting rid of the lint annotation.

Comment on lines +145 to 146
// eslint-disable-next-line @typescript-eslint/no-deprecated
return reader.readMessage(data).toJSON();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similarly, I think we should change this to use toObject() instead of toJSON(), and then we can remove the no-deprecated lint option above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants