Skip to content

Commit 81c1de9

Browse files
committed
chore: migrate to oxfmt
1 parent 5aa8f70 commit 81c1de9

File tree

86 files changed

+1331
-1303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1331
-1303
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ contact_links:
55
about: Use GitHub discussions for message-board style questions and discussions.
66
- name: Vue.js 2 / test-utils v1
77
url: https://github.com/vuejs/vue-test-utils
8-
about: @vue/test-utils v1 for Vue.js 2 is in a separate repository
8+
about: '@vue/test-utils v1 for Vue.js 2 is in a separate repository'

.github/renovate.json5

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["config:js-lib"],
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: ['config:js-lib'],
44
// only 1 PR at the same time (to avoid cascading rebase)
5-
"prConcurrentLimit": 1,
5+
prConcurrentLimit: 1,
66
// auto-merge if build is OK
7-
"automerge": true,
8-
"packageRules": [
7+
automerge: true,
8+
packageRules: [
99
// group vitest packages update
1010
{
1111
groupName: 'vitest',
@@ -19,12 +19,12 @@
1919
},
2020
// group all minor dependencies, once a week
2121
{
22-
"matchPackagePatterns": ["*"],
23-
"matchUpdateTypes": ["minor", "patch"],
24-
"matchCurrentVersion": ">=1",
25-
"groupName": "all non-major dependencies",
26-
"groupSlug": "all-minor-patch",
27-
"schedule": ["after 1am on Wednesday"]
22+
matchPackagePatterns: ['*'],
23+
matchUpdateTypes: ['minor', 'patch'],
24+
matchCurrentVersion: '>=1',
25+
groupName: 'all non-major dependencies',
26+
groupSlug: 'all-minor-patch',
27+
schedule: ['after 1am on Wednesday']
2828
}
2929
]
3030
}

.github/workflows/ci.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@ name: CI
55

66
on:
77
push:
8-
branches: [ main ]
8+
branches: [main]
99
pull_request:
10-
branches: [ main ]
10+
branches: [main]
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
strategy:
1817
matrix:
1918
node: [20, 22, 24]
2019

2120
steps:
22-
- uses: actions/checkout@v6
23-
- name: Install pnpm
24-
uses: pnpm/[email protected]
25-
- name: Use Node.js ${{ matrix.node }}
26-
uses: actions/setup-node@v6
27-
with:
28-
node-version: ${{ matrix.node }}
29-
cache: 'pnpm'
30-
- run: pnpm install
31-
- run: pnpm run lint
32-
- run: pnpm run test:coverage
33-
env:
34-
CI: true
35-
- run: pnpm run test:build
36-
- run: pnpm run tsd
37-
- run: pnpm run vue-tsc
38-
- run: pnpm run tsc:docs
21+
- uses: actions/checkout@v6
22+
- name: Install pnpm
23+
uses: pnpm/[email protected]
24+
- name: Use Node.js ${{ matrix.node }}
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: ${{ matrix.node }}
28+
cache: 'pnpm'
29+
- run: pnpm install
30+
- run: pnpm run lint
31+
- run: pnpm run format-check
32+
- run: pnpm run test:coverage
33+
env:
34+
CI: true
35+
- run: pnpm run test:build
36+
- run: pnpm run tsd
37+
- run: pnpm run vue-tsc
38+
- run: pnpm run tsc:docs

.oxfmtrc.jsonc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"semi": false,
4+
"singleQuote": true,
5+
"arrowParens": "avoid",
6+
"printWidth": 80,
7+
"trailingComma": "none",
8+
"ignorePatterns": ["dist", "coverage", "node_modules", "docs/**/index.md"]
9+
}

.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/.vitepress/config/en.mts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
1212
['meta', { property: 'og:description', content: META_DESCRIPTION }],
1313
['meta', { property: 'twitter:url', content: META_URL }],
1414
['meta', { property: 'twitter:title', content: META_TITLE }],
15-
['meta', { property: 'twitter:description', content: META_DESCRIPTION }],
15+
['meta', { property: 'twitter:description', content: META_DESCRIPTION }]
1616
],
1717

