Skip to content

chore: upgrade typescript and eslint#149

Merged
emmclaughlin merged 4 commits into
Faire:mainfrom
anajavi:chore/devdeps
May 11, 2026
Merged

chore: upgrade typescript and eslint#149
emmclaughlin merged 4 commits into
Faire:mainfrom
anajavi:chore/devdeps

Conversation

@anajavi
Copy link
Copy Markdown
Contributor

@anajavi anajavi commented May 8, 2026

Upgrades typescript and typescript-eslint to newer versions.

I had to change a couple of require() calls to imports as newer typescript-eslint started giving errors about rule @typescript-eslint/no-require-imports.

I did not update to typescript 6 as that one requires a bit more thought.

Copy link
Copy Markdown
Collaborator

@emmclaughlin emmclaughlin left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! Just one comment. Is is possible to avoid the two ts-expect-error?

Comment on lines +13 to +14
// @ts-expect-error - no types available for mjml-preset-core
import * as presetCore from "mjml-preset-core";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ts-expect-error will error the day mjml-preset-core ships types, since the expected error won't be there anymore. A small ambient types/mjml-preset-core.d.ts like

declare module "mjml-preset-core" {
  export const components: unknown[];
}

would let you drop both @ts-expect-error lines (this file and the test) and is more durable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can check if declaration file helps. Although I think it is better to error when the types ship, as some code can be deleted then. Deleting code - always better than writing code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done. I added the declaration file.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That's fair, I'm just programmed to not like an override to skip an error. Thanks for the update

Comment thread test/generate-mjml-react/getPropTypeFromMjmlAttributeType.test.ts
import * as fs from "fs";
import camelCase from "lodash.camelcase";
import upperFirst from "lodash.upperfirst";
import * as presetCore from "mjml-preset-core";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Weird, the test passed even though it failed at this step. Will help take a quick look

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@anajavi sorry for the churn, but I think it makes sense to revert back to your original implementation and use @ts-expect-error in both files and delete scripts/types/mjml-preset-core.d.ts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no worries. I reverted the change.

@emmclaughlin
Copy link
Copy Markdown
Collaborator

Looks good! Thanks for upgrading

@anajavi
Copy link
Copy Markdown
Contributor Author

anajavi commented May 11, 2026

Looks good! Thanks for upgrading

Thanks for the fast review. Happy to help.

@emmclaughlin emmclaughlin merged commit fb78d2d into Faire:main May 11, 2026
2 checks passed
@anajavi anajavi deleted the chore/devdeps branch May 20, 2026 08:27
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