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
This means any rule that wants to work with JSX needs to track references themselves.
Initially we didn't track JSX references because we weren't sure if JSX would stick around, and if so, whether the semantics would remain the same. At this point, all of the frameworks using JSX treat it the same, so I think it's time to update this behavior.
What do you think is the correct solution?
We could add a new option, jsx (not married to that name) that, when set to true, will add JSX tags as references for imported symbols.
Implementing as an option means it's not a breaking change, and we could choose to turn it on in ESLint whenever we want (first with a flag, then with a major release).
Participation
I am willing to submit a pull request for this change.
Additional comments
No response
The text was updated successfully, but these errors were encountered:
Which packages would you like to change?
espree
eslint-scope
eslint-visitor-keys
What problem do you want to solve?
Currently, eslint-scope does not recognize JSX tag as references to imported bindings, such as:
This means any rule that wants to work with JSX needs to track references themselves.
Initially we didn't track JSX references because we weren't sure if JSX would stick around, and if so, whether the semantics would remain the same. At this point, all of the frameworks using JSX treat it the same, so I think it's time to update this behavior.
What do you think is the correct solution?
We could add a new option,
jsx
(not married to that name) that, when set totrue
, will add JSX tags as references for imported symbols.Implementing as an option means it's not a breaking change, and we could choose to turn it on in ESLint whenever we want (first with a flag, then with a major release).
Participation
Additional comments
No response
The text was updated successfully, but these errors were encountered: