avoid-leaking-state-in-ember-objects flags computed.sort definition
See original GitHub issueIf you use the sort computed property, it gets flagged as leaking state. Example:
sortedTimeslotBlocks: computed.sort('timeslotBlocks', 'timeslotBlocksSorting'),
timeslotBlocksSorting: ['startsAt:asc'],
I can see why this was flagged, but it seems weird to flag this since the docs use this syntax: https://emberjs.com/api/ember/2.15/namespaces/Ember.computed/methods/sort?anchor=sort
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:7 (2 by maintainers)
Top Results From Across the Web
sort - 4.9 - Ember API Documentation
A computed property which returns a new array with all the properties from the first dependent array sorted based on a property or...
Read more >Flags no longer sort by definition order · Issue #1420 · urfave/cli
Flags used to be shown in help text output in the same order in which they are defined in code, but they now...
Read more >Sort Your Data 유닛 - Trailhead - Salesforce
A computed sort organizes the data in the view by applying rules, such as sorting alphabetically or sorting quantities in descending order. Computed...
Read more >How is Sorting achieved in an Ember model without using ...
In Ember 2.0 SortableMixin is deprecated and is on its way out too. In the Controller (not the ArrayController ) you may define...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, however
classNames
,classNameBindings
, andattributeBindings
are very common and as such they are whitelisted in this rule (see here).There are a lot of different ways to solve it with different syntax. Is there merit to one over the other? For example, is
Object.freeze
recommended over using constants or init?