Add a failing test for sort-prop-types#567
Add a failing test for sort-prop-types#567oliviertassinari wants to merge 1 commit intojsx-eslint:masterfrom oliviertassinari:failing-test
Conversation
|
In your example, the propTypes aren't referenced anywhere in the function. Is that reflective of your actual code? |
|
We do not follow variables references, so with this pattern the propTypes order is not checked. |
@yannickcr Will this be fixed in the future? Or should we just not use this pattern? |
@ljharb This is the actual code. I have removed the reference. I wanted to be consistent with the other tests. |
We only have access to the AST and it is tricky to follow variables references, so it is not planned to support them. But you can still open an issue for it, if there is enough demand for this feature we could try to see if it is feasible. If you want to be able to use the prop-types related rules (like |
|
I agree, it's not straightfoward. Sure, I'm gonna open an issue. Thanks. |
E.g, we are using this pattern on the Material-UI repository.