eslint-plugin-zustand
v1.0.2
Published
does not let you destructure values from zustand store
Downloads
3,865
Maintainers
Readme
eslint-plugin-zustand
does not let you destructure values from zustand store
Installation
You'll first need to install ESLint:
npm i eslint --save-devNext, install eslint-plugin-zustand:
npm install eslint-plugin-zustand --save-devUsage
Add zustand to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"zustand"
]
}Then configure the rules you want to use under the rules section. The below config checks the hook useGlobalStore for destructuring
{
"rules": {
"zustand/no-destructure": [
"error",
{
"hooks": ["useGlobalStore"]
}
]
}
}Rules
| Name | Description | | :--------------------------------------------- | :----------------------------------------------------- | | no-destructure | does not let you destructure values from zustand store |
