Skip to content

Commit 2ebd6a6

Browse files
authored
Fix some development warnings (#462)
* fix warning "`defineProps` is a compiler macro and no longer needs to be imported" * fix warning "warning: <tr> cannot be child of <table>" * fix warnings from `tsconfig.json`
1 parent 425dcc5 commit 2ebd6a6

File tree

6 files changed

+23
-13
lines changed

6 files changed

+23
-13
lines changed

components/blog/Landing.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
</template>
2424

2525
<script lang="ts" setup>
26-
import { defineProps } from 'vue'
2726
2827
import Ray from '../../components/midori/ray.vue'
2928

components/blog/Layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</template>
2929

3030
<script lang="ts" setup>
31-
import { defineProps, onMounted, onUnmounted } from 'vue'
31+
import { onMounted, onUnmounted } from 'vue'
3232
3333
import '../tailwind.css'
3434

components/nearl/card.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
</template>
1010

1111
<script setup lang="ts">
12-
import { defineProps } from 'vue'
1312
1413
const props = defineProps<{
1514
href: string

components/nearl/playground.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</template>
4646

4747
<script setup lang="ts">
48-
import { defineProps, ref, watch } from 'vue'
48+
import { ref, watch } from 'vue'
4949
import type { Elysia } from 'elysia'
5050
5151
const { elysia, mock = {}, alias = {} } = defineProps<{

docs/essential/validation.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ TypeBox provides a basic primitive type with the same behavior as same as TypeSc
560560
The following table lists the most common basic type:
561561

562562
<table class="md-table">
563+
<tbody>
563564
<tr>
564565
<td>TypeBox</td>
565566
<td>TypeScript</td>
@@ -689,7 +690,7 @@ t.Literal(42)
689690

690691
</td>
691692
</tr>
692-
693+
</tbody>
693694
</table>
694695

695696
Elysia extends all types from TypeBox allowing you to reference most of the API from TypeBox to use in Elysia.
@@ -701,6 +702,7 @@ See [TypeBox's Type](https://github.com/sinclairzx81/typebox#json-types) for add
701702
TypeBox can accept an argument for more comprehensive behavior based on JSON Schema 7 specification.
702703

703704
<table class="md-table">
705+
<tbody>
704706
<tr>
705707
<td>TypeBox</td>
706708
<td>TypeScript</td>
@@ -804,7 +806,7 @@ y: 200
804806

805807
</td>
806808
</tr>
807-
809+
</tbody>
808810
</table>
809811

810812
See [JSON Schema 7 specification](https://json-schema.org/draft/2020-12/json-schema-validation) For more explanation for each attribute.
@@ -818,6 +820,7 @@ The following are common patterns that are often found useful when creating a sc
818820
Allow multiple types via union.
819821

820822
<table class="md-table">
823+
<tbody>
821824
<tr>
822825
<td>TypeBox</td>
823826
<td>TypeScript</td>
@@ -852,14 +855,15 @@ Hello
852855

853856
</td>
854857
</tr>
855-
858+
</tbody>
856859
</table>
857860

858861
### Optional
859862

860863
Provided in a property of `t.Object`, allowing the field to be undefined or optional.
861864

862865
<table class="md-table">
866+
<tbody>
863867
<tr>
864868
<td>TypeBox</td>
865869
<td>TypeScript</td>
@@ -898,14 +902,15 @@ t.Object({
898902

899903
</td>
900904
</tr>
901-
905+
</tbody>
902906
</table>
903907

904908
### Partial
905909

906910
Allowing all of the fields in `t.Object` to be optional.
907911

908912
<table class="md-table">
913+
<tbody>
909914
<tr>
910915
<td>TypeBox</td>
911916
<td>TypeScript</td>
@@ -946,14 +951,15 @@ t.Partial(
946951

947952
</td>
948953
</tr>
949-
954+
</tbody>
950955
</table>
951956

952957
## Custom Error
953958

954959
TypeBox offers an additional "**error**" property, allowing us to return a custom error message if the field is invalid.
955960

956961
<table class="md-table">
962+
<tbody>
957963
<tr>
958964
<td>TypeBox</td>
959965
<td>Error</td>
@@ -999,7 +1005,7 @@ Invalid object UwU
9991005

10001006
</td>
10011007
</tr>
1002-
1008+
</tbody>
10031009
</table>
10041010

10051011
## Elysia Type
@@ -1173,6 +1179,7 @@ new Elysia()
11731179
The following is an example of usage of the error property on various types:
11741180

11751181
<table class="md-table">
1182+
<tbody>
11761183
<tr>
11771184
<td>TypeBox</td>
11781185
<td>Error</td>
@@ -1262,7 +1269,7 @@ Expected x to be a number
12621269

12631270
</td>
12641271
</tr>
1265-
1272+
</tbody>
12661273
</table>
12671274

12681275
### Error message as function
@@ -1296,6 +1303,7 @@ Please be cautious that the error function will only be called if the field is i
12961303
Please consider the following table:
12971304

12981305
<table class="md-table">
1306+
<tbody>
12991307
<tr>
13001308
<td>Code</td>
13011309
<td>Body</td>
@@ -1387,7 +1395,7 @@ t.Object(
13871395
Expected value to be an object
13881396
</td>
13891397
</tr>
1390-
1398+
</tbody>
13911399
</table>
13921400

13931401
### onError

tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
"allowJs": true,
1111
"strict": true,
1212
"jsx": "preserve"
13-
}
13+
},
14+
"exclude": [
15+
"postcss.config.js",
16+
"tailwind.config.js"
17+
]
1418
}

0 commit comments

Comments
 (0)