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
#11276 related to 5 types where this was not the case (fixed in #11279).
The field orders for standard ESTree types are inherited from eslint-visitor-keys, which are outside of TS-ESLint's control.
After #11279 and eslint/js#656, visitor keys for all types are in source code order, as intended, but there are no tests for this. It would be ideal to have tests, to ensure this rule doesn't get broken again unintentionally in future.
Additional Info
I'm not sure how such tests would be implemented. Ideally you'd probably want to codegen them so they automatically cover any new AST nodes added in future, but then you'd need to run those tests on a large corpus of test fixtures to make sure they cover all syntax. But a vast corpus might make those tests extremely slow to run, so maybe it'd be something of a sledgehammer to crack a nut situation.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Before You File a Proposal Please Confirm You Have Done The Following...
Relevant Package
visitor-keys
My proposal is suitable for this project
Description
A comment in
visitor-keys
package states that keys "should be sorted in the order that they appear in the source code".typescript-eslint/packages/visitor-keys/src/visitor-keys.ts
Lines 111 to 132 in 0f5c59c
#11276 related to 5 types where this was not the case (fixed in #11279).
The field orders for standard ESTree types are inherited from
eslint-visitor-keys
, which are outside of TS-ESLint's control.After #11279 and eslint/js#656, visitor keys for all types are in source code order, as intended, but there are no tests for this. It would be ideal to have tests, to ensure this rule doesn't get broken again unintentionally in future.
Additional Info
I'm not sure how such tests would be implemented. Ideally you'd probably want to codegen them so they automatically cover any new AST nodes added in future, but then you'd need to run those tests on a large corpus of test fixtures to make sure they cover all syntax. But a vast corpus might make those tests extremely slow to run, so maybe it'd be something of a sledgehammer to crack a nut situation.
The text was updated successfully, but these errors were encountered: