Skip to content

Commit a1b3377

Browse files
Revert "chore: format more files with dprint (#777)"
fix #785 This reverts commit f46f85f.
1 parent 0c27663 commit a1b3377

39 files changed

+562
-615
lines changed

.github/workflows/gh-pages.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: jetli/[email protected]
1818
with:
1919
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
20-
version: "latest"
20+
version: 'latest'
2121

2222
- name: Cache Rust Deps
2323
uses: actions/cache@v4
@@ -40,7 +40,7 @@ jobs:
4040
with:
4141
version: 9.15.1
4242
run_install: |
43-
- recursive: true
43+
- recursive: true
4444
4545
- name: Vite Build 🔧
4646
run: pnpm build
@@ -54,13 +54,13 @@ jobs:
5454
needs: build
5555
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
5656
permissions:
57-
pages: write # to deploy to Pages
58-
id-token: write # to verify the deployment originates from an appropriate source
57+
pages: write # to deploy to Pages
58+
id-token: write # to verify the deployment originates from an appropriate source
5959
environment:
6060
name: github-pages
6161
url: ${{ steps.deployment.outputs.page_url }}
6262
runs-on: ubuntu-latest
6363
steps:
6464
- name: Deploy to GitHub Pages 🚀
6565
id: deployment
66-
uses: actions/deploy-pages@v4
66+
uses: actions/deploy-pages@v4

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
repos:
2-
- repo: https://github.com/doublify/pre-commit-rust
2+
- repo: https://github.com/doublify/pre-commit-rust
33
rev: v1.0
44
hooks:
5-
- id: fmt
6-
- id: cargo-check
7-
- id: clippy
5+
- id: fmt
6+
- id: cargo-check
7+
- id: clippy
88
args: ["--all-targets", "--all-features", "--", "-D", "clippy::all"]

dprint.json

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"$schema": "https://dprint.dev/schemas/v0.json",
33
"projectType": "openSource",
44
"incremental": true,
5-
"lineWidth": 100,
6-
"indentWidth": 2,
7-
"useTabs": false,
85
"typescript": {
6+
"useTabs": false,
7+
"indentWidth": 2,
8+
"lineWidth": 100,
99
"semiColons": "asi",
1010
"quoteStyle": "preferSingle",
1111
"nextControlFlowPosition": "sameLine",
@@ -20,16 +20,14 @@
2020
"exportDeclaration.spaceSurroundingNamedExports": true
2121
},
2222
"json": {
23+
"useTabs": false,
24+
"indentWidth": 2,
25+
"lineWidth": 100
2326
},
2427
"markdown": {
28+
"lineWidth": 100,
2529
"textWrap": "maintain"
2630
},
27-
"malva": {
28-
"quotes": "preferSingle",
29-
"attrSelector.quotes": "preferDouble"
30-
},
31-
"yaml": {
32-
},
3331
"includes": [
3432
"**/*.{ts,tsx,js,jsx,vue,json,md,css,scss,sass,less,html,yaml,yml}"
3533
],
@@ -47,9 +45,6 @@
4745
"plugins": [
4846
"https://plugins.dprint.dev/typescript-0.93.0.wasm",
4947
"https://plugins.dprint.dev/json-0.19.3.wasm",
50-
"https://plugins.dprint.dev/markdown-0.17.8.wasm",
51-
"https://plugins.dprint.dev/g-plane/malva-v0.13.1.wasm",
52-
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.23.0.wasm",
53-
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm"
48+
"https://plugins.dprint.dev/markdown-0.17.8.wasm"
5449
]
5550
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
"vitepress": "1.6.3",
3636
"vue-tsc": "3.0.1"
3737
}
38-
}
38+
}

website/.vitepress/theme/custom.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
--vp-c-brand-3: #2f4f6d;
88
--vp-custom-selector-option-text: #213547;
99

10+
1011
--vp-custom-block-tip-text: var(--vp-c-text-1);
1112
--vp-custom-block-tip-bg: var(--vp-c-green-soft);
1213
--vp-custom-block-tip-code-bg: var(--vp-c-green-soft);
1314
}
1415
.dark {
1516
--vp-custom-selector-option-text: #213547;
16-
}
17+
}

