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

Fix router lint issue | Bump and pin @types/react to 17.0.3 #2058

Merged
merged 5 commits into from Mar 23, 2021

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented Mar 22, 2021

What?

  • Fixes the linting issue plaguing any new PRs currently
  • Pins @types/react to 17.0.3. This was causing yarn build in the framework to fail.

@dac09 dac09 requested a review from peterp March 22, 2021 17:00
@dac09
Copy link
Collaborator Author

dac09 commented Mar 22, 2021

What's interesting is - even though we had resolutions set to 17.0.2 at the root of the project, yarn was installing 17.0.3 for auth

@github-actions
Copy link

github-actions bot commented Mar 22, 2021

📦 PR Packages

Click to Show Package Download Links

https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/create-redwood-app-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-api-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-api-server-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-auth-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-cli-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-core-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-dev-server-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-eslint-config-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-eslint-plugin-redwood-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-forms-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-internal-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-prerender-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-router-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-structure-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-testing-0.27.1-3029c92.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2058/redwoodjs-web-0.27.1-3029c92.tgz

Install this PR by running yarn rw upgrade --pr 2058:0.27.1-3029c92

@@ -9,7 +9,9 @@ export interface ParamsContextProps {

export const ParamsContext = createNamedContext<ParamsContextProps>('Params')

export const ParamsProvider: React.FC<{}> = ({ children }) => {
export const ParamsProvider: React.FC<Record<string, unknown>> = ({
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't look right. What was the linting error message?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Basically don't use {}.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm open to changing this completely... I was just trying to get rid of the errors

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here @Tobbe

Screenshot 2021-03-23 at 11 16 00

Copy link
Member

Choose a reason for hiding this comment

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

If I could run the linter locally, this would be much easier... But I think the message is misleading. It thinks I'm using {} as an empty object, when I'm actually using it as an empty interface.

Copy link
Member

Choose a reason for hiding this comment

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

Try without the generics stuff, it should default to {}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done ✅

…int-issue

* 'main' of github.com:redwoodjs/redwood:
  Add David Price to enforcement section.
  Add Prisma 'format' to command array requiring schema (redwoodjs#2061)
  TypeScript support for CLI function-generator (redwoodjs#1854)
  Pick a field other than a foreign key when creating update test, don't generate create test if no fields are found (redwoodjs#2059)
@peterp
Copy link
Contributor

peterp commented Mar 23, 2021

LGTM after Tobbe gets back to you about the typescript linting error

@thedavidprice thedavidprice merged commit b96a37a into redwoodjs:main Mar 23, 2021
@thedavidprice thedavidprice added this to the next release milestone Mar 23, 2021
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.

None yet

4 participants