@foldkit/oxlint-plugin 0.12.1 → 0.13.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.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Requires the acquire Effect of Effect.acquireRelease to construct its
3
+ * resource in place. Flags an acquire that merely returns a pre-existing
4
+ * identifier or uses eager Effect.succeed, which leaks the handle if
5
+ * interruption strikes between construction and acquire.
6
+ */
7
+ export declare const acquireReleaseConstructsInAcquireBody: import("effect-oxlint").CreateRule;
8
+ //# sourceMappingURL=acquire-release-constructs-in-acquire-body.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acquire-release-constructs-in-acquire-body.d.ts","sourceRoot":"","sources":["../../src/rules/acquire-release-constructs-in-acquire-body.ts"],"names":[],"mappings":"AAkEA;;;;;GAKG;AACH,eAAO,MAAM,qCAAqC,oCA+BhD,CAAA"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Flags `event.preventDefault()` inside callbacks passed to Stream operators
3
+ * (`Stream.map`, `Stream.mapEffect`, `Stream.filterMap`,
4
+ * `Stream.filterMapEffect`, `Stream.filter`, `Stream.filterEffect`,
5
+ * `Stream.tap`).
6
+ * Those callbacks do not reliably run inside the browser's event dispatch.
7
+ * For a DOM-event Stream, cancellation belongs inside the native listener,
8
+ * which is where `Subscription.fromEventFilterMapPreventDefault` runs its
9
+ * mapper.
10
+ */
11
+ export declare const noPreventDefaultInStreamOperator: import("effect-oxlint").CreateRule;
12
+ //# sourceMappingURL=no-prevent-default-in-stream-operator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-prevent-default-in-stream-operator.d.ts","sourceRoot":"","sources":["../../src/rules/no-prevent-default-in-stream-operator.ts"],"names":[],"mappings":"AAuJA;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,oCA+C3C,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Forbids Schema.withConstructorDefault on Route.query fields. Constructor
3
+ * defaults run only during Schema construction, while Route.query decodes and
4
+ * encodes, so the annotation has no effect on a missing query parameter.
5
+ */
6
+ export declare const noRouteQueryConstructorDefault: import("effect-oxlint").CreateRule;
7
+ //# sourceMappingURL=no-route-query-constructor-default.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-route-query-constructor-default.d.ts","sourceRoot":"","sources":["../../src/rules/no-route-query-constructor-default.ts"],"names":[],"mappings":"AA0FA;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,oCAuCzC,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Forbids `switch (x._tag)` in favor of the tagged union's match helper or
3
+ * Effect Match, whose exhaustiveness check turns a forgotten Message or state
4
+ * variant into a compile error instead of a silent runtime fall-through.
5
+ */
6
+ export declare const noSwitchOnMessageTag: import("effect-oxlint").CreateRule;
7
+ //# sourceMappingURL=no-switch-on-message-tag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-switch-on-message-tag.d.ts","sourceRoot":"","sources":["../../src/rules/no-switch-on-message-tag.ts"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,oCA2B/B,CAAA"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Forbids lifting a Command's result Message through Command.mapEffect via an
3
+ * Effect.map that returns a Message constructor call. Manual wrapping fuses
4
+ * into the Effect but records nothing on the message-mapping chain that Story
5
+ * and Scene resolve replay. Use Command.mapMessage or Command.mapMessages.
6
+ */
7
+ export declare const preferCommandMapmessage: import("effect-oxlint").CreateRule;
8
+ //# sourceMappingURL=prefer-command-mapmessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefer-command-mapmessage.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-command-mapmessage.ts"],"names":[],"mappings":"AA+QA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,oCAqClC,CAAA"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Flags null, undefined, and optional field encodings inside the Model schema,
3
+ * where absence must be modeled with Schema.Option. The rule is gated to a
4
+ * const Model = Schema.Struct({...}) binding so wire and API schemas that
5
+ * legitimately use null are left alone.
6
+ */
7
+ export declare const preferOptionOverNullableInModel: import("effect-oxlint").CreateRule;
8
+ //# sourceMappingURL=prefer-option-over-nullable-in-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefer-option-over-nullable-in-model.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-option-over-nullable-in-model.ts"],"names":[],"mappings":"AAiIA;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,oCAoD1C,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldkit/oxlint-plugin",
3
- "version": "0.12.1",
3
+ "version": "0.13.0",
4
4
  "description": "Oxlint rules for Foldkit applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,7 +20,7 @@
20
20
  "devDependencies": {
21
21
  "@types/node": "^26.4.0",
22
22
  "@typescript/native": "npm:typescript@^7.0.2",
23
- "effect": "4.0.0-rc.112",
23
+ "effect": "4.0.0-rc.115",
24
24
  "rimraf": "^6.1.3",
25
25
  "rolldown": "^1.2.6",
26
26
  "typescript": "npm:@typescript/typescript6@^6.0.2",
package/recommended.json CHANGED
@@ -6,6 +6,7 @@
6
6
  }
7
7
  ],
8
8
  "rules": {
9
+ "foldkit/acquire-release-constructs-in-acquire-body": "error",
9
10
  "foldkit/command-binding-matches-name": "error",
10
11
  "foldkit/command-define-pascal-const": "error",
11
12
  "foldkit/got-prefix-requires-submodel-payload": "error",
@@ -28,10 +29,15 @@
28
29
  "foldkit/no-module-level-mutable-state": "error",
29
30
  "foldkit/no-nonportable-server-globals": "off",
30
31
  "foldkit/no-noop-message": "error",
32
+ "foldkit/no-prevent-default-in-stream-operator": "error",
31
33
  "foldkit/no-raw-dom-event-attributes": "error",
34
+ "foldkit/no-route-query-constructor-default": "error",
32
35
  "foldkit/no-spread-in-evo": "error",
36
+ "foldkit/no-switch-on-message-tag": "error",
33
37
  "foldkit/prefer-callable-message-constructor": "error",
38
+ "foldkit/prefer-command-mapmessage": "error",
34
39
  "foldkit/prefer-effect-module-names": "error",
40
+ "foldkit/prefer-option-over-nullable-in-model": "error",
35
41
  "foldkit/require-rel-for-external-link": "error",
36
42
  "foldkit/selection-submodel-factory-at-module-scope": "error",
37
43
  "foldkit/wrap-child-output-in-got-message": "error"
@@ -106,9 +112,13 @@
106
112
  "foldkit/no-module-level-mutable-state": "off",
107
113
  "foldkit/no-nonportable-server-globals": "off",
108
114
  "foldkit/no-noop-message": "off",
115
+ "foldkit/no-prevent-default-in-stream-operator": "off",
109
116
  "foldkit/no-raw-dom-event-attributes": "off",
117
+ "foldkit/no-route-query-constructor-default": "off",
110
118
  "foldkit/no-spread-in-evo": "off",
111
119
  "foldkit/prefer-callable-message-constructor": "off",
120
+ "foldkit/prefer-command-mapmessage": "off",
121
+ "foldkit/prefer-option-over-nullable-in-model": "off",
112
122
  "foldkit/require-rel-for-external-link": "off",
113
123
  "foldkit/selection-submodel-factory-at-module-scope": "off",
114
124
  "foldkit/wrap-child-output-in-got-message": "off"