website/src/App.vue

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
2-
import { onMounted, onUnmounted, shallowRef } from 'vue'
32
import Intro from './components/Intro.vue'
43
import Toast from './components/utils/Toast.vue'
4+
import { shallowRef, onMounted, onUnmounted } from 'vue'
55
// vitepress SSR does not support Monaco, lazy load on client side
66
let playground = shallowRef<unknown>(null)
77
@@ -31,32 +31,21 @@ onUnmounted(() => {
3131

3232
<template>
3333
<div class="root">
34-
<Intro />
34+
<Intro/>
3535
<Suspense>
36-
<component v-if="playground" :is="playground" />
36+
<component v-if="playground" :is="playground"/>
3737
<div class="loading" v-else>
38-
<svg
39-
class="lightning-icon"
40-
xmlns="http://www.w3.org/2000/svg"
41-
xmlns:xlink="http://www.w3.org/1999/xlink"
42-
width="100"
43-
height="120"
44-
viewBox="0 10 100 120"
45-
>
46-
<g transform="matrix(1,0,0,1,0,22)">
47-
<polygon
48-
xmlns="http://www.w3.org/2000/svg"
49-
points="100,0 25,50 43.75,62.5 0,100 75,62.5 56.25,50"
50-
>
51-
</polygon>
38+
<svg class="lightning-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="120" viewBox="0 10 100 120">
39+
<g transform="matrix(1,0,0,1,0,22)" >
40+
<polygon xmlns="http://www.w3.org/2000/svg" points="100,0 25,50 43.75,62.5 0,100 75,62.5 56.25,50"></polygon>
5241
</g>
5342
</svg>
5443
<h2>
5544
Loading Editor and Parser...
5645
</h2>
5746
</div>
5847
</Suspense>
59-
<Toast />
48+
<Toast/>
6049
</div>
6150
</template>
6251

@@ -139,4 +128,4 @@ h2 {
139128
transform: rotate(-10deg);
140129
animation: linear 4s lightning-flash forwards infinite;
141130
}
142-
</style>
131+
</style>

website/src/BlogIndex.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ function getDateTime(time: number) {
1111
<ul class="blog-list">
1212
<li class="blog-entry" v-for="post of posts">
1313
<article>
14-
<time :datetime="getDateTime(post.date.time)">{{ post.date.string }}</time>
14+
<time :datetime="getDateTime(post.date.time)">{{
15+
post.date.string
16+
}}</time>
1517
<h2 class="title">
1618
<a :href="post.url">{{ post.title }}</a>
1719
</h2>
18-
<i class="description">{{ post.description }}</i>
20+
<i class="description">{{post.description}}</i>
1921
</article>
2022
</li>
2123
</ul>
@@ -51,4 +53,4 @@ function getDateTime(time: number) {
5153
overflow: hidden;
5254
text-overflow: ellipsis;
5355
}
54-
</style>
56+
</style>

website/src/Homepage.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script setup lang="ts">
2-
import { useData } from 'vitepress'
32
import Theme from 'vitepress/theme'
4-
import { nextTick, provide } from 'vue'
5-
import Ecosystem from './homepage/Ecosystem.vue'
63
import Features from './homepage/Features.vue'
74
import Languages from './homepage/Languages.vue'
5+
import Ecosystem from './homepage/Ecosystem.vue'
6+
import { useData } from 'vitepress'
7+
import { nextTick, provide } from 'vue'
88
99
const { isDark } = useData()
1010
@@ -35,4 +35,4 @@ provide('toggle-appearance', async () => {
3535
<Ecosystem />
3636
</template>
3737
</Theme.Layout>
38-
</template>
38+
</template>

website/src/catalog/Option.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ defineProps({
2929
.highlight {
3030
border-color: var(--vp-c-text-3);
3131
}
32-
</style>
32+
</style>

website/src/catalog/RuleFilter.vue

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
<script setup lang="ts">
2-
import { ref, watchEffect } from 'vue'
3-
import { features, type Filter, languages, ruleFilters, ruleTypes } from './data'
2+
import { watchEffect, ref } from 'vue'
43
import Option from './Option.vue'
4+
import {
5+
languages,
6+
ruleFilters,
7+
features,
8+
ruleTypes,
9+
type Filter,
10+
} from './data'
511
612
const model = defineModel<Filter>()
713
@@ -19,28 +25,29 @@ watchEffect(() => {
1925
watchEffect(() => {
2026
filter.value = model.value!
2127
})
28+
2229
</script>
2330
<template>
2431
<form class="filters">
2532
<details open>
2633
<summary>📚 Example Language</summary>
2734
<div class="checkbox-group">
28-
<label v-for="(displayName, lang) in languages" :key="lang">
35+
<label v-for="displayName, lang in languages" :key="lang">
2936
<input type="checkbox" v-model="filter.selectedLanguages" :value="lang">
30-
<Option :text="displayName" class="filter-option" />
37+
<Option :text="displayName" class="filter-option"/>
3138
</label>
3239
</div>
3340
</details>
3441

3542
<details open>
3643
<summary>📏 Used Rule</summary>
3744
<div class="filter-group rule-filter-group">
38-
<div v-for="(rules, type) in ruleFilters">
39-
<em style="text-transform: capitalize">{{ type }}</em>
45+
<div v-for="rules, type in ruleFilters">
46+
<em style="text-transform: capitalize;">{{ type }}</em>
4047
<div class="checkbox-group">
4148
<label v-for="rule in rules" :key="rule">
4249
<input type="checkbox" v-model="filter.selectedRules" :value="rule">
43-
<Option :text="rule" class="filter-option" />
50+
<Option :text="rule" class="filter-option"/>
4451
</label>
4552
</div>
4653
</div>
@@ -49,7 +56,7 @@ watchEffect(() => {
4956
<div class="checkbox-group">
5057
<label v-for="type in ruleTypes" :key="type">
5158
<input type="checkbox" v-model="filter.selectedTypes" :value="type">
52-
<Option :text="type" class="filter-option" />
59+
<Option :text="type" class="filter-option"/>
5360
</label>
5461
</div>
5562
</div>
@@ -64,7 +71,7 @@ watchEffect(() => {
6471
<div class="checkbox-group">
6572
<label v-for="feature in features" :key="feature">
6673
<input type="checkbox" v-model="filter.selectedFeatures" :value="feature">
67-
<Option :text="feature" class="filter-option" />
74+
<Option :text="feature" class="filter-option"/>
6875
</label>
6976
</div>
7077
</div>
@@ -143,11 +150,11 @@ input[type="checkbox"]:checked + code.option:hover {
143150
144151
@keyframes details-show {
145152
from {
146-
opacity: 0;
153+
opacity:0;
147154
transform: translateY(-0.5em);
148155
}
149156
}
150157
details[open] > *:not(summary) {
151158
animation: details-show 0.2s ease-in-out;
152159
}
153-
</style>
160+
</style>

0 commit comments

Comments
 (0)