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
Conversation
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 |
packages/router/src/params.tsx
Outdated
@@ -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>> = ({ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically don't use {}
.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here @Tobbe
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 {}
There was a problem hiding this comment.
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)
LGTM after Tobbe gets back to you about the typescript linting error |
What?
yarn build
in the framework to fail.