Skip to content

Commit

Permalink
chore(deps): update dependency @antfu/eslint-config to v3 (#4095)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <[email protected]>
  • Loading branch information
renovate[bot] and qwerty287 authored Sep 7, 2024
1 parent 6e8b855 commit d6446ba
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 256 deletions.
2 changes: 2 additions & 0 deletions web/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export default antfu(
rules: {
'import/order': 'off',
'sort-imports': 'off',
'perfectionist/sort-imports': 'off',
'perfectionist/sort-named-imports': 'off',
'promise/prefer-await-to-callbacks': 'error',

// Vue I18n
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"vue-router": "^4.3.2"
},
"devDependencies": {
"@antfu/eslint-config": "^2.20.0",
"@antfu/eslint-config": "^3.0.0",
"@eslint/js": "^9.4.0",
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
"@intlify/eslint-plugin-vue-i18n": "3.0.0",
Expand Down
406 changes: 176 additions & 230 deletions web/pnpm-lock.yaml

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions web/src/compositions/useDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,24 @@ dayjs.extend(advancedFormat);
dayjs.extend(relativeTime);
dayjs.extend(duration);

export function useDate() {
function toLocaleString(date: Date) {
return dayjs(date).format(useI18n().t('time.template'));
}
function toLocaleString(date: Date) {
return dayjs(date).format(useI18n().t('time.template'));
}

function timeAgo(date: Date | string | number) {
return dayjs().to(dayjs(date));
}
function timeAgo(date: Date | string | number) {
return dayjs().to(dayjs(date));
}

function prettyDuration(durationMs: number) {
return dayjs.duration(durationMs).humanize();
}
function prettyDuration(durationMs: number) {
return dayjs.duration(durationMs).humanize();
}

function durationAsNumber(durationMs: number): string {
const dur = dayjs.duration(durationMs);
return dur.format(dur.hours() > 1 ? 'HH:mm:ss' : 'mm:ss');
}

export function useDate() {
const addedLocales = ['en'];

async function setDayjsLocale(locale: string) {
Expand All @@ -36,11 +41,6 @@ export function useDate() {
}
}

function durationAsNumber(durationMs: number): string {
const dur = dayjs.duration(durationMs);
return dur.format(dur.hours() > 1 ? 'HH:mm:ss' : 'mm:ss');
}

return {
toLocaleString,
timeAgo,
Expand Down
16 changes: 8 additions & 8 deletions web/src/compositions/usePipelineFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ import useAuthentication from './useAuthentication';

const userConfig = useUserConfig();

function toggle() {
userConfig.setUserConfig('isPipelineFeedOpen', !userConfig.userConfig.value.isPipelineFeedOpen);
}

function close() {
userConfig.setUserConfig('isPipelineFeedOpen', false);
}

export default () => {
const pipelineStore = usePipelineStore();
const { isAuthenticated } = useAuthentication();

const isOpen = computed(() => userConfig.userConfig.value.isPipelineFeedOpen && !!isAuthenticated);

function toggle() {
userConfig.setUserConfig('isPipelineFeedOpen', !userConfig.userConfig.value.isPipelineFeedOpen);
}

function close() {
userConfig.setUserConfig('isPipelineFeedOpen', false);
}

const sortedPipelines = toRef(pipelineStore, 'pipelineFeed');
const activePipelines = toRef(pipelineStore, 'activePipelines');

Expand Down
2 changes: 1 addition & 1 deletion web/src/views/repo/RepoWrapper.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<Scaffold
v-if="repo && repoPermissions && route.meta.repoHeader"
v-model:activeTab="activeTab"
v-model:active-tab="activeTab"
enable-tabs
disable-tab-url-hash-mode
>
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/repo/pipeline/PipelineWrapper.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<Scaffold
v-if="pipeline && repo"
v-model:activeTab="activeTab"
v-model:active-tab="activeTab"
enable-tabs
disable-tab-url-hash-mode
:go-back="goBack"
Expand Down

0 comments on commit d6446ba

Please sign in to comment.