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
unicorn/consistent-destructuring seems to trigger in multiple scenarios. We would ideally be able to control which specific cases are active.
For example this seems to always be good
functionexample(o){const{ a }=o;console.log(a);// Please do complain that I've already got a const for a 👍 console.log(o.a);}
This scenario in particular I don't like, and would want to turn off:
classExample{example(){const{ a }=this;// rule wants me to write const { a, expensive } = thisif(a){// this.expensive is not being consistently destructured// but i don't want to call the expensive getter unnecessarily in the const aboveconsole.log(this.expensive);}}getexpensive(){// Something that requires significant compute}}
The text was updated successfully, but these errors were encountered:
unicorn/consistent-destructuring seems to trigger in multiple scenarios. We would ideally be able to control which specific cases are active.
For example this seems to always be good
This scenario in particular I don't like, and would want to turn off:
The text was updated successfully, but these errors were encountered: