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

fixed the schema of jsx-no-constructed-context-values.js #3766

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

noshiro-pf
Copy link

The schema for jsx-no-constructed-context-values did not seem to satisfy eslint's Rule.RuleMetaData["schema"] type, so I fixed it.

export namespace Rule {
    interface RuleMetaData {
...
        schema?: JSONSchema4 | JSONSchema4[] | undefined;
...
}

@@ -41,7 +41,6 @@ ruleTester.run('react-no-constructed-context-values', rule, {
},
{
code: 'function Component() { const foo = useMemo(() => { return {} }, []); return (<Context.Provider value={foo}></Context.Provider>)}',
options: [{ allowArrowFunctions: true }],
Copy link
Member

Choose a reason for hiding this comment

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

i understand that this is incorrect and should be removed.

however, must it be? I'm asking specifically if the schema change causes this to fail. if that's the case for end users, then the schema change is breaking.

@ljharb ljharb force-pushed the master branch 2 times, most recently from 380e32c to 51d342b Compare July 4, 2024 15:25
@ljharb ljharb marked this pull request as draft July 16, 2024 18:28
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