@foldkit/oxlint-plugin 0.12.0 → 0.12.1-canary.63fa8e97d24a

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,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.0",
3
+ "version": "0.12.1-canary.63fa8e97d24a",
4
4
  "description": "Oxlint rules for Foldkit applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,9 +20,9 @@
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",
24
- "esbuild": "^0.28.2",
23
+ "effect": "4.0.0-rc.115",
25
24
  "rimraf": "^6.1.3",
25
+ "rolldown": "^1.2.6",
26
26
  "typescript": "npm:@typescript/typescript6@^6.0.2",
27
27
  "vitest": "^4.1.11"
28
28
  },
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "scripts": {
54
54
  "clean": "rimraf dist recommended.json all.json *.tsbuildinfo",
55
- "build": "pnpm run clean && esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.js && tsc -b tsconfig.build.json && node scripts/generate-presets.mjs",
55
+ "build": "pnpm run clean && rolldown -c rolldown.config.ts && tsc -b tsconfig.build.json && node scripts/generate-presets.mjs",
56
56
  "test": "vitest run",
57
57
  "typecheck": "tsc --noEmit"
58
58
  }
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",
@@ -29,9 +30,13 @@
29
30
  "foldkit/no-nonportable-server-globals": "off",
30
31
  "foldkit/no-noop-message": "error",
31
32
  "foldkit/no-raw-dom-event-attributes": "error",
33
+ "foldkit/no-route-query-constructor-default": "error",
32
34
  "foldkit/no-spread-in-evo": "error",
35
+ "foldkit/no-switch-on-message-tag": "error",
33
36
  "foldkit/prefer-callable-message-constructor": "error",
37
+ "foldkit/prefer-command-mapmessage": "error",
34
38
  "foldkit/prefer-effect-module-names": "error",
39
+ "foldkit/prefer-option-over-nullable-in-model": "error",
35
40
  "foldkit/require-rel-for-external-link": "error",
36
41
  "foldkit/selection-submodel-factory-at-module-scope": "error",
37
42
  "foldkit/wrap-child-output-in-got-message": "error"
@@ -107,8 +112,11 @@
107
112
  "foldkit/no-nonportable-server-globals": "off",
108
113
  "foldkit/no-noop-message": "off",
109
114
  "foldkit/no-raw-dom-event-attributes": "off",
115
+ "foldkit/no-route-query-constructor-default": "off",
110
116
  "foldkit/no-spread-in-evo": "off",
111
117
  "foldkit/prefer-callable-message-constructor": "off",
118
+ "foldkit/prefer-command-mapmessage": "off",
119
+ "foldkit/prefer-option-over-nullable-in-model": "off",
112
120
  "foldkit/require-rel-for-external-link": "off",
113
121
  "foldkit/selection-submodel-factory-at-module-scope": "off",
114
122
  "foldkit/wrap-child-output-in-got-message": "off"