1818
themeConfig: {
1919
editLink: {
2020
pattern: 'https://github.com/vuejs/test-utils/edit/main/docs/:path',
21-
text: 'Suggest changes to this page',
21+
text: 'Suggest changes to this page'
2222
},
2323

2424
nav: [
@@ -41,7 +41,10 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4141
text: 'Essentials',
4242
items: [
4343
{ text: 'Getting Started', link: '/guide/' },
44-
{ text: 'A Crash Course', link: '/guide/essentials/a-crash-course' },
44+
{
45+
text: 'A Crash Course',
46+
link: '/guide/essentials/a-crash-course'
47+
},
4548
{
4649
text: 'Conditional Rendering',
4750
link: '/guide/essentials/conditional-rendering'
@@ -90,7 +93,10 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
9093
text: 'Stubs and Shallow Mount',
9194
link: '/guide/advanced/stubs-shallow-mount'
9295
},
93-
{ text: 'Testing Server-side Rendering', link: '/guide/advanced/ssr' }
96+
{
97+
text: 'Testing Server-side Rendering',
98+
link: '/guide/advanced/ssr'
99+
}
94100
]
95101
},
96102
{

docs/.vitepress/config/fr.mts

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
22

33
export const META_URL = ''
44
export const META_TITLE = 'Vue Test Utils'
5-
export const META_DESCRIPTION = 'La librairie officielle de tests unitaires pour Vue.js 3'
5+
export const META_DESCRIPTION =
6+
'La librairie officielle de tests unitaires pour Vue.js 3'
67

78
export const frConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
89
description: META_DESCRIPTION,
@@ -12,13 +13,13 @@ export const frConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
1213
['meta', { property: 'og:description', content: META_DESCRIPTION }],
1314
['meta', { property: 'twitter:url', content: META_URL }],
1415
['meta', { property: 'twitter:title', content: META_TITLE }],
15-
['meta', { property: 'twitter:description', content: META_DESCRIPTION }],
16+
['meta', { property: 'twitter:description', content: META_DESCRIPTION }]
1617
],
1718

1819
themeConfig: {
1920
editLink: {
2021
pattern: 'https://github.com/vuejs/test-utils/edit/main/docs/:path',
21-
text: 'Suggest changes to this page',
22+
text: 'Suggest changes to this page'
2223
},
2324

2425
nav: [
@@ -45,7 +46,10 @@ export const frConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4546
text: 'Les Bases',
4647
items: [
4748
{ text: 'Pour commencer', link: '/fr/guide/' },
48-
{ text: 'Cours rapide', link: '/fr/guide/essentials/a-crash-course' },
49+
{
50+
text: 'Cours rapide',
51+
link: '/fr/guide/essentials/a-crash-course'
52+
},
4953
{
5054
text: 'Rendu conditionnel',
5155
link: '/fr/guide/essentials/conditional-rendering'
@@ -54,7 +58,10 @@ export const frConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
5458
text: 'Tester les évènements émis',
5559
link: '/fr/guide/essentials/event-handling'
5660
},
57-
{ text: 'Tester les formulaires', link: '/fr/guide/essentials/forms' },
61+
{
62+
text: 'Tester les formulaires',
63+
link: '/fr/guide/essentials/forms'
64+
},
5865
{
5966
text: 'Passer des données aux Composants',
6067
link: '/fr/guide/essentials/passing-data'
@@ -88,13 +95,19 @@ export const frConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
8895
},
8996
{ text: 'Tester v-model', link: '/fr/guide/advanced/v-model' },
9097
{ text: 'Tester Vuex', link: '/fr/guide/advanced/vuex' },
91-
{ text: 'Tester Vue Router', link: '/fr/guide/advanced/vue-router' },
98+
{
99+
text: 'Tester Vue Router',
100+
link: '/fr/guide/advanced/vue-router'
101+
},
92102
{ text: 'Tester Teleport', link: '/fr/guide/advanced/teleport' },
93103
{
94104
text: 'Composants de Substitution (Stubs) et Montage Partiel',
95105
link: '/fr/guide/advanced/stubs-shallow-mount'
96106
},
97-
{ text: 'Tester le Rendu côté Serveur (SSR)', link: '/fr/guide/advanced/ssr' }
107+
{
108+
text: 'Tester le Rendu côté Serveur (SSR)',
109+
link: '/fr/guide/advanced/ssr'
110+
}
98111
]
99112
},
100113
{

docs/.vitepress/config/shared.mts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,37 @@ export const sharedConfig = defineConfig({
3636
markdown: {
3737
theme: {
3838
dark: 'one-dark-pro',
39-
light: 'github-light',
39+
light: 'github-light'
4040
},
4141

4242
anchor: {
43-
slugify,
44-
},
43+
slugify
44+
}
4545
},
4646

4747
head: [
4848
['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }],
4949

5050
[
5151
'meta',
52-
{ name: 'wwads-cn-verify', content: '7e7757b1e12abcb736ab9a754ffb617a' },
52+
{ name: 'wwads-cn-verify', content: '7e7757b1e12abcb736ab9a754ffb617a' }
5353
],
5454

5555
[
5656
'meta',
5757
{
5858
property: 'og:type',
59-
content: 'website',
60-
},
59+
content: 'website'
60+
}
6161
],
6262

6363
[
6464
'meta',
6565
{
6666
property: 'twitter:card',
67-
content: 'summary_large_image',
68-
},
69-
],
67+
content: 'summary_large_image'
68+
}
69+
]
7070
// [
7171
// 'meta',
7272
// {
@@ -83,22 +83,22 @@ export const sharedConfig = defineConfig({
8383
socialLinks: [
8484
{
8585
icon: 'github',
86-
link: 'https://github.com/vuejs/test-utils/',
86+
link: 'https://github.com/vuejs/test-utils/'
8787
},
8888
{
8989
icon: 'discord',
90-
link: 'https://chat.vuejs.org',
91-
},
90+
link: 'https://chat.vuejs.org'
91+
}
9292
],
9393

9494
footer: {
9595
copyright: 'Copyright © 2014-present Evan You',
96-
message: 'Released under the MIT License.',
96+
message: 'Released under the MIT License.'
9797
},
9898

9999
editLink: {
100100
pattern: 'https://github.com/vuejs/test-utils/edit/main/docs/:path',
101-
text: 'Suggest changes',
101+
text: 'Suggest changes'
102102
},
103103

104104
algolia: {
@@ -108,6 +108,6 @@ export const sharedConfig = defineConfig({
108108
searchParameters: {
109109
facetFilters: ['tags:next']
110110
}
111-
},
112-
},
111+
}
112+
}
113113
})

docs/.vitepress/theme/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
.VPHome {
77
flex-grow: 1;
8-
}
8+
}

docs/.vitepress/theme/index.mts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ const i18nLabels = {
88
zh: '该翻译已同步到了 ${date} 的版本,其对应的 commit hash 是 <code>${hash}</code>。'
99
}
1010

11-
1211
export default {
1312
...Theme,
1413
Layout() {
1514
return h(Theme.Layout, null, {
16-
'doc-before': () => h(TranslationStatus, { status, i18nLabels }),
15+
'doc-before': () => h(TranslationStatus, { status, i18nLabels })
1716
})
18-
},
17+
}
1918
}

0 commit comments

Comments
 (0)