golar 0.1.4-beta.1 → 0.1.5
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/builtin-rules.d.ts +2 -3
- package/dist/builtin-rules.generated.d.ts +3 -3
- package/dist/internal/linter/rule-creator.d.ts +3 -2
- package/dist/internal/linter/rule-creator.js +10 -10
- package/dist/internal/linter/rules/explicit-anys/config.js +3 -3
- package/dist/node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.d.ts +1430 -0
- package/dist/node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.js +658 -0
- package/dist/packages/golar/package.js +3 -2
- package/dist/workspace.js +2 -2
- package/package.json +13 -10
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.d.ts +0 -22
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js +0 -29
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js +0 -37
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.d.ts +0 -16
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js +0 -19
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.d.ts +0 -208
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js +0 -578
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.d.ts +0 -32
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js +0 -470
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.d.ts +0 -64
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js +0 -225
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.d.ts +0 -47
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js +0 -61
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js +0 -33
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.d.ts +0 -127
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js +0 -62
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js +0 -214
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.d.ts +0 -69
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js +0 -109
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js +0 -58
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.d.ts +0 -31
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js +0 -49
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.d.ts +0 -805
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js +0 -1096
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/standard-schema.d.ts +0 -120
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.ts +0 -96
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js +0 -289
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.d.ts +0 -41
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js +0 -304
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.d.ts +0 -8
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js +0 -9
package/dist/builtin-rules.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ZodObject } from "./node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js";
|
|
1
|
+
import { InferInput, ObjectEntries, ObjectSchema } from "./node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.js";
|
|
3
2
|
import { GolarBrand } from "./internal/linter/rule-creator.js";
|
|
4
3
|
import { LintConfiguredRule } from "./config.js";
|
|
5
4
|
import { rules as rules$1 } from "./builtin-rules.generated.js";
|
|
6
5
|
|
|
7
6
|
//#region src/builtin-rules.d.ts
|
|
8
|
-
declare const rules: (configs: { [TRule in keyof typeof rules$1]?: true | undefined |
|
|
7
|
+
declare const rules: (configs: { [TRule in keyof typeof rules$1]?: true | undefined | InferInput<ObjectSchema<(typeof rules$1)[TRule][typeof GolarBrand]['options'] & ObjectEntries, undefined>> }) => LintConfiguredRule[];
|
|
9
8
|
//#endregion
|
|
10
9
|
export { rules };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BooleanSchema, DescriptionAction, OptionalSchema, SchemaWithPipe } from "./node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.js";
|
|
2
2
|
import { RuleDefinition } from "./internal/linter/rule-creator.js";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-rules.generated.d.ts
|
|
5
5
|
declare const rules: {
|
|
6
6
|
readonly 'explicit-anys': RuleDefinition<{
|
|
7
|
-
fixToUnknown:
|
|
8
|
-
ignoreRestArgs:
|
|
7
|
+
fixToUnknown: OptionalSchema<SchemaWithPipe<readonly [BooleanSchema<undefined>, DescriptionAction<boolean, "Whether to enable auto-fixing in which the `any` type is converted to the `unknown` type.">]>, false>;
|
|
8
|
+
ignoreRestArgs: OptionalSchema<SchemaWithPipe<readonly [BooleanSchema<undefined>, DescriptionAction<boolean, "Whether to ignore rest parameter arrays.">]>, false>;
|
|
9
9
|
}>;
|
|
10
10
|
};
|
|
11
11
|
//#endregion
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GenericSchema, OptionalSchema } from "../../node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.js";
|
|
2
2
|
|
|
3
3
|
//#region ../../internal/linter/rule-creator.d.ts
|
|
4
4
|
declare const GolarBrand: unique symbol;
|
|
5
|
-
type
|
|
5
|
+
type SchemaWithDefault = OptionalSchema<GenericSchema, unknown>;
|
|
6
|
+
type RuleDefinition<TOptions extends Record<string, SchemaWithDefault>> = {
|
|
6
7
|
[GolarBrand]: {
|
|
7
8
|
options: TOptions;
|
|
8
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { array,
|
|
1
|
+
import { array, literal, optional, pipe, strictObject, string, transform, union, variant } from "../../node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
|
|
4
4
|
//#region ../../internal/linter/rule-creator.ts
|
|
@@ -9,11 +9,11 @@ function ruleConfig(config) {
|
|
|
9
9
|
name: path.basename(config.dirname)
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
const typeOrValueSpecifier = array(
|
|
12
|
+
const typeOrValueSpecifier = pipe(array(variant("from", [
|
|
13
13
|
strictObject({
|
|
14
14
|
from: literal("file"),
|
|
15
15
|
name: union([string(), array(string())]),
|
|
16
|
-
path: string()
|
|
16
|
+
path: optional(string())
|
|
17
17
|
}),
|
|
18
18
|
strictObject({
|
|
19
19
|
from: literal("lib"),
|
|
@@ -24,23 +24,23 @@ const typeOrValueSpecifier = array(discriminatedUnion("from", [
|
|
|
24
24
|
name: union([string(), array(string())]),
|
|
25
25
|
package: string()
|
|
26
26
|
})
|
|
27
|
-
])
|
|
27
|
+
])), transform((items) => items.map((item) => {
|
|
28
28
|
const res = {
|
|
29
|
-
from:
|
|
30
|
-
name: Array.isArray(
|
|
29
|
+
from: item.from,
|
|
30
|
+
name: Array.isArray(item.name) ? item.name : [item.name]
|
|
31
31
|
};
|
|
32
|
-
switch (
|
|
32
|
+
switch (item.from) {
|
|
33
33
|
case "file": return {
|
|
34
34
|
...res,
|
|
35
|
-
filePath:
|
|
35
|
+
filePath: item.path ?? ""
|
|
36
36
|
};
|
|
37
37
|
case "lib": return res;
|
|
38
38
|
case "package": return {
|
|
39
39
|
...res,
|
|
40
|
-
package:
|
|
40
|
+
package: item.package ?? ""
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
}));
|
|
43
|
+
})));
|
|
44
44
|
|
|
45
45
|
//#endregion
|
|
46
46
|
export { ruleConfig };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { boolean } from "../../../../node_modules/.pnpm/
|
|
1
|
+
import { boolean, description, optional, pipe } from "../../../../node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.js";
|
|
2
2
|
import { ruleConfig } from "../../rule-creator.js";
|
|
3
3
|
|
|
4
4
|
//#region ../../internal/linter/rules/explicit-anys/config.ts
|
|
5
5
|
const rule = ruleConfig({
|
|
6
6
|
dirname: import.meta.dirname,
|
|
7
7
|
options: {
|
|
8
|
-
fixToUnknown: boolean()
|
|
9
|
-
ignoreRestArgs: boolean()
|
|
8
|
+
fixToUnknown: optional(pipe(boolean(), description("Whether to enable auto-fixing in which the `any` type is converted to the `unknown` type.")), false),
|
|
9
|
+
ignoreRestArgs: optional(pipe(boolean(), description("Whether to ignore rest parameter arrays.")), false)
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
|