Skip to content

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

Draft
noshiro-pf wants to merge 2 commits intojsx-eslint:masterfrom
noshiro-pf:patch-1
Draft

fixed the schema of jsx-no-constructed-context-values.js#3766
noshiro-pf wants to merge 2 commits intojsx-eslint:masterfrom
noshiro-pf:patch-1

Conversation

@noshiro-pf
Copy link
Copy Markdown

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;
...
}

},
{
code: 'function Component() { const foo = useMemo(() => { return {} }, []); return (<Context.Provider value={foo}></Context.Provider>)}',
options: [{ allowArrowFunctions: true }],
Copy link
Copy Markdown
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