Skip to content

Conversation

defunctzombie
Copy link
Contributor

@defunctzombie defunctzombie commented Nov 25, 2024

Changelog

None

Docs

None

Description

Update examples to use React 18, Eslint v9, and latest versions of @foxglove packages

I deleted the simple-3d-extension. I did not feel that was adding good value to continue having it around. There is nothing special it did with config, setup, etc compared to a typical example panel.

Will also resolve #162


const foxglove = require("@foxglove/eslint-plugin");
const globals = require("globals");
const tseslint = require("typescript-eslint");
Copy link
Member

Choose a reason for hiding this comment

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

typescript-eslint is missing from package.json (I think this applies to all the examples)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤔 I did run npm run lint in each example (installing packages only in that example) and it ran. Maybe something else had it as a transient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://www.npmjs.com/package/@foxglove/eslint-plugin?activeTab=dependencies It is already a dependency of @foxglove/eslint-plugin

Copy link
Member

Choose a reason for hiding this comment

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

Sure but don’t we always ensure that we declare dependencies on things we explicitly import? That is what our dependency lint step does in the app repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤔 Yea I could see that. I guess my dream is the users worry about fewer dependencies.

const tseslint = require("typescript-eslint");

module.exports = tseslint.config({
files: ["src/**/*.ts", "src/**/*.tsx"],
Copy link
Member

Choose a reason for hiding this comment

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

I think putting this files restriction at the top level may mean that this eslint.config.js file itself is not linted (and any other .js files). Would be interesting to confirm that. Maybe not the end of the world but it feels nice to lint all JS & TS files.

@defunctzombie defunctzombie merged commit d88af24 into main Nov 27, 2024
5 checks passed
@defunctzombie defunctzombie deleted the roman/modernize-examples branch November 27, 2024 14:33
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