Skip to content

Commit 9b4f536

Browse files
committed
chore: lint
1 parent 2f26c29 commit 9b4f536

File tree

8 files changed

+57
-49
lines changed

8 files changed

+57
-49
lines changed

.github/workflows/vhs.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ jobs:
2828

2929
- uses: charmbracelet/[email protected]
3030
with:
31-
path: 'docs/tapes/create-activity.tape'
31+
path: docs/tapes/create-activity.tape
3232

3333
- uses: charmbracelet/[email protected]
3434
with:
35-
path: 'docs/tapes/developing-activity.tape'
35+
path: docs/tapes/developing-activity.tape
3636

3737
- uses: stefanzweifel/git-auto-commit-action@v4
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
with:
4141
commit_message: 'docs(tapes): Update GIFs'
42-
file_pattern: 'docs/public/tapes/*.gif'
42+
file_pattern: 'docs/public/tapes/*.gif'

docs/v1/api/metadata-json.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,16 @@ The `category` field defines the category the activity falls under. It must be o
171171

172172
The `settings` field is an array of settings that users can customize. Each setting has the following properties:
173173

174-
| Property | Type | Description |
175-
| --------------- | --------------------- | ----------------------------------------- |
176-
| `id` | String | Identifier of the setting |
177-
| `title` | String | Title of the setting |
178-
| `icon` | String | Icon for the setting (Font Awesome class) |
179-
| `value` | Boolean/String/Number | Default value of the setting |
180-
| `values` | Array | Array of values for dropdown settings |
181-
| `placeholder` | String | Placeholder text for string settings |
182-
| `if` | Object | Conditions for the setting to appear |
183-
| `multiLanguage` | Boolean | Use strings from localization files |
174+
| Property | Type | Description |
175+
| --------------- | --------------------- | ------------------------------------------- |
176+
| `id` | String | Identifier of the setting |
177+
| `title` | String | Title of the setting |
178+
| `icon` | String | Icon for the setting (Font Awesome class) |
179+
| `value` | Boolean/String/Number | Default value of the setting |
180+
| `values` | Array | Array of values for dropdown settings |
181+
| `placeholder` | String | Placeholder text for string settings |
182+
| `if` | Object | Conditions for the setting to appear |
183+
| `multiLanguage` | Boolean | Use strings from localization files |
184184
| `description` | String | Description of the setting (schema v1.0.9+) |
185185

186186
### Boolean Setting Example
@@ -239,6 +239,7 @@ Starting with metadata schema version 1.0.9, every setting supports an optional
239239
Currently, settings only support string descriptions. Multi-language descriptions for settings will be added later.
240240

241241
**String Description Example:**
242+
242243
```json
243244
{
244245
"id": "showButtons",
@@ -250,11 +251,13 @@ Currently, settings only support string descriptions. Multi-language description
250251
```
251252

252253
**Version Compatibility:**
254+
253255
- Metadata schema v1.0.9+: Description property is supported
254256
- Extension v2.8.0+: Description is displayed in the settings UI
255257
- Earlier versions: Description property is ignored
256258

257259
**Best Practices for Descriptions:**
260+
258261
- Keep descriptions concise (under 100 characters recommended)
259262
- Use clear, action-oriented language
260263
- Explain what the setting does, not just what it is
@@ -263,6 +266,7 @@ Currently, settings only support string descriptions. Multi-language description
263266
- Test descriptions with users who are unfamiliar with the feature
264267

265268
**Examples:**
269+
266270
- ✅ Good: "Show elapsed time since the activity started"
267271
- ✅ Good: "Display interactive buttons in Discord Activity"
268272
- ❌ Poor: "Timestamp setting"

docs/v1/api/presence-data.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ Both extend the `BasePresenceData` interface, which contains the common properti
2121
| `type` | `ActivityType` | Type of activity (Playing, Listening, Watching, Competing) |
2222
| `stateDisplayType` | `StatusDisplayType` | Controls which field is displayed in the user's status text in the member list |
2323
| `details` | `string \| Node \| null` | Top row of the status |
24-
| `detailsUrl` | `string \| null` | URL that is linked when clicking on the details text |
24+
| `detailsUrl` | `string \| null` | URL that is linked when clicking on the details text |
2525
| `state` | `string \| Node \| null` | Bottom row of the status |
26-
| `stateUrl` | `string \| null` | URL that is linked when clicking on the state text |
26+
| `stateUrl` | `string \| null` | URL that is linked when clicking on the state text |
2727
| `startTimestamp` | `number \| Date \| null` | Timestamp for the start of the activity (shows time as "elapsed") |
2828
| `endTimestamp` | `number \| Date \| null` | Timestamp until the end of the activity (shows time as "remaining") |
2929
| `largeImageKey` | `string \| Blob \| HTMLImageElement \| null` | Large profile artwork. Preferably a direct URL to an image (e.g., `https://example.com/logo.png`) |
30-
| `largeImageUrl` | `string \| null` | URL that is opened when clicking on the large image |
30+
| `largeImageUrl` | `string \| null` | URL that is opened when clicking on the large image |
3131
| `smallImageKey` | `string \| Blob \| HTMLImageElement \| null` | Small profile artwork. Preferably a direct URL to an image (e.g., `https://example.com/icon.png`) |
32-
| `smallImageUrl` | `string \| null` | URL that is opened when clicking on the small image |
32+
| `smallImageUrl` | `string \| null` | URL that is opened when clicking on the small image |
3333
| `smallImageText` | `string \| Node \| null` | Tooltip for the smallImageKey |
3434
| `buttons` | `[ButtonData, ButtonData?]` | Array of buttons (max 2) |
3535

@@ -71,11 +71,11 @@ The `ActivityType` enum defines the types of activities that can be displayed.
7171

7272
The `StatusDisplayType` enum controls which field is displayed in the user's status text in the member list.
7373

74-
| Value | Description | Example |
75-
| --------- | ---------------------------- | ---------------------- |
76-
| `Name` | Display the activity name | "Playing [name]" |
77-
| `State` | Display the state field | "Listening to [state]" |
78-
| `Details` | Display the details field | "Watching [details]" |
74+
| Value | Description | Example |
75+
| --------- | ------------------------- | ---------------------- |
76+
| `Name` | Display the activity name | "Playing [name]" |
77+
| `State` | Display the state field | "Listening to [state]" |
78+
| `Details` | Display the details field | "Watching [details]" |
7979

8080
## Examples
8181

@@ -99,7 +99,7 @@ const presenceData: PresenceData = {
9999
state: 'Video Title',
100100
largeImageKey: ActivityAssets.Logo,
101101
largeImageText: 'Website Name',
102-
}
102+
};
103103

104104
[presenceData.startTimestamp, presenceData.endTimestamp] = getTimestampsFromMedia(document.querySelector('video'))
105105
```

docs/v1/examples/slideshow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ presence.on('UpdateData', async () => {
100100
details: 'Viewing gallery',
101101
state: `${imageTitle} (${index + 1}/${images.length})`,
102102
largeImageKey: image.src,
103-
smallImageKey: Assets.Search, //Search is in the provided Assets enum
103+
smallImageKey: Assets.Search, // Search is in the provided Assets enum
104104
smallImageText: 'Browsing images'
105105
},
106106
SLIDESHOW_TIMEOUT

docs/v1/guide/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ Here's a complete example of an activity that follows best practices:
504504
### presence.ts
505505

506506
```typescript
507-
import { Assets, getTimestamps, ActivityType } from 'premid'
507+
import { ActivityType, Assets, getTimestamps } from 'premid'
508508

