@milkenjoyer/toolchain 0.7.2 → 0.8.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.
@@ -0,0 +1,140 @@
1
+ import { t as plugin } from "./effect-plugin-kYxB-5LJ.mjs";
2
+ import { n as effectTsgoPlugin, r as effectTsgoRules } from "./effect-tsgo-D0QfeKGD.mjs";
3
+ import { t as exceptions } from "./exceptions-Bq-9MxoR.mjs";
4
+ import { t as plugin$1 } from "./plugin-BoBRGtGf.mjs";
5
+ import { t as staticRules } from "./rules-vHmNoAU0.mjs";
6
+ import * as Arr from "effect/Array";
7
+ import * as Option from "effect/Option";
8
+ import * as R from "effect/Record";
9
+ import * as Schema from "effect/Schema";
10
+ import * as Str from "effect/String";
11
+ import foldkitRecommended from "@foldkit/oxlint-plugin/recommended.json" with { type: "json" };
12
+ import ultraciteCore from "ultracite/oxlint/core";
13
+ // src/lint.ts
14
+ const plugins = [
15
+ "typescript",
16
+ "import",
17
+ "promise",
18
+ "unicorn",
19
+ "oxc",
20
+ "eslint",
21
+ "node",
22
+ "vitest",
23
+ effectTsgoPlugin
24
+ ];
25
+ const categories = {
26
+ correctness: "error",
27
+ suspicious: "error",
28
+ pedantic: "off",
29
+ perf: "off",
30
+ style: "off",
31
+ restriction: "off",
32
+ nursery: "off"
33
+ };
34
+ const PresetRules = Schema.Record(Schema.String, Schema.Literals(["error", "off"]));
35
+ const Globs = Schema.mutable(Schema.Array(Schema.String));
36
+ const FoldkitPreset = Schema.Struct({
37
+ jsPlugins: Schema.Array(Schema.Struct({
38
+ name: Schema.String,
39
+ specifier: Schema.String
40
+ })),
41
+ rules: PresetRules,
42
+ overrides: Schema.Array(Schema.Struct({
43
+ files: Globs,
44
+ excludeFiles: Schema.optionalKey(Globs),
45
+ rules: PresetRules
46
+ }))
47
+ });
48
+ const foldkitPreset = Schema.decodeUnknownSync(FoldkitPreset)(foldkitRecommended);
49
+ const testFiles = [
50
+ "**/*.test.ts",
51
+ "**/*.test.tsx",
52
+ "**/*.spec.ts",
53
+ "**/*.spec.tsx",
54
+ "**/*.fake.ts",
55
+ "**/*.fake.tsx",
56
+ "**/tests/**",
57
+ "**/test/**"
58
+ ];
59
+ const toolchainScopes = [
60
+ {
61
+ files: ["**/*.astro"],
62
+ rules: { "unicorn/prefer-module": "off" }
63
+ },
64
+ ...Arr.map(Arr.filter(foldkitPreset.overrides, (scope) => scope.files.includes("**/*.test.ts") && scope.excludeFiles === void 0), ({ rules }) => ({
65
+ files: ["**/tests/**", "**/test/**"],
66
+ rules
67
+ })),
68
+ {
69
+ files: testFiles,
70
+ rules: {
71
+ "effecttsgo/lazy-effect": "off",
72
+ "eslint/no-extend-native": "off",
73
+ "typescript/unbound-method": "off",
74
+ "typescript/no-deprecated": "off",
75
+ "effect/use-temp-file-scoped": "off",
76
+ "birbprophet/no-process-env": "off"
77
+ }
78
+ },
79
+ {
80
+ files: [
81
+ "**/*.config.ts",
82
+ "**/*.config.mts",
83
+ "**/*.config.js",
84
+ "**/*.config.mjs"
85
+ ],
86
+ rules: { "birbprophet/no-process-env": "off" }
87
+ }
88
+ ];
89
+ const atError = (prefix, rules) => R.fromEntries(Arr.map(rules, (rule) => [`${prefix}/${rule}`, "error"]));
90
+ const effectRules = atError(plugin.meta.name, R.keys(plugin.rules));
91
+ const birbprophetRules = atError(plugin$1.meta.name, R.keys(plugin$1.rules));
92
+ const { ignorePatterns: coreIgnores = [] } = ultraciteCore;
93
+ const resolved = (specifier) => decodeURIComponent(new URL(import.meta.resolve(specifier)).pathname);
94
+ const ownExtension = Str.slice(Str.lastIndexOf(".")(import.meta.filename).pipe(Option.getOrElse(() => -1)))(import.meta.filename);
95
+ const sibling = (module) => resolved(`./${module}${ownExtension}`);
96
+ const exceptionTier = (exception) => ({
97
+ files: [...exception.files],
98
+ rules: R.fromEntries(Arr.map(exception.rules, (rule) => [rule, "off"]))
99
+ });
100
+ const lint = ({ ignores = [] } = {}) => ({
101
+ plugins,
102
+ categories,
103
+ jsPlugins: [
104
+ {
105
+ name: "vite-plus",
106
+ specifier: resolved("vite-plus/oxlint-plugin")
107
+ },
108
+ {
109
+ name: "foldkit",
110
+ specifier: sibling("foldkit-plugin")
111
+ },
112
+ {
113
+ name: plugin.meta.name,
114
+ specifier: sibling("effect-plugin")
115
+ },
116
+ {
117
+ name: plugin$1.meta.name,
118
+ specifier: sibling("plugin")
119
+ }
120
+ ],
121
+ options: {
122
+ typeAware: true,
123
+ typeCheck: true
124
+ },
125
+ rules: {
126
+ ...foldkitPreset.rules,
127
+ ...staticRules,
128
+ "vite-plus/prefer-vite-plus-imports": "error",
129
+ ...effectRules,
130
+ ...birbprophetRules,
131
+ ...effectTsgoRules
132
+ },
133
+ overrides: [
134
+ ...foldkitPreset.overrides,
135
+ ...toolchainScopes,
136
+ ...Arr.map(exceptions, exceptionTier)
137
+ ],
138
+ ignorePatterns: [...coreIgnores, ...ignores]
139
+ });
140
+ export { toolchainScopes as a, lint as i, effectRules as n, foldkitPreset as r, birbprophetRules as t };
package/dist/lint.mjs CHANGED
@@ -1,140 +1 @@
1
- import { t as plugin } from "./effect-plugin-kYxB-5LJ.mjs";
2
- import { effectTsgoPlugin, effectTsgoRules } from "./effect-tsgo.mjs";
3
- import { exceptions } from "./exceptions.mjs";
4
- import { t as plugin$1 } from "./plugin-BoBRGtGf.mjs";
5
- import { staticRules } from "./rules.mjs";
6
- import * as Arr from "effect/Array";
7
- import * as Option from "effect/Option";
8
- import * as R from "effect/Record";
9
- import * as Schema from "effect/Schema";
10
- import * as Str from "effect/String";
11
- import foldkitRecommended from "@foldkit/oxlint-plugin/recommended.json" with { type: "json" };
12
- import ultraciteCore from "ultracite/oxlint/core";
13
- // src/lint.ts
14
- const plugins = [
15
- "typescript",
16
- "import",
17
- "promise",
18
- "unicorn",
19
- "oxc",
20
- "eslint",
21
- "node",
22
- "vitest",
23
- effectTsgoPlugin
24
- ];
25
- const categories = {
26
- correctness: "error",
27
- suspicious: "error",
28
- pedantic: "off",
29
- perf: "off",
30
- style: "off",
31
- restriction: "off",
32
- nursery: "off"
33
- };
34
- const PresetRules = Schema.Record(Schema.String, Schema.Literals(["error", "off"]));
35
- const Globs = Schema.mutable(Schema.Array(Schema.String));
36
- const FoldkitPreset = Schema.Struct({
37
- jsPlugins: Schema.Array(Schema.Struct({
38
- name: Schema.String,
39
- specifier: Schema.String
40
- })),
41
- rules: PresetRules,
42
- overrides: Schema.Array(Schema.Struct({
43
- files: Globs,
44
- excludeFiles: Schema.optionalKey(Globs),
45
- rules: PresetRules
46
- }))
47
- });
48
- const foldkitPreset = Schema.decodeUnknownSync(FoldkitPreset)(foldkitRecommended);
49
- const testFiles = [
50
- "**/*.test.ts",
51
- "**/*.test.tsx",
52
- "**/*.spec.ts",
53
- "**/*.spec.tsx",
54
- "**/*.fake.ts",
55
- "**/*.fake.tsx",
56
- "**/tests/**",
57
- "**/test/**"
58
- ];
59
- const toolchainScopes = [
60
- {
61
- files: ["**/*.astro"],
62
- rules: { "unicorn/prefer-module": "off" }
63
- },
64
- ...Arr.map(Arr.filter(foldkitPreset.overrides, (scope) => scope.files.includes("**/*.test.ts") && scope.excludeFiles === void 0), ({ rules }) => ({
65
- files: ["**/tests/**", "**/test/**"],
66
- rules
67
- })),
68
- {
69
- files: testFiles,
70
- rules: {
71
- "effecttsgo/lazy-effect": "off",
72
- "eslint/no-extend-native": "off",
73
- "typescript/unbound-method": "off",
74
- "typescript/no-deprecated": "off",
75
- "effect/use-temp-file-scoped": "off",
76
- "birbprophet/no-process-env": "off"
77
- }
78
- },
79
- {
80
- files: [
81
- "**/*.config.ts",
82
- "**/*.config.mts",
83
- "**/*.config.js",
84
- "**/*.config.mjs"
85
- ],
86
- rules: { "birbprophet/no-process-env": "off" }
87
- }
88
- ];
89
- const atError = (prefix, rules) => R.fromEntries(Arr.map(rules, (rule) => [`${prefix}/${rule}`, "error"]));
90
- const effectRules = atError(plugin.meta.name, R.keys(plugin.rules));
91
- const birbprophetRules = atError(plugin$1.meta.name, R.keys(plugin$1.rules));
92
- const { ignorePatterns: coreIgnores = [] } = ultraciteCore;
93
- const resolved = (specifier) => decodeURIComponent(new URL(import.meta.resolve(specifier)).pathname);
94
- const ownExtension = Str.slice(Str.lastIndexOf(".")(import.meta.filename).pipe(Option.getOrElse(() => -1)))(import.meta.filename);
95
- const sibling = (module) => resolved(`./${module}${ownExtension}`);
96
- const exceptionTier = (exception) => ({
97
- files: [...exception.files],
98
- rules: R.fromEntries(Arr.map(exception.rules, (rule) => [rule, "off"]))
99
- });
100
- const lint = ({ ignores = [] } = {}) => ({
101
- plugins,
102
- categories,
103
- jsPlugins: [
104
- {
105
- name: "vite-plus",
106
- specifier: resolved("vite-plus/oxlint-plugin")
107
- },
108
- {
109
- name: "foldkit",
110
- specifier: sibling("foldkit-plugin")
111
- },
112
- {
113
- name: plugin.meta.name,
114
- specifier: sibling("effect-plugin")
115
- },
116
- {
117
- name: plugin$1.meta.name,
118
- specifier: sibling("plugin")
119
- }
120
- ],
121
- options: {
122
- typeAware: true,
123
- typeCheck: true
124
- },
125
- rules: {
126
- ...foldkitPreset.rules,
127
- ...staticRules,
128
- "vite-plus/prefer-vite-plus-imports": "error",
129
- ...effectRules,
130
- ...birbprophetRules,
131
- ...effectTsgoRules
132
- },
133
- overrides: [
134
- ...foldkitPreset.overrides,
135
- ...toolchainScopes,
136
- ...Arr.map(exceptions, exceptionTier)
137
- ],
138
- ignorePatterns: [...coreIgnores, ...ignores]
139
- });
140
- export { birbprophetRules, effectRules, foldkitPreset, lint, toolchainScopes };
1
+ export { t as birbprophetRules, n as effectRules, r as foldkitPreset, i as lint, a as toolchainScopes } from "./lint-JSnPsGO1.mjs";
@@ -0,0 +1 @@
1
+ export {}
package/dist/proof.mjs ADDED
@@ -0,0 +1,141 @@
1
+ #!/usr/bin/env bun
2
+ import * as Data from "effect/Data";
3
+ import * as Schema from "effect/Schema";
4
+ import * as Effect from "effect/Effect";
5
+ import { FileSystem } from "effect/FileSystem";
6
+ import { Path } from "effect/Path";
7
+ import { ChildProcess } from "effect/process";
8
+ import * as Stream from "effect/Stream";
9
+ import { NodeServices } from "@effect/platform-node";
10
+ import { Octokit } from "@octokit/rest";
11
+ import * as Cause from "effect/Cause";
12
+ import * as Config from "effect/Config";
13
+ import { Base64 } from "effect/encoding";
14
+ import * as Exit from "effect/Exit";
15
+ import * as Redacted from "effect/Redacted";
16
+ // src/proof.ts
17
+ var ProofError = class extends Data.TaggedError("ProofError") {};
18
+ const kinds = /* @__PURE__ */ new Map([
19
+ [".png", "image"],
20
+ [".jpg", "image"],
21
+ [".jpeg", "image"],
22
+ [".gif", "image"],
23
+ [".webp", "image"],
24
+ [".mp4", "video"],
25
+ [".webm", "video"],
26
+ [".mov", "video"]
27
+ ]);
28
+ const github = (request) => Effect.tryPromise({
29
+ try: request,
30
+ catch: (cause) => new ProofError({ message: cause instanceof Error ? cause.message : String(cause) })
31
+ });
32
+ const preview = Effect.fn("proof.preview")(function* (file, gif) {
33
+ const ffmpeg = yield* ChildProcess.make("ffmpeg", [
34
+ "-loglevel",
35
+ "error",
36
+ "-i",
37
+ file,
38
+ "-t",
39
+ "30",
40
+ "-vf",
41
+ "fps=8,scale='min(720,iw)':-2:flags=lanczos,split[a][b];[a]palettegen[p];[b][p]paletteuse",
42
+ "-loop",
43
+ "0",
44
+ gif
45
+ ], { stdin: "ignore" }).pipe(Effect.mapError(() => new ProofError({ message: `A video needs ffmpeg: ${file}` })));
46
+ const [stderr, code] = yield* Effect.all([ffmpeg.stderr.pipe(Stream.decodeText, Stream.mkString), ffmpeg.exitCode], { concurrency: "unbounded" });
47
+ if (Number(code) !== 0) return yield* new ProofError({ message: `ffmpeg failed for ${file}: ${stderr}` });
48
+ return gif;
49
+ });
50
+ const proof = Effect.fn("proof")(function* (octokit, owner, repo, files) {
51
+ const fs = yield* FileSystem;
52
+ const path = yield* Path;
53
+ const media = yield* Effect.forEach(files, (file, index) => {
54
+ const kind = kinds.get(path.extname(file).toLowerCase());
55
+ return kind === void 0 ? new ProofError({ message: `Unknown extension: ${file}` }) : Effect.succeed({
56
+ file,
57
+ kind,
58
+ name: `${index + 1}-${path.basename(file).replaceAll(/[^\w.-]/gu, "-")}`
59
+ });
60
+ }, { concurrency: 1 });
61
+ const { data: repository } = yield* github(() => octokit.rest.repos.get({
62
+ owner,
63
+ repo
64
+ }));
65
+ if (repository.visibility !== "private") return yield* new ProofError({ message: `${owner}/${repo} is not private, so proof stays local` });
66
+ const temporary = yield* fs.makeTempDirectoryScoped({ prefix: "proof-" });
67
+ const uploads = yield* Effect.forEach(media, ({ file, kind, name }) => {
68
+ if (kind === "image") return Effect.succeed([{
69
+ file,
70
+ name
71
+ }]);
72
+ return Effect.map(preview(file, path.join(temporary, `${name}.gif`)), (gif) => [{
73
+ file,
74
+ name
75
+ }, {
76
+ file: gif,
77
+ name: `${name}.gif`
78
+ }]);
79
+ }, { concurrency: 1 });
80
+ const tree = yield* Effect.forEach(uploads.flat(), ({ file, name }) => Effect.gen(function* () {
81
+ const content = Base64.encode(yield* fs.readFile(file));
82
+ const { data } = yield* github(() => octokit.rest.git.createBlob({
83
+ owner,
84
+ repo,
85
+ encoding: "base64",
86
+ content
87
+ }));
88
+ return {
89
+ path: name,
90
+ mode: "100644",
91
+ type: "blob",
92
+ sha: data.sha
93
+ };
94
+ }), { concurrency: 1 });
95
+ const { data: root } = yield* github(() => octokit.rest.git.createTree({
96
+ owner,
97
+ repo,
98
+ tree
99
+ }));
100
+ const { data: commit } = yield* github(() => octokit.rest.git.createCommit({
101
+ owner,
102
+ repo,
103
+ tree: root.sha,
104
+ parents: [],
105
+ message: "Verifier proof"
106
+ }));
107
+ yield* github(() => octokit.rest.git.createRef({
108
+ owner,
109
+ repo,
110
+ ref: `refs/proof/${commit.sha}`,
111
+ sha: commit.sha
112
+ }));
113
+ const url = (name) => `https://github.com/${[
114
+ owner,
115
+ repo,
116
+ "raw",
117
+ commit.sha,
118
+ name
119
+ ].map(encodeURIComponent).join("/")}`;
120
+ return media.map(({ name, kind }) => kind === "image" ? `![${name}](${url(name)})` : `[![${name}](${url(`${name}.gif`)})](${url(name)})`);
121
+ }, Effect.scoped);
122
+ if (import.meta.main) {
123
+ const [repository = "", ...files] = process.argv.slice(2);
124
+ const [, owner, repo] = /^([^/#\s]+)\/([^/#\s]+)$/u.exec(repository) ?? [];
125
+ if (owner === void 0 || repo === void 0 || files.length === 0) {
126
+ process.stderr.write("usage: proof <owner/repo> <file>...\n");
127
+ process.exitCode = 2;
128
+ } else {
129
+ const exit = await Effect.runPromiseExit(Effect.gen(function* () {
130
+ const token = yield* Config.schema(Schema.Redacted(Schema.NonEmptyString), "GH_TOKEN").pipe(Config.orElse(() => Config.schema(Schema.Redacted(Schema.NonEmptyString), "GITHUB_TOKEN")), Effect.mapError(() => new ProofError({ message: "Missing GH_TOKEN or GITHUB_TOKEN" })));
131
+ return yield* proof(new Octokit({ auth: Redacted.value(token) }), owner, repo, files);
132
+ }).pipe(Effect.provide(NodeServices.layer)));
133
+ if (Exit.isSuccess(exit)) process.stdout.write(`${exit.value.join("\n")}\n`);
134
+ else {
135
+ const error = Cause.squash(exit.cause);
136
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
137
+ process.exitCode = 1;
138
+ }
139
+ }
140
+ }
141
+ export {};
@@ -0,0 +1,117 @@
1
+ const staticRules = {
2
+ "effecttsgo/any-unknown-in-error-context": "off",
3
+ "effecttsgo/strict-effect-provide": "off",
4
+ "eslint/array-callback-return": "error",
5
+ "eslint/constructor-super": "off",
6
+ "eslint/eqeqeq": ["error", "always"],
7
+ "eslint/getter-return": "off",
8
+ "eslint/no-case-declarations": "error",
9
+ "eslint/no-class-assign": "off",
10
+ "eslint/no-console": "error",
11
+ "eslint/no-const-assign": "off",
12
+ "eslint/no-constructor-return": "error",
13
+ "eslint/no-delete-var": "off",
14
+ "eslint/no-dupe-class-members": "off",
15
+ "eslint/no-dupe-keys": "off",
16
+ "eslint/no-empty": "error",
17
+ "eslint/no-fallthrough": "error",
18
+ "eslint/no-func-assign": "off",
19
+ "eslint/no-implied-eval": "off",
20
+ "eslint/no-import-assign": "off",
21
+ "eslint/no-new-func": "error",
22
+ "eslint/no-new-native-nonconstructor": "off",
23
+ "eslint/no-new-wrappers": "error",
24
+ "eslint/no-obj-calls": "off",
25
+ "eslint/no-promise-executor-return": "error",
26
+ "eslint/no-proto": "error",
27
+ "eslint/no-prototype-builtins": "error",
28
+ "eslint/no-restricted-globals": [
29
+ "error",
30
+ "__dirname",
31
+ "__filename"
32
+ ],
33
+ "eslint/no-restricted-imports": ["error", { paths: [{
34
+ name: "vitest",
35
+ message: "Import test utilities from '@effect/vitest' instead of raw 'vitest'."
36
+ }, {
37
+ name: "vite-plus/test",
38
+ message: "Import test utilities from '@effect/vitest' instead of 'vite-plus/test'."
39
+ }] }],
40
+ "eslint/no-return-assign": "error",
41
+ "eslint/no-script-url": "error",
42
+ "eslint/no-self-compare": "error",
43
+ "eslint/no-sequences": "error",
44
+ "eslint/no-setter-return": "off",
45
+ "eslint/no-shadow": "off",
46
+ "eslint/no-template-curly-in-string": "error",
47
+ "eslint/no-this-before-super": "off",
48
+ "eslint/no-underscore-dangle": "off",
49
+ "eslint/no-unneeded-ternary": "off",
50
+ "eslint/no-unreachable-loop": "error",
51
+ "eslint/no-unsafe-negation": "off",
52
+ "eslint/no-useless-call": "error",
53
+ "eslint/no-useless-concat": "off",
54
+ "eslint/no-var": "error",
55
+ "eslint/no-with": "off",
56
+ "eslint/valid-typeof": "off",
57
+ "import/default": "off",
58
+ "import/namespace": "off",
59
+ "import/no-cycle": "error",
60
+ "import/no-mutable-exports": "error",
61
+ "import/no-unassigned-import": "off",
62
+ "node/no-process-env": "off",
63
+ "oxc/bad-bitwise-operator": "error",
64
+ "oxc/no-accumulating-spread": "error",
65
+ "promise/always-return": "off",
66
+ "promise/no-return-in-finally": "error",
67
+ "promise/valid-params": "off",
68
+ "typescript/ban-ts-comment": "error",
69
+ "typescript/method-signature-style": "error",
70
+ "typescript/no-deprecated": "error",
71
+ "typescript/no-empty-object-type": "error",
72
+ "typescript/no-explicit-any": "error",
73
+ "typescript/no-extraneous-class": "off",
74
+ "typescript/no-import-type-side-effects": "error",
75
+ "typescript/no-invalid-void-type": "error",
76
+ "typescript/no-misused-promises": "error",
77
+ "typescript/no-non-null-assertion": "error",
78
+ "typescript/no-unnecessary-boolean-literal-compare": "off",
79
+ "typescript/no-unnecessary-condition": "error",
80
+ "typescript/no-unnecessary-template-expression": "off",
81
+ "typescript/no-unnecessary-type-arguments": "off",
82
+ "typescript/no-unnecessary-type-constraint": "off",
83
+ "typescript/no-unnecessary-type-conversion": "off",
84
+ "typescript/no-unsafe-argument": "error",
85
+ "typescript/no-unsafe-assignment": "error",
86
+ "typescript/no-unsafe-call": "error",
87
+ "typescript/no-unsafe-function-type": "error",
88
+ "typescript/no-unsafe-member-access": "error",
89
+ "typescript/no-unsafe-return": "error",
90
+ "typescript/only-throw-error": "error",
91
+ "typescript/prefer-nullish-coalescing": "error",
92
+ "typescript/prefer-promise-reject-errors": "error",
93
+ "typescript/related-getter-setter-pairs": "error",
94
+ "typescript/require-await": "error",
95
+ "typescript/restrict-plus-operands": "error",
96
+ "typescript/strict-boolean-expressions": "error",
97
+ "typescript/switch-exhaustiveness-check": "error",
98
+ "typescript/use-unknown-in-catch-callback-variable": "error",
99
+ "unicorn/consistent-function-scoping": "off",
100
+ "unicorn/new-for-builtins": "error",
101
+ "unicorn/no-abusive-eslint-disable": "error",
102
+ "unicorn/no-document-cookie": "off",
103
+ "unicorn/no-negation-in-equality-check": "error",
104
+ "unicorn/no-new-buffer": "error",
105
+ "unicorn/no-object-as-default-parameter": "error",
106
+ "unicorn/no-unnecessary-await": "off",
107
+ "unicorn/require-post-message-target-origin": "off",
108
+ "unicorn/prefer-module": "error",
109
+ "unicorn/prefer-number-properties": "error",
110
+ "vitest/expect-expect": "off",
111
+ "vitest/no-identical-title": "error",
112
+ "vitest/no-import-node-test": "error",
113
+ "vitest/no-standalone-expect": "off",
114
+ "vitest/valid-expect": ["error", { maxArgs: 2 }],
115
+ "vitest/valid-title": ["error", { allowArguments: true }]
116
+ };
117
+ export { staticRules as t };
package/dist/rules.mjs CHANGED
@@ -1,117 +1 @@
1
- const staticRules = {
2
- "effecttsgo/any-unknown-in-error-context": "off",
3
- "effecttsgo/strict-effect-provide": "off",
4
- "eslint/array-callback-return": "error",
5
- "eslint/constructor-super": "off",
6
- "eslint/eqeqeq": ["error", "always"],
7
- "eslint/getter-return": "off",
8
- "eslint/no-case-declarations": "error",
9
- "eslint/no-class-assign": "off",
10
- "eslint/no-console": "error",
11
- "eslint/no-const-assign": "off",
12
- "eslint/no-constructor-return": "error",
13
- "eslint/no-delete-var": "off",
14
- "eslint/no-dupe-class-members": "off",
15
- "eslint/no-dupe-keys": "off",
16
- "eslint/no-empty": "error",
17
- "eslint/no-fallthrough": "error",
18
- "eslint/no-func-assign": "off",
19
- "eslint/no-implied-eval": "off",
20
- "eslint/no-import-assign": "off",
21
- "eslint/no-new-func": "error",
22
- "eslint/no-new-native-nonconstructor": "off",
23
- "eslint/no-new-wrappers": "error",
24
- "eslint/no-obj-calls": "off",
25
- "eslint/no-promise-executor-return": "error",
26
- "eslint/no-proto": "error",
27
- "eslint/no-prototype-builtins": "error",
28
- "eslint/no-restricted-globals": [
29
- "error",
30
- "__dirname",
31
- "__filename"
32
- ],
33
- "eslint/no-restricted-imports": ["error", { paths: [{
34
- name: "vitest",
35
- message: "Import test utilities from '@effect/vitest' instead of raw 'vitest'."
36
- }, {
37
- name: "vite-plus/test",
38
- message: "Import test utilities from '@effect/vitest' instead of 'vite-plus/test'."
39
- }] }],
40
- "eslint/no-return-assign": "error",
41
- "eslint/no-script-url": "error",
42
- "eslint/no-self-compare": "error",
43
- "eslint/no-sequences": "error",
44
- "eslint/no-setter-return": "off",
45
- "eslint/no-shadow": "off",
46
- "eslint/no-template-curly-in-string": "error",
47
- "eslint/no-this-before-super": "off",
48
- "eslint/no-underscore-dangle": "off",
49
- "eslint/no-unneeded-ternary": "off",
50
- "eslint/no-unreachable-loop": "error",
51
- "eslint/no-unsafe-negation": "off",
52
- "eslint/no-useless-call": "error",
53
- "eslint/no-useless-concat": "off",
54
- "eslint/no-var": "error",
55
- "eslint/no-with": "off",
56
- "eslint/valid-typeof": "off",
57
- "import/default": "off",
58
- "import/namespace": "off",
59
- "import/no-cycle": "error",
60
- "import/no-mutable-exports": "error",
61
- "import/no-unassigned-import": "off",
62
- "node/no-process-env": "off",
63
- "oxc/bad-bitwise-operator": "error",
64
- "oxc/no-accumulating-spread": "error",
65
- "promise/always-return": "off",
66
- "promise/no-return-in-finally": "error",
67
- "promise/valid-params": "off",
68
- "typescript/ban-ts-comment": "error",
69
- "typescript/method-signature-style": "error",
70
- "typescript/no-deprecated": "error",
71
- "typescript/no-empty-object-type": "error",
72
- "typescript/no-explicit-any": "error",
73
- "typescript/no-extraneous-class": "off",
74
- "typescript/no-import-type-side-effects": "error",
75
- "typescript/no-invalid-void-type": "error",
76
- "typescript/no-misused-promises": "error",
77
- "typescript/no-non-null-assertion": "error",
78
- "typescript/no-unnecessary-boolean-literal-compare": "off",
79
- "typescript/no-unnecessary-condition": "error",
80
- "typescript/no-unnecessary-template-expression": "off",
81
- "typescript/no-unnecessary-type-arguments": "off",
82
- "typescript/no-unnecessary-type-constraint": "off",
83
- "typescript/no-unnecessary-type-conversion": "off",
84
- "typescript/no-unsafe-argument": "error",
85
- "typescript/no-unsafe-assignment": "error",
86
- "typescript/no-unsafe-call": "error",
87
- "typescript/no-unsafe-function-type": "error",
88
- "typescript/no-unsafe-member-access": "error",
89
- "typescript/no-unsafe-return": "error",
90
- "typescript/only-throw-error": "error",
91
- "typescript/prefer-nullish-coalescing": "error",
92
- "typescript/prefer-promise-reject-errors": "error",
93
- "typescript/related-getter-setter-pairs": "error",
94
- "typescript/require-await": "error",
95
- "typescript/restrict-plus-operands": "error",
96
- "typescript/strict-boolean-expressions": "error",
97
- "typescript/switch-exhaustiveness-check": "error",
98
- "typescript/use-unknown-in-catch-callback-variable": "error",
99
- "unicorn/consistent-function-scoping": "off",
100
- "unicorn/new-for-builtins": "error",
101
- "unicorn/no-abusive-eslint-disable": "error",
102
- "unicorn/no-document-cookie": "off",
103
- "unicorn/no-negation-in-equality-check": "error",
104
- "unicorn/no-new-buffer": "error",
105
- "unicorn/no-object-as-default-parameter": "error",
106
- "unicorn/no-unnecessary-await": "off",
107
- "unicorn/require-post-message-target-origin": "off",
108
- "unicorn/prefer-module": "error",
109
- "unicorn/prefer-number-properties": "error",
110
- "vitest/expect-expect": "off",
111
- "vitest/no-identical-title": "error",
112
- "vitest/no-import-node-test": "error",
113
- "vitest/no-standalone-expect": "off",
114
- "vitest/valid-expect": ["error", { maxArgs: 2 }],
115
- "vitest/valid-title": ["error", { allowArguments: true }]
116
- };
117
- export { staticRules };
1
+ export { t as staticRules } from "./rules-vHmNoAU0.mjs";