Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion oxlint.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,8 @@ const base = defineConfig({
radix: 'error',
yoda: 'error',
'e18e/prefer-includes': 'error',
'e18e/prefer-array-to-reversed': 'error',
// The ESLint plugin does not report the existing copy-then-mutate forms.
'e18e/prefer-array-to-reversed': 'off',
'e18e/prefer-array-to-sorted': 'off',
'e18e/prefer-array-to-spliced': 'error',
'e18e/prefer-nullish-coalescing': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function useCustomReleaseSorting({
const isDescending = firstQuery.orderby.startsWith('-');
return {
releaseCondition: releaseQueryString,
releaseOrder: isDescending ? releasesUsed : [...releasesUsed].reverse(),
releaseOrder: isDescending ? releasesUsed : releasesUsed.toReversed(),
};
}, [firstQuery, isCustomReleaseSorting, releases]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function BlockThread({
const block = investigation?.blocks?.find(b => b.id === blockId);
const blockMissing = !!investigation && !block;
const readOnly = investigation?.status === 'archived';
const comments = data ? [...data.json].reverse() : [];
const comments = data ? data.json.toReversed() : [];
const hasOlder = parseLinkHeader(data?.headers.Link ?? null).next?.results === true;

// Open at the newest comment, then follow only your own new comments, so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ const CURRENT_REASONING_RANK = (IN_FLIGHT_RANK.running ?? 0) + 1;
*/
function rankEntries(activity: SeerStatusActivity[]) {
let nextCallRank = CURRENT_REASONING_RANK;
return [...activity]
.reverse()
return activity
.toReversed()
.map(entry => {
const rank = isThought(entry) ? nextCallRank : (IN_FLIGHT_RANK[entry.status] ?? 0);
nextCallRank = rank;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function StackedAreaChartListWidget(props: PerformanceWidgetProps) {
const {organization, InteractiveTitle, fields} = props;
const {setPageDanger} = usePageAlert();

const colors = [...theme.chart.getColorPalette(5)].reverse();
const colors = theme.chart.getColorPalette(5).toReversed();

const listQuery = useMemo<QueryDefinition<DataType, WidgetDataResult>>(
() => ({
Expand Down
Loading