feat: add prefer-destructuring rule#692
Conversation
|
I'll fix that later! |
|
The fix has been done and tested on my machine but for a weird reason a rate limiting occurred and I can't retry the workflow. Can someone from the oxc team restart a workflow run, please? |
|
@Limerio CI is still failing on the snapshot tests after the retry. Could you take a look at the failure details in the logs? |
Sure! No problem. I'll handle that. |
camc314
left a comment
There was a problem hiding this comment.
The config shape looks incorrect - it should be a tuple:
https://typescript-eslint.io/rules/prefer-destructuring/
I think the tool we use for generating the deserialisation code might struggle to generate it - you might have to come up with some sort of other solution
Okay ! I'll try to fix that |
|
I've made the changes to what you asked for. I'm not sure if you'll be happy about my changes but that's what I think "the best". |
|
The pipeline failed again. I'll try to find a fix later. |
you should just need to do "just build" and then "pnpm run test -u" i'm pretty constrained for time, but i'll look when i can. |
d3f98d4 to
a11e145
Compare
You read in my mind that's what I did :) but thanks! Waiting for the checks. |
a11e145 to
d60e12c
Compare
|
All good! |
Implemented the `prefer-destructuring` rule to encourage the use of destructuring in TypeScript.
- Introduced tuple-based configuration for `prefer_destructuring`, allowing for more flexible option handling. - Updated schema to reflect the new array structure for options. - Enhanced normalization logic to accommodate new tuple formats.
- Adjusted e2e snapshot to reflect changes in diagnostics. - Updated tests for `prefer_destructuring` to utilize new tuple-based options for configuration, improving flexibility in option handling.
d60e12c to
189b35e
Compare
Implemented the
prefer-destructuringrule to encourage the use of destructuring in TypeScript.#192