diff --git a/projects/ngrx.io/content/guide/eslint-plugin/rules/signal-state-no-arrays-at-root-level.md b/projects/ngrx.io/content/guide/eslint-plugin/rules/signal-state-no-arrays-at-root-level.md index 309482c34a..dddda7f787 100644 --- a/projects/ngrx.io/content/guide/eslint-plugin/rules/signal-state-no-arrays-at-root-level.md +++ b/projects/ngrx.io/content/guide/eslint-plugin/rules/signal-state-no-arrays-at-root-level.md @@ -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)); ``` @@ -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([]); -``` -```ts + const initialState = []; const store = withState(initialState); ```