-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(eslint-plugin): add docs for signal-state-no-arrays-at-root-level #4549
docs(eslint-plugin): add docs for signal-state-no-arrays-at-root-level #4549
Conversation
✅ Deploy Preview for ngrx-io ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @iErKy .
You can ignore the failing build, this is something not related to this PR.
|
||
## Rule Details | ||
|
||
This rule ensure that a Signal State shouldn't accept an array type at root level. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
```ts | ||
const store = withState({ foo: 'bar' }) | ||
``` | ||
```ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting:
```ts | |
```ts |
```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); | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting:
```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); | |
``` | |
```ts | |
const store = withState([1, 2, 3]); |
const store = withState([{ foo: 'bar' }]);
const store = withState<string[]>([]);
const initialState = [];
const store = withState(initialState);
projects/ngrx.io/content/guide/eslint-plugin/rules/signal-state-no-arrays-at-root-level.md
Show resolved
Hide resolved
@timdeschryver will fix comments and push changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @iErKy
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Closes #4501
What is the new behavior?
Does this PR introduce a breaking change?
Other information