Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency @antfu/eslint-config to v3 #4095

Merged
merged 3 commits into from
Sep 7, 2024
Merged
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: 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