Skip to content

Commit

Permalink
docs(eslint-plugin): fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
iErKy committed Oct 3, 2024
1 parent e1be3fb commit 4bd905d
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ signalState should accept a record or dictionary as an input argument.

## Rule Details

This rule ensure that a Signal State shouldn't accept an array type at root level.
This rule ensure that a Signal State shouldn't accept an array type at the root level.

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

```ts
const store = withState({ foo: 'bar' })
```
```ts
const store = withState({ foo: 'bar' });

const store = withState({ arrayAsProperty: ['foo', 'bar'] })

const initialState = {};
const store = signalStore(withState(initialState));
```
Expand All @@ -29,14 +30,11 @@ Examples of **incorrect** code for this rule:

```ts
const store = withState([1, 2, 3]);
```
```ts

const store = withState([{ foo: 'bar' }]);
```
```ts

const store = withState<string[]>([]);
```
```ts

const initialState = [];
const store = withState(initialState);
```

0 comments on commit 4bd905d

Please sign in to comment.