@commonplaces/oxlint-plugin 0.7.0 → 0.9.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 +22 -11
- package/dist/strict-effect.js +4 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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.
|
|
4
|
+
checks. Version 0.9.0 supports **Oxlint 1.88.0, 1.89.0 or 1.90.0** and **Node 22.14 or newer**.
|
|
5
5
|
Oxlint's JavaScript plugin API is experimental, so upgrade it only after running
|
|
6
|
-
the rule tests. The development tools use 1.
|
|
6
|
+
the rule tests. The development tools use 1.90.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.
|
|
8
8
|
|
|
9
9
|
Version 0.6.0 adds native Effect correctness and immutable accumulation checks.
|
|
@@ -12,15 +12,17 @@ Effect setup below after dependency installation.
|
|
|
12
12
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
15
|
-
Install version 0.
|
|
15
|
+
Install version 0.9.0 and save its exact version:
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
npm install --save-dev --save-exact @commonplaces/oxlint-plugin@0.
|
|
19
|
-
@effect/tsgo@0.
|
|
18
|
+
npm install --save-dev --save-exact @commonplaces/oxlint-plugin@0.9.0 \
|
|
19
|
+
@effect/tsgo@0.63.0 oxlint@1.90.0 oxlint-tsgolint@7.0.2005 typescript@7.0.2
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
Version 0.
|
|
23
|
-
keep their earlier host lists.
|
|
22
|
+
Version 0.9.0 supports exactly Oxlint 1.88.0, 1.89.0 or 1.90.0. Older releases
|
|
23
|
+
keep their earlier host lists. Version 0.9.0 removes 1.87.0 because the native
|
|
24
|
+
Effect checker no longer supports it. Upgrade Oxlint before adopting this release.
|
|
25
|
+
Consumer adoption is a separate step.
|
|
24
26
|
|
|
25
27
|
The manifest and lockfile retain the resolved version. Historical GitHub release
|
|
26
28
|
archives remain separate distribution artefacts; a GitHub release does not publish
|
|
@@ -67,18 +69,18 @@ the subpaths below. For example, a JSON configuration can enable one rule:
|
|
|
67
69
|
## Native Effect correctness
|
|
68
70
|
|
|
69
71
|
Both `effect` and `strict` include every check in the pinned
|
|
70
|
-
`@effect/tsgo` **0.
|
|
72
|
+
`@effect/tsgo` **0.63.0** correctness preset, all at error level. This catches
|
|
71
73
|
forgotten Effect programs, incorrect generator yields, unhandled errors and
|
|
72
74
|
requirements, unchecked Effect type assertions, missing Schema class brands and
|
|
73
75
|
unstable APIs. Type-aware checking is enabled by the group itself; consumers
|
|
74
76
|
do not need to import another preset. Upstream's unrelated style and maintainer
|
|
75
77
|
preferences are not added to the public group.
|
|
76
78
|
|
|
77
|
-
The package ships `@effect/tsgo` **0.
|
|
79
|
+
The package ships `@effect/tsgo` **0.63.0** and `oxlint-tsgolint` **7.0.2005**
|
|
78
80
|
as exact regular dependencies. Full Effect projects should also declare their
|
|
79
81
|
compiler and checker tools directly, as in the install command above. This
|
|
80
82
|
keeps the selected local tools explicit. The pinned checker supports TypeScript
|
|
81
|
-
**7.0.2** or **7.1.0-dev.
|
|
83
|
+
**7.0.2**, **7.1.0-beta** or **7.1.0-dev.20261028.1**, alongside the three Oxlint versions above.
|
|
82
84
|
The archive tests use TypeScript 7.0.2.
|
|
83
85
|
Check the installed checker's supported versions before changing these tools.
|
|
84
86
|
|
|
@@ -200,6 +202,15 @@ loops, mutation, unchecked access, thrown failures and unapproved runtime calls.
|
|
|
200
202
|
The collection convention accepts `Array.reduce(initial, callback)(values)`;
|
|
201
203
|
its three-argument form `Array.reduce(values, initial, callback)` still fails.
|
|
202
204
|
|
|
205
|
+
`strict-effect/no-promise-workflow` also rejects every runtime `import()` expression,
|
|
206
|
+
including imports wrapped in `Effect.tryPromise` and imports in exact
|
|
207
|
+
`allowedFiles` or `promiseOnlyFiles` owners. Those permissions adapt host Promise
|
|
208
|
+
contracts; they do not permit dynamic module loading. Use static imports and
|
|
209
|
+
defer service initialisation through native Effect or Atom lifetimes where needed.
|
|
210
|
+
Static imports, re-exports and TypeScript-only `import("module").Type` references
|
|
211
|
+
remain valid. Framework-generated output stays subject to the consumer's existing
|
|
212
|
+
generated-file exclusions; there is no adapter exception to this prohibition.
|
|
213
|
+
|
|
203
214
|
### Supported-host adjustments
|
|
204
215
|
|
|
205
216
|
The imported configurations need two small adjustments; these are separate
|
|
@@ -241,7 +252,7 @@ Both versions contain `no-unmodified-loop-condition` with
|
|
|
241
252
|
`checkConditionalExpressions: true`; the supported hosts accept that option.
|
|
242
253
|
Ultracite 8 requires Oxlint 1.86 or newer, so 1.80 and 1.85 are no longer
|
|
243
254
|
supported. Its Oxfmt peer requires at least 0.71; repository tooling uses 0.74.0.
|
|
244
|
-
The current archive is checked on exactly 1.
|
|
255
|
+
The current archive is checked on exactly 1.88.0, 1.89.0 and 1.90.0, matching the
|
|
245
256
|
pinned native Effect checker. Published 0.5.0 was qualified on 1.86.0 and 1.89.0.
|
|
246
257
|
|
|
247
258
|
## Project settings
|
package/dist/strict-effect.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Shared Oxlint rules for strict Effect TypeScript, Alchemy and repository code.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Cooper Corbett",
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"prepack": "bun run build"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@effect/tsgo": "0.
|
|
76
|
-
"@oxlint/plugins": "1.
|
|
75
|
+
"@effect/tsgo": "0.63.0",
|
|
76
|
+
"@oxlint/plugins": "1.90.0",
|
|
77
77
|
"effect": "4.0.5",
|
|
78
|
-
"oxlint-tsgolint": "7.0.
|
|
78
|
+
"oxlint-tsgolint": "7.0.2005",
|
|
79
79
|
"ultracite": "8.0.1"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"vitest": "5.0.5"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"oxlint": "1.
|
|
89
|
+
"oxlint": "1.88.0 || 1.89.0 || 1.90.0"
|
|
90
90
|
},
|
|
91
91
|
"engines": {
|
|
92
92
|
"node": ">=22.14.0"
|