mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-11-21 01:21:54 +08:00
lint: handle more oxlint warnings
This commit is contained in:
parent
ce2c73fb4c
commit
6db55be779
@ -46,12 +46,12 @@ for (const version of selected.value) {
|
||||
|
||||
// TODO All of this is horrible
|
||||
watch(selectedParents, (oldValue, newValue) => {
|
||||
handleRemovedParent([...newValue.filter((x) => !oldValue.includes(x))]);
|
||||
handleAddedParent([...oldValue.filter((x) => !newValue.includes(x))]);
|
||||
handleRemovedParent(newValue.filter((x) => !oldValue.includes(x)));
|
||||
handleAddedParent(oldValue.filter((x) => !newValue.includes(x)));
|
||||
});
|
||||
watch(selectedSub, (oldValue, newValue) => {
|
||||
handleRemovedSub([...newValue.filter((x) => !oldValue.includes(x))]);
|
||||
handleAddedSub([...oldValue.filter((x) => !newValue.includes(x))]);
|
||||
handleRemovedSub(newValue.filter((x) => !oldValue.includes(x)));
|
||||
handleAddedSub(oldValue.filter((x) => !newValue.includes(x)));
|
||||
});
|
||||
|
||||
function handleRemovedParent(removedVersions: string[]) {
|
||||
|
@ -59,7 +59,7 @@ const requestParams = computed(() => {
|
||||
const { actionLogs } = useActionLogs(() => requestParams.value, router);
|
||||
|
||||
function updateSort(col: string, sorter: Record<string, number>) {
|
||||
sort.value = [...Object.keys(sorter)]
|
||||
sort.value = Object.keys(sorter)
|
||||
.map((k) => {
|
||||
const val = sorter[k];
|
||||
if (val === -1) return "-" + k;
|
||||
|
@ -33,7 +33,7 @@ const requestParams = computed(() => {
|
||||
const { users } = useUsers(() => requestParams.value);
|
||||
|
||||
function updateSort(col: string, sorter: Record<string, number>) {
|
||||
sort.value = [...Object.keys(sorter)]
|
||||
sort.value = Object.keys(sorter)
|
||||
.map((k) => {
|
||||
const val = sorter[k];
|
||||
if (val === -1) return "-" + k;
|
||||
|
@ -26,7 +26,7 @@ const requestParams = computed(() => {
|
||||
const { authors } = useAuthors(() => requestParams.value);
|
||||
|
||||
function updateSort(col: string, sorter: Record<string, number>) {
|
||||
sort.value = [...Object.keys(sorter)]
|
||||
sort.value = Object.keys(sorter)
|
||||
.map((k) => {
|
||||
const val = sorter[k];
|
||||
if (val === -1) return "-" + k;
|
||||
|
@ -27,7 +27,7 @@ const requestParams = computed(() => {
|
||||
const { staff } = useStaff(() => requestParams.value);
|
||||
|
||||
function updateSort(col: string, sorter: Record<string, number>) {
|
||||
sort.value = [...Object.keys(sorter)]
|
||||
sort.value = Object.keys(sorter)
|
||||
.map((k) => {
|
||||
const val = sorter[k];
|
||||
if (val === -1) return "-" + k;
|
||||
|
Loading…
Reference in New Issue
Block a user