@commonplaces/oxlint-plugin 0.6.1 → 0.6.2
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 +3 -1
- package/dist/alchemy.js +2 -1
- package/dist/conventions/contracts.js +1 -1
- package/dist/service-instrumentation.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -320,7 +320,9 @@ accepted options; no marketplace plugin is needed to read or run them.
|
|
|
320
320
|
The portable Effect checks use the existing `strict-effect/` names, and the
|
|
321
321
|
Alchemy checks use `alchemy-secrets/`. Keep those names when moving from copied
|
|
322
322
|
rule files. Remove the copied implementations and change `jsPlugins` to the
|
|
323
|
-
package subpaths; keep your existing rule settings.
|
|
323
|
+
package subpaths; keep your existing rule settings. The native-source rule
|
|
324
|
+
recognises both `alchemy/Doppler` and the Alchemy beta.84 provider package
|
|
325
|
+
`@alchemy.run/doppler`.
|
|
324
326
|
|
|
325
327
|
## Immutable accumulation
|
|
326
328
|
|
package/dist/alchemy.js
CHANGED
|
@@ -22,7 +22,8 @@ const nativeSources = defineRule({
|
|
|
22
22
|
create(context) {
|
|
23
23
|
return {
|
|
24
24
|
ArrayExpression(node) {
|
|
25
|
-
const doppler = (element) => Option.isSome(providerCall(context, element, "alchemy/Doppler", "Secrets"))
|
|
25
|
+
const doppler = (element) => Option.isSome(providerCall(context, element, "alchemy/Doppler", "Secrets")) ||
|
|
26
|
+
Option.isSome(providerCall(context, element, "@alchemy.run/doppler", "Secrets"));
|
|
26
27
|
if (!Array.some(node.elements, (element) => element !== null && doppler(element)))
|
|
27
28
|
return;
|
|
28
29
|
const valid = node.elements.length === 3 &&
|
|
@@ -65,7 +65,7 @@ export const contractRules = {
|
|
|
65
65
|
"no-host-api-in-contract": rule("Keep service, Schema, error and config contracts portable; acquire host APIs in private adapters.", (context) => ({
|
|
66
66
|
ImportDeclaration(node) {
|
|
67
67
|
if (/(?:^|\/)(?:services?|schemas?|errors|config)\.ts$/u.test(context.filename) &&
|
|
68
|
-
/^(?:node:|bun$|playwright$|lighthouse$|chrome-launcher$|alchemy(?:\/|$)|@cloudflare(?:\/|$)|cloudflare$|@octokit(?:\/|$)|@actions(?:\/|$)|@sentry(?:\/|$)|stripe$|resend$|@aws(?:\/|$)|aws-sdk$)/u.test(node.source.value))
|
|
68
|
+
/^(?:node:|bun$|playwright$|lighthouse$|chrome-launcher$|alchemy(?:\/|$)|@alchemy\.run\/|@cloudflare(?:\/|$)|cloudflare$|@octokit(?:\/|$)|@actions(?:\/|$)|@sentry(?:\/|$)|stripe$|resend$|@aws(?:\/|$)|aws-sdk$)/u.test(node.source.value))
|
|
69
69
|
report(context, node.source);
|
|
70
70
|
},
|
|
71
71
|
})),
|
|
@@ -42,7 +42,7 @@ const serviceOf = (context, node, visited = []) => {
|
|
|
42
42
|
if (Array.some(visited, (previous) => previous === node))
|
|
43
43
|
return Option.none();
|
|
44
44
|
const next = [...visited, node];
|
|
45
|
-
const imported = referenceOf(context, node).pipe(Option.filter((reference) => !/^(?:effect|alchemy)(?:\/|$)/u.test(reference.module)), Option.flatMap((reference) => reference.name), Option.filter((name) => /^[A-Z]/u.test(name)), Option.map((name) => ({ name, declaration: Option.none() })));
|
|
45
|
+
const imported = referenceOf(context, node).pipe(Option.filter((reference) => !/^(?:(?:effect|alchemy)(?:\/|$)|@alchemy\.run\/)/u.test(reference.module)), Option.flatMap((reference) => reference.name), Option.filter((name) => /^[A-Z]/u.test(name)), Option.map((name) => ({ name, declaration: Option.none() })));
|
|
46
46
|
if (Option.isSome(imported))
|
|
47
47
|
return imported;
|
|
48
48
|
if (node.type !== "Identifier")
|