eslint-plugin-preact-signals
v0.1.7
Published
TypeScript/ESLint plugin for validating use of @preact/signals
Downloads
449
Maintainers
Readme
eslint-plugin-preact-signals
ESLint plugin for type-aware linting of usage of Preact Signals, including
from @preact/signals-core
, @preact/signals
, and @preact/signals-react
.
Installation
Add the preact-signals
plugin to your ESLint configuration, and then you can
reference the rules in your config.
Rules
preact-signals/no-implicit-boolean-signal
: disallow the implicit coercion of variables that can contain a Signal to a boolean value. This is useful for preventing accidental omissions of.value
or.peek()
.- Options:
allowNullishCoalesce
:false
: disallow implicit coercion via??
nullish
(default): allow implicit coercion via??
when the signal variable may be nullalways
: allow all uses of??
with signals
- Options: