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'm using eslint-config-standard-jsx with jsx-slack.
In this case, JSX renders to static JSON for consumption by the Slack API. It never re-renders. This makes the key property on lists useless in this case (contrary to in React or e.g., Ink).
I've added { rules: { 'react/jsx-key': 'off' } } to my .eslintrc as a workaround but this does not make sense to me. The package's name only references JSX, not React or Ink, and should therefore not assume that the virtual DOM is always going to need reconciliation.
What do you think is the correct solution to this problem?
Remove the rule from this package and move it into the React one.
This does of course mean that users of Ink and other "dynamic" JSX renderers will lose the rule. I'll concede that "static" JSX is a bit of an edge case, so as an alternative, maybe that should be spun off into a separate eslint-config-standard-jsx-static or equivalent.
Are you willing to submit a pull request to implement this change?
Sure!
The text was updated successfully, but these errors were encountered:
What version of this package are you using?
11.0.0
What problem do you want to solve?
I'm using eslint-config-standard-jsx with jsx-slack.
In this case, JSX renders to static JSON for consumption by the Slack API. It never re-renders. This makes the
key
property on lists useless in this case (contrary to in React or e.g., Ink).I've added
{ rules: { 'react/jsx-key': 'off' } }
to my.eslintrc
as a workaround but this does not make sense to me. The package's name only references JSX, not React or Ink, and should therefore not assume that the virtual DOM is always going to need reconciliation.What do you think is the correct solution to this problem?
Remove the rule from this package and move it into the React one.
This does of course mean that users of Ink and other "dynamic" JSX renderers will lose the rule. I'll concede that "static" JSX is a bit of an edge case, so as an alternative, maybe that should be spun off into a separate eslint-config-standard-jsx-static or equivalent.
Are you willing to submit a pull request to implement this change?
Sure!
The text was updated successfully, but these errors were encountered: