Skip to content

Commit cba079b

Browse files
committed
chore: format docs
1 parent 8512f21 commit cba079b

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
"[svelte]": {
1111
"editor.defaultFormatter": "svelte.svelte-vscode",
1212
"editor.formatOnSave": true
13+
},
14+
"[markdown]": {
15+
"editor.defaultFormatter": "esbenp.prettier-vscode",
16+
"editor.formatOnSave": true
1317
}
1418
}

README.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ For more information about some of the props and a list of `SupportedLanguage`'s
4848

4949
### Deprecated Props
5050

51-
- `forms` renamed to `responseField`
52-
- `formsField` renamed to `responseFieldName`
51+
- `forms` renamed to `responseField`
52+
- `formsField` renamed to `responseFieldName`
5353

5454
## Events
5555

@@ -159,7 +159,7 @@ import { z } from "zod";
159159

160160
export const schema = z.object({
161161
..., // other fields
162-
"cf-turnstile-response": z.string().nonempty('Please complete turnstile')
162+
'cf-turnstile-response': z.string().nonempty('Please complete turnstile')
163163
});
164164
```
165165

@@ -187,9 +187,7 @@ export const schema = z.object({
187187
</script>
188188
189189
<form method="POST" use:enhance>
190-
<Turnstile
191-
siteKey={PUBLIC_TURNSTILE_SITE_KEY}
192-
bind:reset />
190+
<Turnstile siteKey={PUBLIC_TURNSTILE_SITE_KEY} bind:reset />
193191
</form>
194192
```
195193

@@ -212,7 +210,7 @@ export const actions = {
212210

213211
const { success } = await validateToken(
214212
form.data['cf-turnstile-response'],
215-
SECRET_KEY
213+
SECRET_KEY,
216214
);
217215

218216
if (!success) {
@@ -226,7 +224,6 @@ export const actions = {
226224
return message(form, 'Success!');
227225
},
228226
};
229-
230227
```
231228

232229
This example uses the [Superforms onUpdated event](https://superforms.rocks/concepts/events) to reset the Turnstile widget. Additionally, it automatically adds the Turnstile response token to the form data.
@@ -247,16 +244,16 @@ If you need to manually reset the widget, you can do so by binding to the `reset
247244

248245
# Support
249246

250-
- Join the [discord](https://discord.gg/2Vd4wAjJnm)<br>
251-
- Create a issue on the [github](https://github.com/ghostdevv/svelte-turnstile)
247+
- Join the [discord](https://discord.gg/2Vd4wAjJnm)<br>
248+
- Create a issue on the [github](https://github.com/ghostdevv/svelte-turnstile)
252249

253250
# Notable Changes
254251

255252
Full Changelog: https://github.com/ghostdevv/svelte-turnstile/releases
256253

257-
- Deprecate `forms` prop in favour of `responseField`
258-
- Deprecate `formsField` prop in favour of `responseFieldName`
259-
- Deprecate the `on:turnstile-callback` event in favour of `on:callback`
260-
- Deprecate the `on:turnstile-error` event in favour of `on:error`
261-
- Deprecate the `on:turnstile-timeout` event in favour of `on:timeout`
262-
- Deprecate the `on:turnstile-expired` event in favour of `on:expired`
254+
- Deprecate `forms` prop in favour of `responseField`
255+
- Deprecate `formsField` prop in favour of `responseFieldName`
256+
- Deprecate the `on:turnstile-callback` event in favour of `on:callback`
257+
- Deprecate the `on:turnstile-error` event in favour of `on:error`
258+
- Deprecate the `on:turnstile-timeout` event in favour of `on:timeout`
259+
- Deprecate the `on:turnstile-expired` event in favour of `on:expired`

0 commit comments

Comments
 (0)