Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #327 +/- ##
=======================================
Coverage 96.65% 96.66%
=======================================
Files 200 200
Lines 5923 5935 +12
Branches 1307 1307
=======================================
+ Hits 5725 5737 +12
Misses 198 198 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| const nbhd = Float64Array.from(adj[v]).sort(); | ||
| const nbhd = Float64Array.from(adj[v]); | ||
| nbhd.sort(); |
There was a problem hiding this comment.
@mljs/collaborators I take the opportunity to show you this. The last release of the ESLint config adds a rule about sort(), similar to reverse() that we already have.
Note that the error message tells to use toSorted() and toReversed(), which sometimes is the right thing to do (for example to not modify the input), but there is another option: it is allowed to call .sort() and .reverse() like that as a statement.
There was a problem hiding this comment.
So the error only shows up when the return value of sort or reverse are assigned to something?
There was a problem hiding this comment.
Not exactly. The error shows up when the call is part of an expression. So another case for example is when you pass the return value directly to a function call: myFunction(arr.sort())
There was a problem hiding this comment.
ok that makes a lot of sense
No description provided.