Releases: hamk-uas/eslint-plugin-jax-js
v0.1.3
Bug fix
-
no-use-after-consume: Allow
.refCountaccess after.dispose()for leak checking (#11).Reading
.refCountafter an array has been consumed/disposed is the standard pattern for verifying reference counts dropped to 0 in tests. This is no longer flagged as a use-after-consume error.Other property accesses (
.shape,.dtype, etc.) after dispose are still reported.
v0.1.2 — if/else-if/else branch exclusivity fix
Bug fix for no-use-after-consume: the rule no longer reports false positives when a variable is consumed in one branch of an if/else if/else chain and used in a different, mutually exclusive branch. Also includes the no-unnecessary-ref member-chain fixed-point fix from v0.1.1 (now properly tagged).
v0.1.1 — no-unnecessary-ref member-chain fixed-point update
This patch release fixes @jax-js/no-unnecessary-ref so static member-chain patterns (for example, fwd.x_pred.ref) are analyzed per target path and all unnecessary .ref usages are reported in one pass. It also includes a regression test covering the reported object-member-chain scenario.
v0.1.0 — Initial release
First release of @hamk-uas/eslint-plugin-jax-js — three ESLint rules for catching jax-js array memory leaks at edit time.
Rules:
@jax-js/no-unnecessary-ref— flags.refthat creates a guaranteed leak (autofix)@jax-js/no-use-after-consume— flags use of an array after it's been consumed (suggestion: insert.ref)@jax-js/require-consume— flags arrays that are never consumed or disposed (suggestion: add.dispose())
Install:
npm install --save-dev github:hamk-uas/eslint-plugin-jax-js#v0.1.0Requires ESLint v9+. See README for setup and configuration.