Skip to content

Commit

Permalink
docs: Improve formatting of rule examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidnioulz committed Feb 11, 2025
1 parent 4149a13 commit 1fcd94c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/rules/meta-satisfies-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ Additionally, `satisfies` is preferred over type annotations (`const meta: Meta

Examples of **incorrect** code for this rule:

```js
```ts
export default {
title: 'Button',
args: { primary: true },
component: Button,
}
```

```ts
const meta: Meta<typeof Button> = {
title: 'Button',
args: { primary: true },
Expand All @@ -31,13 +33,15 @@ export default meta

Examples of **correct** code for this rule:

```js
```ts
export default {
title: 'Button',
args: { primary: true },
component: Button,
} satisfies Meta<typeof Button>
```

```ts
const meta = {
title: 'Button',
args: { primary: true },
Expand Down

0 comments on commit 1fcd94c

Please sign in to comment.