509509
enum ActivityAssets {
510510
Logo = 'https://i.imgur.com/logo.png',

docs/v1/guide/iframes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ iframe.on('UpdateData', async () => {
319319
### presence.ts
320320

321321
```typescript
322-
import { getTimestamps, Assets } from 'premid'
322+
import { Assets, getTimestamps } from 'premid'
323323

324324
const presence = new Presence({
325325
clientId: 'your_client_id'

docs/v1/guide/metadata.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@ The `category` field defines the category the activity falls under. It must be o
169169

170170
The `settings` field is an array of settings that users can customize. Each setting has the following properties:
171171

172-
| Property | Type | Description |
173-
| --------------- | --------------------- | ----------------------------------------- |
174-
| `id` | String | Identifier of the setting |
175-
| `title` | String | Title of the setting |
176-
| `icon` | String | Icon for the setting (Font Awesome class) |
177-
| `value` | Boolean/String/Number | Default value of the setting |
178-
| `values` | Array | Array of values for dropdown settings |
179-
| `placeholder` | String | Placeholder text for string settings |
180-
| `if` | Object | Conditions for the setting to appear |
181-
| `multiLanguage` | Boolean | Use strings from localization files |
172+
| Property | Type | Description |
173+
| --------------- | --------------------- | ------------------------------------------- |
174+
| `id` | String | Identifier of the setting |
175+
| `title` | String | Title of the setting |
176+
| `icon` | String | Icon for the setting (Font Awesome class) |
177+
| `value` | Boolean/String/Number | Default value of the setting |
178+
| `values` | Array | Array of values for dropdown settings |
179+
| `placeholder` | String | Placeholder text for string settings |
180+
| `if` | Object | Conditions for the setting to appear |
181+
| `multiLanguage` | Boolean | Use strings from localization files |
182182
| `description` | String | Description of the setting (schema v1.0.9+) |
183183

184184
#### Boolean Setting Example
@@ -237,6 +237,7 @@ Starting with metadata schema version 1.0.9, every setting supports an optional
237237
Currently, settings only support string descriptions. Multi-language descriptions for settings will be added later.
238238

239239
**String Description Example:**
240+
240241
```json
241242
{
242243
"id": "showButtons",
@@ -248,11 +249,13 @@ Currently, settings only support string descriptions. Multi-language description
248249
```
249250

250251
**Version Compatibility:**
252+
251253
- Metadata schema v1.0.9+: Description property is supported
252254
- Extension v2.8.0+: Description is displayed in the settings UI
253255
- Earlier versions: Description property is ignored
254256

255257
**Best Practices for Descriptions:**
258+
256259
- Keep descriptions concise (under 100 characters recommended)
257260
- Use clear, action-oriented language
258261
- Explain what the setting does, not just what it is
@@ -261,6 +264,7 @@ Currently, settings only support string descriptions. Multi-language description
261264
- Test descriptions with users who are unfamiliar with the feature
262265

263266
**Examples:**
267+
264268
- ✅ Good: "Show elapsed time since the activity started"
265269
- ✅ Good: "Display interactive buttons in Discord Activity"
266270
- ❌ Poor: "Timestamp setting"

docs/v1/guide/presence-class.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ The `PresenceData` object can have the following properties:
5656
| `name` | `string` | The name of the activity |
5757
| `type` | `ActivityType` | The type of activity |
5858
| `stateDisplayType` | `StatusDisplayType` | Controls which field is displayed in the user's status text in the member list |
59-
| `details` | `string` | The first line of the activity |
60-
| `detailsUrl` | `string` | The URL the user will be redirected to when clicking the details text |
61-
| `state` | `string` | The second line of the activity |
62-
| `stateUrl` | `string` | The URL the user will be redirected to when clicking the state text |
63-
| `startTimestamp` | `number` | The time when the activity started (Unix timestamp in milliseconds) |
64-
| `endTimestamp` | `number` | The time when the activity will end (Unix timestamp in milliseconds) |
65-
| `largeImageKey` | `string` | The key of the large image. Preferably a direct URL to an image (e.g., `https://example.com/logo.png`) |
66-
| `largeImageUrl` | `string` | The URL the user will be redirected to when clicking the large image |
67-
| `largeImageText` | `string` | The text that appears when hovering over the large image |
68-
| `smallImageKey` | `string` | The key of the small image. Preferably a direct URL to an image (e.g., `https://example.com/icon.png`) |
69-
| `smallImageUrl` | `string` | The URL the user will be redirected to when clicking the small image |
70-
| `smallImageText` | `string` | The text that appears when hovering over the small image |
71-
| `buttons` | `ButtonData[]` | An array of buttons (max 2) |
59+
| `details` | `string` | The first line of the activity |
60+
| `detailsUrl` | `string` | The URL the user will be redirected to when clicking the details text |
61+
| `state` | `string` | The second line of the activity |
62+
| `stateUrl` | `string` | The URL the user will be redirected to when clicking the state text |
63+
| `startTimestamp` | `number` | The time when the activity started (Unix timestamp in milliseconds) |
64+
| `endTimestamp` | `number` | The time when the activity will end (Unix timestamp in milliseconds) |
65+
| `largeImageKey` | `string` | The key of the large image. Preferably a direct URL to an image (e.g., `https://example.com/logo.png`) |
66+
| `largeImageUrl` | `string` | The URL the user will be redirected to when clicking the large image |
67+
| `largeImageText` | `string` | The text that appears when hovering over the large image |
68+
| `smallImageKey` | `string` | The key of the small image. Preferably a direct URL to an image (e.g., `https://example.com/icon.png`) |
69+
| `smallImageUrl` | `string` | The URL the user will be redirected to when clicking the small image |
70+
| `smallImageText` | `string` | The text that appears when hovering over the small image |
71+
| `buttons` | `ButtonData[]` | An array of buttons (max 2) |
7272

7373
## Activity Types
7474

0 commit comments

Comments
 (0)