You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and my issue is unique
My issue appears in the command-line and not only in the text editor
Description Overview
eslint-plugin-react seems to be the go to linting plugin for any jsx/tsx, and indeed supports other frameworks than react by specifying the pragma setting.
However, the jsx-sort-props rule does not allow you to specify non react keywords in the reservedFirst option:
A customized reserved first list must only contain a subset of React reserved props
I'm using Vue which has a convention where their pseudo two-way binding prop v-model is always the first prop passed to a component - I wish to be able to enforce that for my tsx files.
The only acceptable way to manage this would likely be to add a new settings.react config that lets you define, for the whole plugin, what the reserved prop names are, that would default to:
However, for anyone who's not using vue, this seems like it has the potential to cause a lot of bugs and confusion, since some may change it for aesthetic reasons, not realizing it must only match the renderer's reserved props.
Is there an existing issue for this?
Description Overview
eslint-plugin-react
seems to be the go to linting plugin for any jsx/tsx, and indeed supports other frameworks than react by specifying the pragma setting.However, the
jsx-sort-props
rule does not allow you to specify non react keywords in thereservedFirst
option:I'm using Vue which has a convention where their pseudo two-way binding prop
v-model
is always the first prop passed to a component - I wish to be able to enforce that for my tsx files.Expected Behavior
jsx-sort-props
rulereservedFirst
prop should allow non-react keywordseslint-plugin-react version
v7.33.2
eslint version
v8.50.0
node version
v18.12.1
The text was updated successfully, but these errors were encountered: