Skip to content
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

Update TS and eslint packages #241

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

gustavoguichard
Copy link
Contributor

@gustavoguichard gustavoguichard commented Apr 30, 2024

This PR is the first of some PRs that will update packages, especially in the examples folder to have more up to date examples.

Upgrading TS required us to upgrade TS eslint and thus the eslint itself. So I added prettier and playwright to the package of updates.

Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for remix-forms canceled.

Name Link
🔨 Latest commit 7fa5efd
🔍 Latest deploy log https://app.netlify.com/sites/remix-forms/deploys/6634f1fd692f31000821c537

Comment on lines +10 to +11
? ObjectFromSchema<R>
: never
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upgrading prettier required this

@@ -114,7 +114,7 @@ async function getFormValues<Schema extends FormSchema>(
return values
}

async function performMutation<Schema extends FormSchema, D extends unknown>({
async function performMutation<Schema extends FormSchema, D>({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's this eslint rule that was complaining about extends unknown which is useless bc that is the default of any generic

@@ -6,7 +6,7 @@ import type {
KeysOfStrings,
ObjectFromSchema,
} from './prelude'
import { objectFromSchema, mapObject, browser } from './prelude'
import { objectFromSchema, mapObject, browser, parseDate } from './prelude'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another eslint rule to avoid multiple lines of imports from the same file

@@ -64,7 +64,7 @@ class Example {
}

await expect(field.input).toHaveValue(value)
await expect(field.input).toHaveAttribute('type', type)
expect((await field.input.getAttribute('type')) ?? '').toBe(type)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's an update in playwright that makes getAttribute('type') return null instead of '' so I had to add this change to make a bunch of tests pass after upgrading Playwright

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.

1 participant