@deslop/coding-standards 0.1.1083 → 0.1.1085
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/dist/{MutableList-Cpkiw3Cl.mjs → MutableList-NTBI6AHW.mjs} +58 -1
- package/dist/install.js +2 -2
- package/dist/oxlint.d.ts +10 -0
- package/dist/oxlint.js +445 -137
- package/package.json +1 -1
- package/skills/design/SKILL.md +2 -2
- package/skills/engineering/SKILL.md +92 -77
|
@@ -5408,6 +5408,46 @@ const take$1 = /*#__PURE__*/ dual(2, (self, n) => {
|
|
|
5408
5408
|
return input.slice(0, clampCount(n, input.length));
|
|
5409
5409
|
});
|
|
5410
5410
|
/**
|
|
5411
|
+
* Takes elements from the start while the predicate holds, stopping at the
|
|
5412
|
+
* first element that fails.
|
|
5413
|
+
*
|
|
5414
|
+
* **When to use**
|
|
5415
|
+
*
|
|
5416
|
+
* Use to keep the leading elements of an iterable while each element satisfies
|
|
5417
|
+
* a predicate, returning the retained prefix as an array.
|
|
5418
|
+
*
|
|
5419
|
+
* **Details**
|
|
5420
|
+
*
|
|
5421
|
+
* Supports refinements for type narrowing. The predicate receives
|
|
5422
|
+
* `(element, index)`.
|
|
5423
|
+
*
|
|
5424
|
+
* **Example** (Taking while condition holds)
|
|
5425
|
+
*
|
|
5426
|
+
* ```ts import.meta.vitest
|
|
5427
|
+
* import { Array } from "effect"
|
|
5428
|
+
*
|
|
5429
|
+
* Array.takeWhile([1, 3, 2, 4, 1, 2], (x) => x < 4) // => [1, 3, 2]
|
|
5430
|
+
* ```
|
|
5431
|
+
*
|
|
5432
|
+
* @see {@link take} for keeping a fixed number of leading elements
|
|
5433
|
+
* @see {@link dropWhile} for removing the matching prefix and keeping the rest
|
|
5434
|
+
* @see {@link span} for splitting the matching prefix from the remaining elements
|
|
5435
|
+
*
|
|
5436
|
+
* @stability stable
|
|
5437
|
+
* @category getters
|
|
5438
|
+
* @since 2.0.0
|
|
5439
|
+
*/
|
|
5440
|
+
const takeWhile = /*#__PURE__*/ dual(2, (self, predicate) => {
|
|
5441
|
+
let i = 0;
|
|
5442
|
+
const out = [];
|
|
5443
|
+
for (const a of self) {
|
|
5444
|
+
if (!predicate(a, i)) break;
|
|
5445
|
+
out.push(a);
|
|
5446
|
+
i++;
|
|
5447
|
+
}
|
|
5448
|
+
return out;
|
|
5449
|
+
});
|
|
5450
|
+
/**
|
|
5411
5451
|
* Removes the last `n` elements, creating a new array.
|
|
5412
5452
|
*
|
|
5413
5453
|
* **When to use**
|
|
@@ -6352,6 +6392,23 @@ globalThis.String;
|
|
|
6352
6392
|
*/
|
|
6353
6393
|
const Order = String$2;
|
|
6354
6394
|
/**
|
|
6395
|
+
* Converts a string to uppercase.
|
|
6396
|
+
*
|
|
6397
|
+
* **Example** (Converting strings to uppercase)
|
|
6398
|
+
*
|
|
6399
|
+
* ```ts import.meta.vitest
|
|
6400
|
+
* import { pipe, String } from "effect"
|
|
6401
|
+
*
|
|
6402
|
+
* pipe("a", String.toUpperCase) // => "A"
|
|
6403
|
+
* String.toUpperCase("hello") // => "HELLO"
|
|
6404
|
+
* ```
|
|
6405
|
+
*
|
|
6406
|
+
* @stability stable
|
|
6407
|
+
* @category transforming
|
|
6408
|
+
* @since 2.0.0
|
|
6409
|
+
*/
|
|
6410
|
+
const toUpperCase = (self) => self.toUpperCase();
|
|
6411
|
+
/**
|
|
6355
6412
|
* Replaces matches in a string using `String.prototype.replace`.
|
|
6356
6413
|
*
|
|
6357
6414
|
* **Details**
|
|
@@ -6995,4 +7052,4 @@ const toArrayN = (self, n) => {
|
|
|
6995
7052
|
*/
|
|
6996
7053
|
const toArray = (self) => toArrayN(self, self.length);
|
|
6997
7054
|
//#endregion
|
|
6998
|
-
export {
|
|
7055
|
+
export { last as $, toStringUnknown as $n, pipeArguments as $r, isGreaterThanOrEqualTo as $t, dedupe as A, contE as An, isNullish as Ar, filter$1 as At, findLast as B, isEffect as Bn, isUnknown as Br, liftThrowable as Bt, Error$1 as C, causeDie as Cn, isBoolean as Cr, map$2 as Ct, appendAll as D, constEmptyAnnotations as Dn, isNotNull as Dr, all as Dt, append$1 as E, causeFromReasons as En, isIterable as Er, normalize as Et, every as F, exitFailCause as Fn, isReadonlyObject as Fr, fromUndefinedOr as Ft, get$1 as G, makePrimitiveProto as Gn, constant as Gr, some$1 as Gt, flatten as H, isFailReason as Hn, constTrue as Hr, match$4 as Ht, filter as I, exitSucceed as In, isRegExp as Ir, getOrElse as It, isArrayEmpty as J, internalCall as Jn, memoize as Jr, BigInt$1 as Jt, getSomes as K, withFiber as Kn, dual as Kr, toArray$1 as Kt, filterMap as L, isCause as Ln, isString as Lr, getOrUndefined as Lt, dropRight as M, evaluate as Mn, isObject as Mr, flatMap$2 as Mt, empty as N, exitDie as Nn, isObjectKeyword as Nr, flatten$1 as Nt, contains as O, contA as On, isNotNullish as Or, contains$1 as Ot, ensure as P, exitFail as Pn, isPropertyKey as Pr, fromNullishOr as Pt, join as Q, NodeInspectSymbol as Qn, Prototype as Qr, isGreaterThan as Qt, findFirst as R, isDieReason as Rn, isTagged as Rr, isNone as Rt, round as S, causeCombine as Sn, isBigInt as Sr, isSuccess as St, taggedEnum as T, causeFail as Tn, isFunction as Tr, succeed as Tt, forEach as U, isInterruptReason as Un, constUndefined as Ur, none as Ut, flatMap as V, isExit as Vn, constFalse as Vr, map$3 as Vt, fromIterable as W, makePrimitive as Wn, constVoid as Wr, orElse as Wt, isCanonicalArrayIndex as X, setStackTraceLimit as Xn, pipe as Xr, Number$2 as Xt, isArrayNonEmpty as Y, getStackTraceLimit as Yn, memoizeIdempotent as Yr, Date$1 as Yt, isReadonlyArrayNonEmpty as Z, BaseProto as Zn, Class$1 as Zr, String$2 as Zt, startsWith as _, TaggedError$1 as _n, string as _r, fail as _t, takeN as a, make$3 as an, currentFiberTypeId as ar, prepend as at, trimEnd as b, causeAddInterrupts as bn, symbol$1 as br, getOrThrow as bt, make$1 as c, Die as cn, asEquivalence as cr, sort as ct, Order as d, ExitTypeId as dn, symbol as dr, fromEntries as dt, isLessThan as en, format as er, makeEquivalence as et, includes as f, Fail as fn, array as fr, get$2 as ft, split as g, StackTraceKey as gn, optimize as gr, values as gt, replaceAll as h, ReasonBase as hn, number as hr, remove as ht, take as i, Tuple as in, formatPropertyKey as ir, of as it, dedupeWith as j, done as jn, isNumber as jr, firstSomeOf as jt, containsWith as k, contAll as kn, isNotUndefined as kr, exists as kt, update as l, Done as ln, byReferenceUnsafe as lr, take$1 as lt, replace as m, PipeInspectableProto as mn, hash as mr, map$1 as mt, clear as n, make$2 as nn, formatJson as nr, match$2 as nt, toArray as o, strictEqual as on, redact as or, reduce as ot, match$1 as p, InterruptorStackTrace as pn, combine as pr, makeEquivalence$1 as pt, head as q, assignProperty as qn, identity as qr, zipWith as qt, make as r, mapInput as rn, formatPath as rr, matchRight as rt, get as s, CauseImpl as sn, symbolRedactable as sr, some as st, append as t, isLessThanOrEqualTo as tn, formatDate as tr, map as tt, match as u, Error$2 as un, equals as ur, takeWhile as ut, toUpperCase as v, Yield as vn, structure as vr, flatMap$1 as vt, TaggedError as w, causeEmpty as wn, isError as wr, match$3 as wt, parse as x, causeAnnotate as xn, hasProperty as xr, isFailure as xt, trim as y, args as yn, structureKeys as yr, fromOption as yt, findFirstIndex as z, isDone as zn, isUndefined as zr, isSome as zt };
|
package/dist/install.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { $n as toStringUnknown, $r as pipeArguments, A as dedupe, An as contE, Ar as isNullish, B as findLast, Bn as isEffect$1, Br as isUnknown, C as Error$2, Cn as causeDie, Cr as isBoolean$1, Dn as constEmptyAnnotations, Dr as isNotNull, E as append, En as causeFromReasons, Er as isIterable, Et as normalize$1, Fn as exitFailCause, Ft as fromUndefinedOr, Gn as makePrimitiveProto, Gr as constant, Gt as some, Hn as isFailReason$1, Hr as constTrue, Ht as match$4, I as filter, In as exitSucceed, It as getOrElse, Jn as internalCall, Jr as memoize, Kn as withFiber$1, Kr as dual, Ln as isCause, Lr as isString$1, Lt as getOrUndefined$1, Mn as evaluate, Mr as isObject, Mt as flatMap$4, N as empty$3, Nn as exitDie, Nr as isObjectKeyword, O as contains, On as contA, Or as isNotNullish, Pn as exitFail, Pt as fromNullishOr, Q as join$1, Qn as NodeInspectSymbol, Qr as Prototype$1, Qt as isGreaterThan$1, R as findFirst, Rn as isDieReason$1, Rr as isTagged, Rt as isNone, S as round, Sn as causeCombine, T as taggedEnum, Tn as causeFail, Tr as isFunction, Tt as succeed$6, Un as isInterruptReason, Ur as constUndefined, Ut as none, Vn as isExit, Vr as constFalse, Vt as map$10, W as fromIterable$1, Wn as makePrimitive$1, Wr as constVoid, Wt as orElse, X as isCanonicalArrayIndex, Xn as setStackTraceLimit, Xr as pipe, Xt as Number$5, Y as isArrayNonEmpty, Yn as getStackTraceLimit, Yr as memoizeIdempotent, Z as isReadonlyArrayNonEmpty, Zn as BaseProto, Zr as Class, Zt as String$6, _ as startsWith, _n as TaggedError$2, _r as string$1, _t as fail$5, a as takeN, ar as currentFiberTypeId, b as trimEnd, bn as causeAddInterrupts, br as symbol$1, c as make$30, cn as Die, dn as ExitTypeId, dr as symbol, er as format$1, fn as Fail, gn as StackTraceKey, hn as ReasonBase, hr as number$1, i as take$1, ir as formatPropertyKey, it as of, jn as done$1, jr as isNumber, kn as contAll, kr as isNotUndefined, kt as exists, ln as Done$1, mn as PipeInspectableProto, mr as hash, n as clear, nr as formatJson, nt as match$5, ot as reduce, pn as InterruptorStackTrace, pr as combine$1, qn as assignProperty, qr as identity, r as make$29, rn as mapInput, rr as formatPath, sn as CauseImpl, st as some$1, t as append$1, tt as map$8, u as match$6, un as Error$3, ur as equals$1, vn as Yield, vr as structure, w as TaggedError$1, wn as causeEmpty, wr as isError, wt as match$3, xn as causeAnnotate, xr as hasProperty, xt as isFailure$1, yn as args, z as findFirstIndex, zn as isDone$2, zr as isUndefined, zt as isSome } from "./MutableList-NTBI6AHW.mjs";
|
|
3
3
|
import * as OS from "node:os";
|
|
4
4
|
import * as NodeChildProcess from "node:child_process";
|
|
5
5
|
import { PassThrough } from "node:stream";
|
|
@@ -25497,7 +25497,7 @@ const runWith = (command, config) => {
|
|
|
25497
25497
|
};
|
|
25498
25498
|
//#endregion
|
|
25499
25499
|
//#region package.json
|
|
25500
|
-
var version = "0.1.
|
|
25500
|
+
var version = "0.1.1085";
|
|
25501
25501
|
//#endregion
|
|
25502
25502
|
//#region src/install.ts
|
|
25503
25503
|
const cli = pipe(make("deslop-coding-standards", {}, fnUntraced(function* () {
|
package/dist/oxlint.d.ts
CHANGED
|
@@ -4150,6 +4150,7 @@ export declare const oxlint: {
|
|
|
4150
4150
|
plugins: ("effecttsgo" | "eslint" | "import" | "jsx-a11y" | "oxc" | "react" | "typescript" | "unicorn")[];
|
|
4151
4151
|
rules: {
|
|
4152
4152
|
'@deslop/coding-standards/explicit-effect-concurrency': "error";
|
|
4153
|
+
'@deslop/coding-standards/module-constant': "error";
|
|
4153
4154
|
'@deslop/coding-standards/motion-limits': "error";
|
|
4154
4155
|
'@deslop/coding-standards/no-array-wrap-ternary': "error";
|
|
4155
4156
|
'@deslop/coding-standards/no-barrel-module': "error";
|
|
@@ -4164,6 +4165,7 @@ export declare const oxlint: {
|
|
|
4164
4165
|
'@deslop/coding-standards/no-empty-recovery': "error";
|
|
4165
4166
|
'@deslop/coding-standards/no-error-message-assertion': "error";
|
|
4166
4167
|
'@deslop/coding-standards/no-fake-ref-state': "error";
|
|
4168
|
+
'@deslop/coding-standards/no-floating-derived-type': "error";
|
|
4167
4169
|
'@deslop/coding-standards/no-gradient': "error";
|
|
4168
4170
|
'@deslop/coding-standards/no-hand-written-guard': "error";
|
|
4169
4171
|
'@deslop/coding-standards/no-in-operator': "error";
|
|
@@ -4183,9 +4185,11 @@ export declare const oxlint: {
|
|
|
4183
4185
|
'@deslop/coding-standards/no-renamed-import': "error";
|
|
4184
4186
|
'@deslop/coding-standards/no-return-type': "error";
|
|
4185
4187
|
'@deslop/coding-standards/no-single-use-value': "error";
|
|
4188
|
+
'@deslop/coding-standards/no-stored-jsx': "error";
|
|
4186
4189
|
'@deslop/coding-standards/no-stored-schema-operation': "error";
|
|
4187
4190
|
'@deslop/coding-standards/no-switch-statement': "error";
|
|
4188
4191
|
'@deslop/coding-standards/no-trivial-indirection': "error";
|
|
4192
|
+
'@deslop/coding-standards/no-type-from-value': "error";
|
|
4189
4193
|
'@deslop/coding-standards/no-typeof': "error";
|
|
4190
4194
|
'@deslop/coding-standards/no-undestructured-use-state': "error";
|
|
4191
4195
|
'@deslop/coding-standards/no-unexplained-disable': "error";
|
|
@@ -4592,6 +4596,12 @@ export declare const oxlint: {
|
|
|
4592
4596
|
ignoreRestSiblings: true;
|
|
4593
4597
|
reportUsedIgnorePattern: true;
|
|
4594
4598
|
}];
|
|
4599
|
+
'no-use-before-define': ["error", {
|
|
4600
|
+
classes: false;
|
|
4601
|
+
functions: false;
|
|
4602
|
+
typedefs: false;
|
|
4603
|
+
variables: true;
|
|
4604
|
+
}];
|
|
4595
4605
|
'no-useless-assignment': "error";
|
|
4596
4606
|
'no-useless-backreference': "error";
|
|
4597
4607
|
'no-useless-call': "error";
|