@commonplaces/oxlint-plugin 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # @commonplaces/oxlint-plugin
2
2
 
3
3
  108 custom Oxlint rules for strict Effect TypeScript, Alchemy and general code
4
- checks. Version 0.7.0 supports **Oxlint 1.87.0, 1.88.0 or 1.89.0** and **Node 22.14 or newer**.
4
+ checks. Version 0.8.0 supports **Oxlint 1.87.0, 1.88.0 or 1.89.0** and **Node 22.14 or newer**.
5
5
  Oxlint's JavaScript plugin API is experimental, so upgrade it only after running
6
6
  the rule tests. The development tools use 1.89.0; consuming projects may use any supported version.
7
7
  All three exact versions are checked with independently installed archives. ESLint is not a supported host.
@@ -12,14 +12,14 @@ Effect setup below after dependency installation.
12
12
 
13
13
  ## Install
14
14
 
15
- Install version 0.7.0 and save its exact version:
15
+ Install version 0.8.0 and save its exact version:
16
16
 
17
17
  ```sh
18
- npm install --save-dev --save-exact @commonplaces/oxlint-plugin@0.7.0 \
18
+ npm install --save-dev --save-exact @commonplaces/oxlint-plugin@0.8.0 \
19
19
  @effect/tsgo@0.55.0 oxlint@1.89.0 oxlint-tsgolint@7.0.2004 typescript@7.0.2
20
20
  ```
21
21
 
22
- Version 0.7.0 supports exactly Oxlint 1.87.0, 1.88.0 or 1.89.0. Older releases
22
+ Version 0.8.0 supports exactly Oxlint 1.87.0, 1.88.0 or 1.89.0. Older releases
23
23
  keep their earlier host lists. Consumer adoption is a separate step.
24
24
 
25
25
  The manifest and lockfile retain the resolved version. Historical GitHub release
@@ -200,6 +200,15 @@ loops, mutation, unchecked access, thrown failures and unapproved runtime calls.
200
200
  The collection convention accepts `Array.reduce(initial, callback)(values)`;
201
201
  its three-argument form `Array.reduce(values, initial, callback)` still fails.
202
202
 
203
+ `strict-effect/no-promise-workflow` also rejects every runtime `import()` expression,
204
+ including imports wrapped in `Effect.tryPromise` and imports in exact
205
+ `allowedFiles` or `promiseOnlyFiles` owners. Those permissions adapt host Promise
206
+ contracts; they do not permit dynamic module loading. Use static imports and
207
+ defer service initialisation through native Effect or Atom lifetimes where needed.
208
+ Static imports, re-exports and TypeScript-only `import("module").Type` references
209
+ remain valid. Framework-generated output stays subject to the consumer's existing
210
+ generated-file exclusions; there is no adapter exception to this prohibition.
211
+
203
212
  ### Supported-host adjustments
204
213
 
205
214
  The imported configurations need two small adjustments; these are separate
@@ -961,6 +961,7 @@ const noPromiseWorkflow = defineRule({
961
961
  messages: {
962
962
  forbidden: "Use Effect for asynchronous work. Only an explicitly named host adapter may mention Promise; async, await and Promise chains remain forbidden there.",
963
963
  bridge: "Use a native Effect or Alchemy operation. Promise conversion belongs only in an explicitly named host or SDK adapter.",
964
+ dynamicImport: "Dynamic imports are forbidden, including in host and SDK adapters. Use a static import; Effect and Atom may defer initialisation, not module loading.",
964
965
  },
965
966
  },
966
967
  create(context) {
@@ -983,6 +984,9 @@ const noPromiseWorkflow = defineRule({
983
984
  FunctionExpression: checkFunction,
984
985
  FunctionDeclaration: checkFunction,
985
986
  AwaitExpression: report,
987
+ ImportExpression(node) {
988
+ context.report({ node, messageId: "dynamicImport" });
989
+ },
986
990
  NewExpression(node) {
987
991
  if (isGlobalPromise(node.callee))
988
992
  report(node);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonplaces/oxlint-plugin",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Shared Oxlint rules for strict Effect TypeScript, Alchemy and repository code.",
5
5
  "license": "MIT",
6
6
  "author": "Cooper Corbett",