@glissade/eslint-plugin 0.8.0-pre.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @glissade/eslint-plugin
|
|
2
|
+
|
|
3
|
+
ESLint rules enforcing glissade's determinism contract in scene code — the same
|
|
4
|
+
guarantees that make `evaluate(scene, timeline, t)` a pure function of time and
|
|
5
|
+
keep headless export byte-reproducible.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
| Rule | What it forbids |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `gas/no-wall-clock` | `Date.now` / `performance.now` / `new Date()` / `setTimeout` / `setInterval` — clock reads make a draw non-reproducible |
|
|
12
|
+
| `gas/no-unseeded-random` | `Math.random()` — use the seeded `random(seed)` / `Rng` from `@glissade/core` |
|
|
13
|
+
| `gas/no-async-in-evaluate` | `async` / `await` on the `evaluate()` path — evaluation is synchronous (§2.5) |
|
|
14
|
+
|
|
15
|
+
## Usage (flat config)
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
// eslint.config.js
|
|
19
|
+
import glissade from '@glissade/eslint-plugin';
|
|
20
|
+
|
|
21
|
+
export default [...glissade.configs.recommended];
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`configs.recommended` enables all three rules at `error`.
|
|
25
|
+
|
|
26
|
+
## Note for release-age-gating downstreams
|
|
27
|
+
|
|
28
|
+
If your install gates on package release age (e.g. pnpm
|
|
29
|
+
`minimumReleaseAgeExclude`), exempt **`@glissade/eslint-plugin` alongside the
|
|
30
|
+
runtime `@glissade/*` scope** — a fresh plugin publish is otherwise blocked
|
|
31
|
+
(`ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`) even when the runtime packages are
|
|
32
|
+
exempted. The dev-tooling package ships on the same lockstep `0.x` cadence as
|
|
33
|
+
the runtime, so it needs the same exemption.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glissade/eslint-plugin",
|
|
3
|
-
"version": "0.8.0
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "ESLint rules enforcing glissade's determinism contract in scene code: no wall-clock reads, no unseeded Math.random, no async in the evaluate() path.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|