@milkenjoyer/toolchain 0.6.5 → 0.7.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 +0 -8
- package/dist/{effect-plugin-DARbVmA3.mjs → effect-plugin-ByuWwyB8.mjs} +13 -1
- package/dist/effect-plugin.mjs +1 -1
- package/dist/effect-tsgo.d.mts +1 -7
- package/dist/effect-tsgo.mjs +15 -8
- package/dist/exceptions.mjs +1 -14
- package/dist/guard.d.mts +0 -6
- package/dist/guard.mjs +19 -9
- package/dist/lint.d.mts +17 -3
- package/dist/lint.mjs +32 -49
- package/dist/plugin-C3DDlAbr.mjs +268 -0
- package/dist/plugin.d.mts +0 -11
- package/dist/plugin.mjs +1 -1
- package/dist/rules.d.mts +87 -227
- package/dist/rules.mjs +93 -215
- package/dist/versions.mjs +0 -6
- package/package.json +1 -10
- package/renovate.json +0 -1
- package/dist/array-method-C_XYdjLZ.mjs +0 -178
- package/dist/foldkit.d.mts +0 -3
- package/dist/foldkit.mjs +0 -17
- package/dist/plugin-CBUJ7Tgd.mjs +0 -927
- package/dist/rikalabs-hPKWFZ1P.mjs +0 -362
- package/dist/rikalabs.d.mts +0 -80
- package/dist/rikalabs.mjs +0 -1
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
import { c as memberPropertyName, r as unwrapExpression } from "./array-method-C_XYdjLZ.mjs";
|
|
2
|
-
import * as Arr from "effect/Array";
|
|
3
|
-
import * as Option from "effect/Option";
|
|
4
|
-
import * as R from "effect/Record";
|
|
5
|
-
import * as Schema from "effect/Schema";
|
|
6
|
-
import { Diagnostic, Rule, RuleContext } from "effect-oxlint";
|
|
7
|
-
import * as Effect from "effect/Effect";
|
|
8
|
-
import upstream from "@rikalabs/oxlint-standards/plugin";
|
|
9
|
-
// src/shared/binding-path.ts
|
|
10
|
-
const identifierReference = ({ sourceCode, identifier }) => {
|
|
11
|
-
if (identifier.type !== "Identifier") return Option.none();
|
|
12
|
-
const findReference = (scope) => Option.flatMap(scope, (current) => Option.orElse(Arr.findFirst(current.references, (reference) => reference.identifier.start === identifier.start), () => findReference(Option.fromNullishOr(current.upper))));
|
|
13
|
-
return findReference(Option.fromNullishOr(sourceCode.getScope(identifier)));
|
|
14
|
-
};
|
|
15
|
-
const immutableInitializer = (variable) => Arr.some(variable.references, (reference) => reference.isWrite() && !reference.init) ? Option.none() : Arr.findFirst(variable.defs, (definition) => {
|
|
16
|
-
const { node } = definition;
|
|
17
|
-
return definition.type === "Variable" && node.type === "VariableDeclarator" && node.id.type === "Identifier" && node.parent.type === "VariableDeclaration" && node.parent.kind === "const" ? Option.fromNullishOr(node.init) : Option.none();
|
|
18
|
-
});
|
|
19
|
-
const importPath = (definition) => {
|
|
20
|
-
const { parent: declaration, node: specifier } = definition;
|
|
21
|
-
if (definition.type !== "ImportBinding" || declaration?.type !== "ImportDeclaration" || declaration.importKind === "type") return Option.none();
|
|
22
|
-
if (specifier.type === "ImportNamespaceSpecifier") return Option.some({
|
|
23
|
-
kind: "import",
|
|
24
|
-
source: declaration.source.value,
|
|
25
|
-
members: []
|
|
26
|
-
});
|
|
27
|
-
if (specifier.type !== "ImportSpecifier" || specifier.importKind === "type") return Option.none();
|
|
28
|
-
return Option.some({
|
|
29
|
-
kind: "import",
|
|
30
|
-
source: declaration.source.value,
|
|
31
|
-
members: [specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value]
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
const bindingPath = ({ sourceCode, node, visited = [] }) => {
|
|
35
|
-
const current = unwrapExpression(node);
|
|
36
|
-
if (current.type === "MemberExpression") return Option.gen(function* () {
|
|
37
|
-
const path = yield* bindingPath({
|
|
38
|
-
sourceCode,
|
|
39
|
-
node: current.object,
|
|
40
|
-
visited
|
|
41
|
-
});
|
|
42
|
-
const name = yield* memberPropertyName(current);
|
|
43
|
-
return {
|
|
44
|
-
...path,
|
|
45
|
-
members: [...path.members, name]
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
if (current.type !== "Identifier") return Option.none();
|
|
49
|
-
const matched = identifierReference({
|
|
50
|
-
sourceCode,
|
|
51
|
-
identifier: current
|
|
52
|
-
});
|
|
53
|
-
if (Option.isNone(matched)) return Option.none();
|
|
54
|
-
const variable = matched.value.resolved;
|
|
55
|
-
if (variable === null || Arr.isReadonlyArrayEmpty(variable.defs)) return Option.some({
|
|
56
|
-
kind: "global",
|
|
57
|
-
members: [current.name]
|
|
58
|
-
});
|
|
59
|
-
if (Arr.some(visited, (seen) => seen === variable) || Arr.some(variable.references, (reference) => reference.isWrite() && !reference.init)) return Option.none();
|
|
60
|
-
return Option.orElse(Arr.findFirst(variable.defs, importPath), () => Option.flatMap(immutableInitializer(variable), (initial) => bindingPath({
|
|
61
|
-
sourceCode,
|
|
62
|
-
node: initial,
|
|
63
|
-
visited: [...visited, variable]
|
|
64
|
-
})));
|
|
65
|
-
};
|
|
66
|
-
// src/rules/effect-no-provide-in-domain.ts
|
|
67
|
-
const isRunMain = (sourceCode, node) => node.type === "CallExpression" && Option.exists(bindingPath({
|
|
68
|
-
sourceCode,
|
|
69
|
-
node: node.callee
|
|
70
|
-
}), (path) => path.kind === "import" && (path.source === "@effect/platform-bun" && Arr.join(path.members, ".") === "BunRuntime.runMain" || path.source === "@effect/platform-node" && Arr.join(path.members, ".") === "NodeRuntime.runMain" || (path.source === "@effect/platform-bun/BunRuntime" || path.source === "@effect/platform-node/NodeRuntime") && Arr.join(path.members, ".") === "runMain"));
|
|
71
|
-
const isRuntimeArgument = (sourceCode, node) => {
|
|
72
|
-
const { parent } = node;
|
|
73
|
-
return parent?.type === "CallExpression" && parent.arguments[0] === node && isRunMain(sourceCode, parent);
|
|
74
|
-
};
|
|
75
|
-
const effectNoProvideInDomainRule = Rule.define({
|
|
76
|
-
name: "effect-no-provide-in-domain",
|
|
77
|
-
meta: Rule.meta({
|
|
78
|
-
type: "problem",
|
|
79
|
-
description: "Disallow Effect.provide and Effect.provideService outside composition roots, tests and direct runtime composition.",
|
|
80
|
-
messages: { forbidden: "Effect.provide is forbidden in domain logic. Provide dependencies at composition roots only." }
|
|
81
|
-
}),
|
|
82
|
-
*create() {
|
|
83
|
-
const context = yield* RuleContext;
|
|
84
|
-
if (/(?:\.(?:test|spec)\.[cm]?[jt]sx?$|(?:^|\/)(?:test|tests|__tests__)(?:\/|$))|(?:^|\/)(?:layers?|composition|bootstrap|wire|di|providers?)(?:\.[cm]?[jt]sx?$|\/)/u.test(context.filename)) return {};
|
|
85
|
-
return { CallExpression(node) {
|
|
86
|
-
if (node.type !== "CallExpression") return Effect.void;
|
|
87
|
-
if (!Option.exists(bindingPath({
|
|
88
|
-
sourceCode: context.sourceCode,
|
|
89
|
-
node: node.callee
|
|
90
|
-
}), (path) => {
|
|
91
|
-
if (path.kind !== "import") return false;
|
|
92
|
-
const name = Arr.join(path.members, ".");
|
|
93
|
-
return path.source === "effect/Effect" && (name === "provide" || name === "provideService") || path.source === "effect" && (name === "Effect.provide" || name === "Effect.provideService");
|
|
94
|
-
}) || isRuntimeArgument(context.sourceCode, node)) return Effect.void;
|
|
95
|
-
const { parent } = node;
|
|
96
|
-
if (parent.type === "CallExpression" && Arr.some(parent.arguments, (argument) => argument === node) && parent.callee.type === "MemberExpression" && Option.contains(memberPropertyName(parent.callee), "pipe") && isRuntimeArgument(context.sourceCode, parent)) return Effect.void;
|
|
97
|
-
return context.report(Diagnostic.fromId({
|
|
98
|
-
node,
|
|
99
|
-
messageId: "forbidden"
|
|
100
|
-
}));
|
|
101
|
-
} };
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
// src/shared/promise-identity.ts
|
|
105
|
-
const referenceBinding = (sourceCode, node) => Option.flatMap(identifierReference({
|
|
106
|
-
sourceCode,
|
|
107
|
-
identifier: node
|
|
108
|
-
}), (reference) => Option.fromNullishOr(reference.resolved));
|
|
109
|
-
const unchangedInitializer = (variable) => Arr.some(variable.references, (reference) => reference.isWrite() && !reference.init) ? Option.none() : Arr.findFirst(variable.defs, (definition) => {
|
|
110
|
-
const { node } = definition;
|
|
111
|
-
return definition.type === "Variable" && node.type === "VariableDeclarator" && node.id.type === "Identifier" && node.parent.type === "VariableDeclaration" && (node.parent.kind === "const" || node.parent.kind === "let") ? Option.fromNullishOr(node.init) : Option.none();
|
|
112
|
-
});
|
|
113
|
-
const isPromiseConstructor = ({ sourceCode, node, visited = [] }) => {
|
|
114
|
-
if (Option.exists(bindingPath({
|
|
115
|
-
sourceCode,
|
|
116
|
-
node,
|
|
117
|
-
visited
|
|
118
|
-
}), (path) => path.kind === "global" && (Arr.join(path.members, ".") === "Promise" || Arr.join(path.members, ".") === "globalThis.Promise"))) return true;
|
|
119
|
-
const current = unwrapExpression(node);
|
|
120
|
-
return current.type === "Identifier" && Option.exists(referenceBinding(sourceCode, current), (variable) => !Arr.some(visited, (seen) => seen === variable) && Option.exists(unchangedInitializer(variable), (initial) => isPromiseConstructor({
|
|
121
|
-
sourceCode,
|
|
122
|
-
node: initial,
|
|
123
|
-
visited: [...visited, variable]
|
|
124
|
-
})));
|
|
125
|
-
};
|
|
126
|
-
const isPromiseType = (sourceCode, type) => Option.exists(type, (annotation) => annotation.type === "TSTypeReference" && annotation.typeName.type === "Identifier" && annotation.typeName.name === "Promise" && Option.exists(identifierReference({
|
|
127
|
-
sourceCode,
|
|
128
|
-
identifier: annotation.typeName
|
|
129
|
-
}), (reference) => reference.resolved === null || Arr.isReadonlyArrayEmpty(reference.resolved.defs)));
|
|
130
|
-
const returnsPromise = ({ sourceCode, node, visited = [] }) => {
|
|
131
|
-
const current = unwrapExpression(node);
|
|
132
|
-
if (current.type === "FunctionDeclaration" || current.type === "FunctionExpression" || current.type === "ArrowFunctionExpression") return current.async || isPromiseType(sourceCode, Option.fromUndefinedOr(current.returnType?.typeAnnotation));
|
|
133
|
-
if (current.type !== "Identifier") return false;
|
|
134
|
-
return Option.exists(referenceBinding(sourceCode, current), (variable) => {
|
|
135
|
-
if (Arr.some(visited, (seen) => seen === variable) || Arr.some(variable.references, (reference) => reference.isWrite() && !reference.init)) return false;
|
|
136
|
-
const next = [...visited, variable];
|
|
137
|
-
return Arr.some(variable.defs, (definition) => definition.type === "FunctionName" && returnsPromise({
|
|
138
|
-
sourceCode,
|
|
139
|
-
node: definition.node,
|
|
140
|
-
visited: next
|
|
141
|
-
})) || Option.exists(immutableInitializer(variable), (initial) => returnsPromise({
|
|
142
|
-
sourceCode,
|
|
143
|
-
node: initial,
|
|
144
|
-
visited: next
|
|
145
|
-
}));
|
|
146
|
-
});
|
|
147
|
-
};
|
|
148
|
-
const isPromiseChainMethod = (node) => Option.exists(memberPropertyName(node), (name) => name === "then" || name === "catch" || name === "finally");
|
|
149
|
-
const isNativePromiseFactory = (input) => Option.exists(bindingPath(input), (path) => path.kind === "global" && Arr.contains([
|
|
150
|
-
"fetch",
|
|
151
|
-
"globalThis.fetch",
|
|
152
|
-
"Promise.try",
|
|
153
|
-
"globalThis.Promise.try"
|
|
154
|
-
], Arr.join(path.members, ".")));
|
|
155
|
-
const isPromiseValue = ({ sourceCode, node, visited = [] }) => {
|
|
156
|
-
const current = unwrapExpression(node);
|
|
157
|
-
if (current.type === "NewExpression") return isPromiseConstructor({
|
|
158
|
-
sourceCode,
|
|
159
|
-
node: current.callee
|
|
160
|
-
});
|
|
161
|
-
if (current.type === "CallExpression") {
|
|
162
|
-
const callee = unwrapExpression(current.callee);
|
|
163
|
-
if (isNativePromiseFactory({
|
|
164
|
-
sourceCode,
|
|
165
|
-
node: callee,
|
|
166
|
-
visited
|
|
167
|
-
})) return true;
|
|
168
|
-
if (callee.type === "MemberExpression") {
|
|
169
|
-
if (isPromiseChainMethod(callee)) return isPromiseValue({
|
|
170
|
-
sourceCode,
|
|
171
|
-
node: callee.object,
|
|
172
|
-
visited
|
|
173
|
-
});
|
|
174
|
-
return Option.exists(memberPropertyName(callee), (name) => Arr.contains([
|
|
175
|
-
"resolve",
|
|
176
|
-
"reject",
|
|
177
|
-
"all",
|
|
178
|
-
"allSettled",
|
|
179
|
-
"any",
|
|
180
|
-
"race",
|
|
181
|
-
"try"
|
|
182
|
-
], name)) && isPromiseConstructor({
|
|
183
|
-
sourceCode,
|
|
184
|
-
node: callee.object
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
return returnsPromise({
|
|
188
|
-
sourceCode,
|
|
189
|
-
node: callee,
|
|
190
|
-
visited
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
if (current.type !== "Identifier") return false;
|
|
194
|
-
return Option.exists(referenceBinding(sourceCode, current), (variable) => {
|
|
195
|
-
if (Arr.some(visited, (seen) => seen === variable)) return false;
|
|
196
|
-
return Arr.some(variable.identifiers, (identifier) => isPromiseType(sourceCode, Option.fromUndefinedOr(identifier.typeAnnotation?.typeAnnotation))) || Option.exists(unchangedInitializer(variable), (initial) => isPromiseValue({
|
|
197
|
-
sourceCode,
|
|
198
|
-
node: initial,
|
|
199
|
-
visited: [...visited, variable]
|
|
200
|
-
}));
|
|
201
|
-
});
|
|
202
|
-
};
|
|
203
|
-
// src/rules/effect-no-raw-promises.ts
|
|
204
|
-
const effectNoRawPromisesRule = Rule.define({
|
|
205
|
-
name: "effect-no-raw-promises",
|
|
206
|
-
meta: Rule.meta({
|
|
207
|
-
type: "problem",
|
|
208
|
-
description: "Disallow raw Promise construction and chaining in Effect modules. Use Effect.tryPromise, Effect.promise, or Effect.gen.",
|
|
209
|
-
messages: { rawPromise: "Do not use raw Promise construction or chaining in Effect modules. Prefer Effect.tryPromise, Effect.promise, or Effect.gen." }
|
|
210
|
-
}),
|
|
211
|
-
*create() {
|
|
212
|
-
const context = yield* RuleContext;
|
|
213
|
-
if (/(?:\.(?:test|spec)\.[cm]?[jt]sx?$|(?:^|\/)(?:test|tests|__tests__)(?:\/|$))|\.(?:fixture|mock|stub)\.[cm]?[jt]sx?$|(?:^|\/)(?:__fixtures__|__mocks__|docs|fixtures)\//u.test(context.filename) || !Arr.some(context.sourceCode.ast.body, (node) => node.type === "ImportDeclaration" && /^(?:effect|@effect\/)/u.test(node.source.value))) return {};
|
|
214
|
-
return {
|
|
215
|
-
NewExpression: (node) => node.type === "NewExpression" && isPromiseConstructor({
|
|
216
|
-
sourceCode: context.sourceCode,
|
|
217
|
-
node: node.callee
|
|
218
|
-
}) ? context.report(Diagnostic.fromId({
|
|
219
|
-
node,
|
|
220
|
-
messageId: "rawPromise"
|
|
221
|
-
})) : Effect.void,
|
|
222
|
-
CallExpression: (node) => node.type === "CallExpression" && node.callee.type === "MemberExpression" && isPromiseChainMethod(node.callee) && isPromiseValue({
|
|
223
|
-
sourceCode: context.sourceCode,
|
|
224
|
-
node: node.callee.object
|
|
225
|
-
}) ? context.report(Diagnostic.fromId({
|
|
226
|
-
node,
|
|
227
|
-
messageId: "rawPromise"
|
|
228
|
-
})) : Effect.void
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
// src/shared/rikalabs-settings.ts
|
|
233
|
-
const Severity = Schema.Literals([
|
|
234
|
-
"off",
|
|
235
|
-
"warn",
|
|
236
|
-
"error",
|
|
237
|
-
0,
|
|
238
|
-
1,
|
|
239
|
-
2
|
|
240
|
-
]);
|
|
241
|
-
const RuleSetting = Schema.Struct({
|
|
242
|
-
key: Schema.Struct({
|
|
243
|
-
type: Schema.Literal("Literal"),
|
|
244
|
-
value: Schema.String.check(Schema.isPattern(/^@?[\w-]+(?:\/[\w-]+){1,2}$/u))
|
|
245
|
-
}),
|
|
246
|
-
type: Schema.Literal("Property"),
|
|
247
|
-
value: Schema.Union([Schema.Struct({
|
|
248
|
-
type: Schema.Literal("Literal"),
|
|
249
|
-
value: Severity
|
|
250
|
-
}), Schema.Struct({
|
|
251
|
-
elements: Schema.TupleWithRest(Schema.Tuple([Schema.Struct({
|
|
252
|
-
type: Schema.Literal("Literal"),
|
|
253
|
-
value: Severity
|
|
254
|
-
})]), [Schema.Unknown]),
|
|
255
|
-
type: Schema.Literal("ArrayExpression")
|
|
256
|
-
})])
|
|
257
|
-
});
|
|
258
|
-
const withRuleSettings = (rule) => {
|
|
259
|
-
if (rule.meta?.messages?.secret === void 0 && rule.meta?.messages?.placeholder === void 0) return rule;
|
|
260
|
-
return {
|
|
261
|
-
...rule,
|
|
262
|
-
create(context) {
|
|
263
|
-
const visitors = rule.create(context);
|
|
264
|
-
return {
|
|
265
|
-
...visitors,
|
|
266
|
-
Literal(node) {
|
|
267
|
-
const { parent } = node;
|
|
268
|
-
if (Schema.is(RuleSetting)(parent) && parent.key === node) return;
|
|
269
|
-
visitors.Literal?.(node);
|
|
270
|
-
},
|
|
271
|
-
Property(node) {
|
|
272
|
-
if (Schema.is(RuleSetting)(node)) return;
|
|
273
|
-
visitors.Property?.(node);
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
const ruleSettings = R.map(withRuleSettings)(upstream.rules);
|
|
280
|
-
// src/rikalabs.ts
|
|
281
|
-
const rikalabsRules = {
|
|
282
|
-
"@rikalabs/bun-no-bun-specific-in-shared": "error",
|
|
283
|
-
"@rikalabs/drizzle-enforce-delete-with-where": "error",
|
|
284
|
-
"@rikalabs/drizzle-enforce-update-with-where": "error",
|
|
285
|
-
"@rikalabs/drizzle-no-driver-query-in-domain": "error",
|
|
286
|
-
"@rikalabs/drizzle-no-query-in-loops": "error",
|
|
287
|
-
"@rikalabs/drizzle-no-raw-sql-crud": "error",
|
|
288
|
-
"@rikalabs/drizzle-no-unbounded-select": "error",
|
|
289
|
-
"@rikalabs/drizzle-require-infer-types": "error",
|
|
290
|
-
"@rikalabs/drizzle-require-references-callback": "error",
|
|
291
|
-
"@rikalabs/drizzle-require-transaction-scope": "error",
|
|
292
|
-
"@rikalabs/effect-no-async-await": "error",
|
|
293
|
-
"@rikalabs/effect-no-async-inside-sync": "error",
|
|
294
|
-
"@rikalabs/effect-no-effect-return-in-map": "error",
|
|
295
|
-
"@rikalabs/effect-no-fire-and-forget-fork": "error",
|
|
296
|
-
"@rikalabs/effect-no-generic-error-fail": "error",
|
|
297
|
-
"@rikalabs/effect-no-layer-in-leaf-modules": "error",
|
|
298
|
-
"@rikalabs/effect-no-looped-effects": "error",
|
|
299
|
-
"@rikalabs/effect-no-mutable-ref-in-gen": "error",
|
|
300
|
-
"@rikalabs/effect-no-or-die": "error",
|
|
301
|
-
"@rikalabs/effect-no-promise-service-methods": "error",
|
|
302
|
-
"@rikalabs/effect-no-provide-in-domain": "error",
|
|
303
|
-
"@rikalabs/effect-no-raw-promises": "error",
|
|
304
|
-
"@rikalabs/effect-no-tacit-usage": "error",
|
|
305
|
-
"@rikalabs/effect-no-terminal-runners": "error",
|
|
306
|
-
"@rikalabs/effect-no-throw-in-services": "error",
|
|
307
|
-
"@rikalabs/effect-no-try-catch": "error",
|
|
308
|
-
"@rikalabs/effect-prefer-gen-over-flatmap-chain": "error",
|
|
309
|
-
"@rikalabs/effect-prefer-runmain-entrypoint": "error",
|
|
310
|
-
"@rikalabs/effect-require-span-name": "error",
|
|
311
|
-
"@rikalabs/effect-require-tagged-errors": "error",
|
|
312
|
-
"@rikalabs/no-anemic-errors": "error",
|
|
313
|
-
"@rikalabs/no-as-never": "error",
|
|
314
|
-
"@rikalabs/no-bag-of-optionals": "error",
|
|
315
|
-
"@rikalabs/no-bare-wrapper-functions": "error",
|
|
316
|
-
"@rikalabs/no-catch-return-error-object": "error",
|
|
317
|
-
"@rikalabs/no-copy-paste-exports": "error",
|
|
318
|
-
"@rikalabs/no-cross-layer-imports": "error",
|
|
319
|
-
"@rikalabs/no-debug-residue-filenames": "error",
|
|
320
|
-
"@rikalabs/no-default-export-in-domain": "error",
|
|
321
|
-
"@rikalabs/no-double-type-assertion": "error",
|
|
322
|
-
"@rikalabs/no-duplicate-context": "error",
|
|
323
|
-
"@rikalabs/no-exported-any": "error",
|
|
324
|
-
"@rikalabs/no-generic-module-names": "error",
|
|
325
|
-
"@rikalabs/no-hardcoded-secrets": "error",
|
|
326
|
-
"@rikalabs/no-identical-branches": "error",
|
|
327
|
-
"@rikalabs/no-is-record-helpers": "error",
|
|
328
|
-
"@rikalabs/no-json-parse-default-fallback": "error",
|
|
329
|
-
"@rikalabs/no-json-stringify-default-fallback": "error",
|
|
330
|
-
"@rikalabs/no-low-signal-public-names": "error",
|
|
331
|
-
"@rikalabs/no-low-signal-variable-names": "error",
|
|
332
|
-
"@rikalabs/no-mock-only-tests": "error",
|
|
333
|
-
"@rikalabs/no-pass-through-intermediate-vars": "error",
|
|
334
|
-
"@rikalabs/no-placeholder-implementation": "error",
|
|
335
|
-
"@rikalabs/no-placeholder-tests": "error",
|
|
336
|
-
"@rikalabs/no-property-default-fallbacks": "error",
|
|
337
|
-
"@rikalabs/no-redundant-const-assertion": "error",
|
|
338
|
-
"@rikalabs/no-relative-cross-package-imports": "error",
|
|
339
|
-
"@rikalabs/no-runtime-compat-fallbacks": "error",
|
|
340
|
-
"@rikalabs/no-silent-catch-fallback": "error",
|
|
341
|
-
"@rikalabs/no-sql-string-concat": "error",
|
|
342
|
-
"@rikalabs/no-standalone-classes": "error",
|
|
343
|
-
"@rikalabs/no-trivial-property-helpers": "error",
|
|
344
|
-
"@rikalabs/no-trivial-runtime-guard-helpers": "error",
|
|
345
|
-
"@rikalabs/no-unlisted-external-imports": "error",
|
|
346
|
-
"@rikalabs/no-vague-verbs": "error",
|
|
347
|
-
"@rikalabs/require-branded-ids": "error",
|
|
348
|
-
"@rikalabs/require-exhaustive-tag-switch": "error"
|
|
349
|
-
};
|
|
350
|
-
const replacements = {
|
|
351
|
-
"effect-no-provide-in-domain": effectNoProvideInDomainRule,
|
|
352
|
-
"effect-no-raw-promises": effectNoRawPromisesRule
|
|
353
|
-
};
|
|
354
|
-
const rules = {
|
|
355
|
-
...ruleSettings,
|
|
356
|
-
...replacements
|
|
357
|
-
};
|
|
358
|
-
const plugin = {
|
|
359
|
-
...upstream,
|
|
360
|
-
rules
|
|
361
|
-
};
|
|
362
|
-
export { rikalabsRules as n, plugin as t };
|
package/dist/rikalabs.d.mts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import upstream from "@rikalabs/oxlint-standards/plugin";
|
|
2
|
-
declare const effectNoRawPromisesRule: import("effect-oxlint").CreateRule;
|
|
3
|
-
export declare const rikalabsRules: {
|
|
4
|
-
readonly "@rikalabs/bun-no-bun-specific-in-shared": "error";
|
|
5
|
-
readonly "@rikalabs/drizzle-enforce-delete-with-where": "error";
|
|
6
|
-
readonly "@rikalabs/drizzle-enforce-update-with-where": "error";
|
|
7
|
-
readonly "@rikalabs/drizzle-no-driver-query-in-domain": "error";
|
|
8
|
-
readonly "@rikalabs/drizzle-no-query-in-loops": "error";
|
|
9
|
-
readonly "@rikalabs/drizzle-no-raw-sql-crud": "error";
|
|
10
|
-
readonly "@rikalabs/drizzle-no-unbounded-select": "error";
|
|
11
|
-
readonly "@rikalabs/drizzle-require-infer-types": "error";
|
|
12
|
-
readonly "@rikalabs/drizzle-require-references-callback": "error";
|
|
13
|
-
readonly "@rikalabs/drizzle-require-transaction-scope": "error";
|
|
14
|
-
readonly "@rikalabs/effect-no-async-await": "error";
|
|
15
|
-
readonly "@rikalabs/effect-no-async-inside-sync": "error";
|
|
16
|
-
readonly "@rikalabs/effect-no-effect-return-in-map": "error";
|
|
17
|
-
readonly "@rikalabs/effect-no-fire-and-forget-fork": "error";
|
|
18
|
-
readonly "@rikalabs/effect-no-generic-error-fail": "error";
|
|
19
|
-
readonly "@rikalabs/effect-no-layer-in-leaf-modules": "error";
|
|
20
|
-
readonly "@rikalabs/effect-no-looped-effects": "error";
|
|
21
|
-
readonly "@rikalabs/effect-no-mutable-ref-in-gen": "error";
|
|
22
|
-
readonly "@rikalabs/effect-no-or-die": "error";
|
|
23
|
-
readonly "@rikalabs/effect-no-promise-service-methods": "error";
|
|
24
|
-
readonly "@rikalabs/effect-no-provide-in-domain": "error";
|
|
25
|
-
readonly "@rikalabs/effect-no-raw-promises": "error";
|
|
26
|
-
readonly "@rikalabs/effect-no-tacit-usage": "error";
|
|
27
|
-
readonly "@rikalabs/effect-no-terminal-runners": "error";
|
|
28
|
-
readonly "@rikalabs/effect-no-throw-in-services": "error";
|
|
29
|
-
readonly "@rikalabs/effect-no-try-catch": "error";
|
|
30
|
-
readonly "@rikalabs/effect-prefer-gen-over-flatmap-chain": "error";
|
|
31
|
-
readonly "@rikalabs/effect-prefer-runmain-entrypoint": "error";
|
|
32
|
-
readonly "@rikalabs/effect-require-span-name": "error";
|
|
33
|
-
readonly "@rikalabs/effect-require-tagged-errors": "error";
|
|
34
|
-
readonly "@rikalabs/no-anemic-errors": "error";
|
|
35
|
-
readonly "@rikalabs/no-as-never": "error";
|
|
36
|
-
readonly "@rikalabs/no-bag-of-optionals": "error";
|
|
37
|
-
readonly "@rikalabs/no-bare-wrapper-functions": "error";
|
|
38
|
-
readonly "@rikalabs/no-catch-return-error-object": "error";
|
|
39
|
-
readonly "@rikalabs/no-copy-paste-exports": "error";
|
|
40
|
-
readonly "@rikalabs/no-cross-layer-imports": "error";
|
|
41
|
-
readonly "@rikalabs/no-debug-residue-filenames": "error";
|
|
42
|
-
readonly "@rikalabs/no-default-export-in-domain": "error";
|
|
43
|
-
readonly "@rikalabs/no-double-type-assertion": "error";
|
|
44
|
-
readonly "@rikalabs/no-duplicate-context": "error";
|
|
45
|
-
readonly "@rikalabs/no-exported-any": "error";
|
|
46
|
-
readonly "@rikalabs/no-generic-module-names": "error";
|
|
47
|
-
readonly "@rikalabs/no-hardcoded-secrets": "error";
|
|
48
|
-
readonly "@rikalabs/no-identical-branches": "error";
|
|
49
|
-
readonly "@rikalabs/no-is-record-helpers": "error";
|
|
50
|
-
readonly "@rikalabs/no-json-parse-default-fallback": "error";
|
|
51
|
-
readonly "@rikalabs/no-json-stringify-default-fallback": "error";
|
|
52
|
-
readonly "@rikalabs/no-low-signal-public-names": "error";
|
|
53
|
-
readonly "@rikalabs/no-low-signal-variable-names": "error";
|
|
54
|
-
readonly "@rikalabs/no-mock-only-tests": "error";
|
|
55
|
-
readonly "@rikalabs/no-pass-through-intermediate-vars": "error";
|
|
56
|
-
readonly "@rikalabs/no-placeholder-implementation": "error";
|
|
57
|
-
readonly "@rikalabs/no-placeholder-tests": "error";
|
|
58
|
-
readonly "@rikalabs/no-property-default-fallbacks": "error";
|
|
59
|
-
readonly "@rikalabs/no-redundant-const-assertion": "error";
|
|
60
|
-
readonly "@rikalabs/no-relative-cross-package-imports": "error";
|
|
61
|
-
readonly "@rikalabs/no-runtime-compat-fallbacks": "error";
|
|
62
|
-
readonly "@rikalabs/no-silent-catch-fallback": "error";
|
|
63
|
-
readonly "@rikalabs/no-sql-string-concat": "error";
|
|
64
|
-
readonly "@rikalabs/no-standalone-classes": "error";
|
|
65
|
-
readonly "@rikalabs/no-trivial-property-helpers": "error";
|
|
66
|
-
readonly "@rikalabs/no-trivial-runtime-guard-helpers": "error";
|
|
67
|
-
readonly "@rikalabs/no-unlisted-external-imports": "error";
|
|
68
|
-
readonly "@rikalabs/no-vague-verbs": "error";
|
|
69
|
-
readonly "@rikalabs/require-branded-ids": "error";
|
|
70
|
-
readonly "@rikalabs/require-exhaustive-tag-switch": "error";
|
|
71
|
-
};
|
|
72
|
-
declare const replacements: {
|
|
73
|
-
"effect-no-provide-in-domain": import("effect-oxlint").CreateRule;
|
|
74
|
-
"effect-no-raw-promises": import("effect-oxlint").CreateRule;
|
|
75
|
-
};
|
|
76
|
-
declare const rules: Readonly<Record<string, (typeof upstream.rules)[string] | typeof effectNoRawPromisesRule>> & typeof replacements;
|
|
77
|
-
declare const plugin: Omit<typeof upstream, "rules"> & {
|
|
78
|
-
readonly rules: typeof rules;
|
|
79
|
-
};
|
|
80
|
-
export { plugin as default };
|
package/dist/rikalabs.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as default, n as rikalabsRules } from "./rikalabs-hPKWFZ1P.mjs";
|