@r_masseater/msch 0.38.1 → 0.40.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/dist/{cli-contract-mzluqQvf.mjs → cli-contract-8SnKqhGw.mjs} +2 -2
- package/dist/{cli-contract-mzluqQvf.mjs.map → cli-contract-8SnKqhGw.mjs.map} +1 -1
- package/dist/cli.mjs +721 -263
- package/dist/cli.mjs.map +1 -1
- package/dist/config.d.mts +3 -1
- package/dist/config.mjs +4 -3
- package/dist/config.mjs.map +1 -1
- package/dist/decision-rules.d.mts +1 -1
- package/dist/decision-rules.mjs +1 -1
- package/dist/{define-lint-preset-BsiifqPn.mjs → define-lint-preset-BYMl7wof.mjs} +63 -7
- package/dist/define-lint-preset-BYMl7wof.mjs.map +1 -0
- package/dist/{index-4dm7Z_mh.d.mts → index-CcVKuHBw.d.mts} +4 -2
- package/dist/{index-BOXkKig9.d.mts → index-lM4Pphgz.d.mts} +9 -3
- package/dist/lint.d.mts +2 -2
- package/dist/lint.mjs +1 -1
- package/dist/oxlint.mjs +1 -1
- package/dist/{package-DnxpBVTG.mjs → package-A62qq8pE.mjs} +11 -4
- package/dist/package-A62qq8pE.mjs.map +1 -0
- package/dist/{repository-files-R0NW0NE9.mjs → repository-files-CorshdqY.mjs} +3 -4
- package/dist/repository-files-CorshdqY.mjs.map +1 -0
- package/dist/workspace-settings.d.mts +1 -1
- package/dist/workspace-settings.mjs +9 -4
- package/dist/workspace-settings.mjs.map +1 -1
- package/package.json +2 -1
- package/src/app/vite.d.ts +2 -0
- package/dist/define-lint-preset-BsiifqPn.mjs.map +0 -1
- package/dist/package-DnxpBVTG.mjs.map +0 -1
- package/dist/repository-files-R0NW0NE9.mjs.map +0 -1
package/dist/config.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { s as WorkspaceSettings } from "./index-
|
|
1
|
+
import { s as WorkspaceSettings } from "./index-CcVKuHBw.mjs";
|
|
2
|
+
import { t as MarkdownOptions } from "./index-lM4Pphgz.mjs";
|
|
2
3
|
import { ToolSections } from "@r_masseater/vite-plus-adopt";
|
|
3
4
|
import { UserConfig } from "vite-plus";
|
|
4
5
|
import { OxlintOverride } from "vite-plus/lint";
|
|
@@ -19,6 +20,7 @@ export interface RepositoryOptions {
|
|
|
19
20
|
readonly overrides?: readonly OxlintOverride[];
|
|
20
21
|
readonly secrets?: SecretOptions;
|
|
21
22
|
readonly textlint?: TextOptions;
|
|
23
|
+
readonly markdown?: MarkdownOptions;
|
|
22
24
|
readonly run?: {
|
|
23
25
|
readonly tasks?: Readonly<Record<string, string>>;
|
|
24
26
|
};
|
package/dist/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as lint, f as decisionTestRules, n as textlintPresets, p as generated, r as steigerRules, s as requiredStack, t as markdownOf } from "./define-lint-preset-BYMl7wof.mjs";
|
|
2
2
|
import { Array, Record, pipe } from "effect";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
// src/app/repository-tasks.ts
|
|
@@ -66,7 +66,7 @@ const tasksOf = ({ workspace, commands }) => {
|
|
|
66
66
|
},
|
|
67
67
|
msch: {
|
|
68
68
|
command: "msch",
|
|
69
|
-
dependsOn: ["check"],
|
|
69
|
+
dependsOn: ["check", ...workspace.tasks.native],
|
|
70
70
|
cache: false
|
|
71
71
|
},
|
|
72
72
|
audit: {
|
|
@@ -148,7 +148,7 @@ const lintOf = ({ workspace, overrides = [] }) => ({
|
|
|
148
148
|
]
|
|
149
149
|
});
|
|
150
150
|
const repositoryConfig = (options) => {
|
|
151
|
-
const { workspace, secrets = {}, textlint = {}, run = {} } = options;
|
|
151
|
+
const { workspace, secrets = {}, textlint = {}, markdown = {}, run = {} } = options;
|
|
152
152
|
return {
|
|
153
153
|
commitlint: { extends: [COMMIT_CONVENTION] },
|
|
154
154
|
dependencyRules: {
|
|
@@ -166,6 +166,7 @@ const repositoryConfig = (options) => {
|
|
|
166
166
|
rules: steigerRules
|
|
167
167
|
},
|
|
168
168
|
textlint: textlintOf(textlint),
|
|
169
|
+
y8: markdownOf(markdown),
|
|
169
170
|
test: {
|
|
170
171
|
projects: [...workspace.testProjects],
|
|
171
172
|
passWithNoTests: true
|
package/dist/config.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":["Rec","Arr","preset","Rec"],"sources":["../src/app/repository-tasks.ts","../src/app/repository-text.ts","../src/app/repository-config.ts"],"sourcesContent":["import { Record as Rec } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\n\ntype Tasks = NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]>;\n\nexport interface TaskOptions {\n readonly workspace: WorkspaceSettings;\n readonly commands: Readonly<Record<string, string>>;\n}\n\nconst NOT_INPUTS = [\n \"!node_modules/.pnpm-store\",\n \"!node_modules/.pnpm-store/**\",\n \"!node_modules/.tmp\",\n \"!node_modules/.tmp/**\",\n \"!target/**\",\n \"!node_modules/.vitest-cache/**\",\n \"!node_modules/.cache/**\",\n];\n\nconst UNTRACKED_ENV = [\n \"CLOUDFLARE_ACCOUNT_ID\",\n \"CLOUDFLARE_AI_GATEWAY_ID\",\n \"CLOUDFLARE_API_TOKEN\",\n \"CLAUDECODE\",\n \"CLAUDE_CODE_REMOTE\",\n \"GITHUB_ACTIONS\",\n \"HTTPS_PROXY\",\n \"https_proxy\",\n \"NO_PROXY\",\n \"no_proxy\",\n \"SSL_CERT_FILE\",\n \"NODE_EXTRA_CA_CERTS\",\n];\n\nconst FALLOW = [\n \"fallow --skip dupes --fail-on-issues --quiet --format compact\",\n \"fallow dead-code --no-production --fail-on-issues --quiet --format compact\",\n \"fallow dead-code --no-production --quiet --format json | jq -n 'input | {prop_drilling_chains, thin_wrappers, duplicate_prop_shapes} | with_entries(select(.value | length > 0)) | if length > 0 then halt_error else empty end'\",\n \"fallow dupes --fail-on-issues --quiet --format compact\",\n \"fallow security --fail-on-issues --quiet\",\n];\n\nconst AUDIT =\n 'before=\"$(cksum pnpm-workspace.yaml)\"; vp pm audit --fix || exit; if [ \"$before\" != \"$(cksum pnpm-workspace.yaml)\" ]; then echo \"vp pm audit --fix rewrote pnpm-workspace.yaml. Run vp install and commit the diff.\" >&2; exit 1; fi';\n\nexport const tasksOf = ({\n workspace,\n commands,\n}: TaskOptions): NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]> => {\n const inputs = [{ auto: true }, ...workspace.ignoredDirectories, ...NOT_INPUTS];\n const checks: Tasks = {\n fallow: {\n command: FALLOW,\n cache: {\n input: [...inputs, \"!.fallow/**\", \"!**/dist/**\", \"!**/.fallow-verified\"],\n output: [],\n },\n },\n check: {\n command: \"GOMEMLIMIT=4GiB vp check --deny-warnings\",\n cache: { input: inputs, untrackedEnv: UNTRACKED_ENV },\n },\n test: {\n command: \"vp test run\",\n dependsOn: [\"check\"],\n cache: { input: [...inputs, \"!**/.cache/**\"] },\n },\n msch: { command: \"msch\", dependsOn: [\"check\"], cache: false },\n audit: { command: AUDIT, cache: false },\n ...commands,\n };\n return {\n ...checks,\n verify: { command: [], dependsOn: [...workspace.tasks.verify, ...Rec.keys(checks)] },\n };\n};\n","import type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Array as Arr, pipe } from \"effect\";\n\nimport { textlintPresets } from \"#/features/define-lint-preset/index.ts\";\n\nexport interface TextOptions {\n readonly ignores?: readonly string[];\n readonly kanji?: readonly string[];\n readonly technicalWriting?: Readonly<Record<string, boolean | object>>;\n readonly rules?: Readonly<Record<string, boolean | object>>;\n readonly filters?: Readonly<Record<string, boolean | object>>;\n readonly sources?: NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"sources\"]>;\n}\n\nexport interface SecretOptions {\n readonly lines?: readonly string[];\n readonly paths?: readonly string[];\n}\n\nconst TEXT_IGNORES = [\"AGENTS.md\", \".agents/skills/**\", \"CHANGELOG.md\"];\nconst SENTENCE_LENGTH = 120;\nconst KANJI_RUN = 6;\nconst PUBLIC_LINES = [String.raw`\\bCF_BEACON_TOKEN = \"[0-9a-f]{32}\"`];\n\nexport const textlintOf = ({\n ignores = [],\n kanji = [],\n technicalWriting = {},\n rules = {},\n filters = {},\n sources = [],\n}: TextOptions): NonNullable<ToolSections[\"textlint\"]> => ({\n ignores: [...TEXT_IGNORES, ...ignores],\n presets: textlintPresets,\n sources,\n filters: { ...filters },\n rules: {\n \"@textlint-ja/preset-ai-writing\": true,\n \"@r_masseater/preset-ja\": true,\n \"preset-ja-technical-writing\": {\n \"sentence-length\": { max: SENTENCE_LENGTH },\n \"ja-no-mixed-period\": { allowPeriodMarks: [\":\"] },\n \"no-mix-dearu-desumasu\": { preferInBody: \"である\", preferInList: \"である\" },\n \"max-kanji-continuous-len\": { max: KANJI_RUN, allow: [...kanji] },\n ...technicalWriting,\n },\n ...rules,\n },\n});\n\nconst anyOf =\n (subject: string) =>\n (patterns: readonly string[]): readonly string[] => {\n if (Arr.isReadonlyArrayEmpty(patterns)) {\n return [];\n }\n const listed = pipe(\n patterns,\n Arr.map((pattern) => `\\`${pattern}\\``),\n Arr.join(\", \"),\n );\n return [`matchesAny(${subject}, [${listed}])`];\n };\n\nexport const betterleaksOf = ({\n lines = [],\n paths = [],\n}: SecretOptions): NonNullable<ToolSections[\"betterleaks\"]> => ({\n extend: { useDefault: true },\n filter: pipe(\n [...anyOf(\"finding.line\")([...PUBLIC_LINES, ...lines]), ...anyOf(`attributes[\"path\"]`)(paths)],\n Arr.join(\" || \"),\n ),\n});\n","import { fileURLToPath } from \"node:url\";\n\nimport { Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\nimport type { OxlintOverride } from \"vite-plus/lint\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\nimport {\n decisionTestRules,\n generated,\n lint as preset,\n requiredStack,\n steigerRules,\n} from \"#/features/define-lint-preset/index.ts\";\n\nimport { tasksOf } from \"./repository-tasks.ts\";\nimport { betterleaksOf, textlintOf } from \"./repository-text.ts\";\nimport type { SecretOptions, TextOptions } from \"./repository-text.ts\";\n\nexport interface RepositoryOptions {\n readonly workspace: WorkspaceSettings;\n readonly overrides?: readonly OxlintOverride[];\n readonly secrets?: SecretOptions;\n readonly textlint?: TextOptions;\n readonly run?: { readonly tasks?: Readonly<Record<string, string>> };\n}\n\nconst COMMIT_CONVENTION = fileURLToPath(import.meta.resolve(\"@commitlint/config-conventional\"));\n\nconst lintOf = ({\n workspace,\n overrides = [],\n}: RepositoryOptions): NonNullable<UserConfig[\"lint\"]> => ({\n ...preset,\n ignorePatterns: [...generated, ...workspace.lint.ignorePatterns],\n overrides: [\n ...preset.overrides,\n {\n files: [...workspace.lint.shadcnUi],\n rules: { \"react/jsx-props-no-spreading\": \"off\" },\n },\n {\n files: [...workspace.lint.publicEntries, ...workspace.lint.deployEntries],\n rules: { \"import/no-default-export\": \"off\" },\n },\n ...overrides,\n ...workspace.lint.overrides,\n { files: [\"**/*.test.ts\"], rules: decisionTestRules },\n ],\n});\n\nexport const repositoryConfig = (options: RepositoryOptions): UserConfig => {\n const { workspace, secrets = {}, textlint = {}, run = {} } = options;\n return {\n commitlint: { extends: [COMMIT_CONVENTION] },\n dependencyRules: {\n allowed: pipe(\n workspace.devDependencies,\n Rec.map(({ workspaces, dependencies }) => ({\n workspaces,\n dependencies,\n fields: [\"devDependencies\"] as const,\n })),\n ),\n banned: requiredStack,\n peerRanges: \"intersect\",\n },\n betterleaks: betterleaksOf(secrets),\n steiger: { paths: workspace.sourceDirectories, rules: steigerRules },\n textlint: textlintOf(textlint),\n test: { projects: [...workspace.testProjects], passWithNoTests: true },\n staged: { \"*\": \"vp fmt --no-error-on-unmatched-pattern\" },\n fmt: {\n ignorePatterns: [...generated, ...workspace.lint.ignorePatterns],\n sortImports: true,\n sortTailwindcss: true,\n sortPackageJson: true,\n },\n lint: lintOf(options),\n run: { cache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AAO,EAAE,4BAA4B,MAAM;EAC7C;EACA,GAAG;EACH,GAAG,UAAU,KAAK;EAClB;GAAE,OAAO,CAAC,cAAc;GAAG,OAAO;EAAkB;CACtD;AACF;AAEA,MAAa,oBAAoB,YAA2C;CAC1E,MAAM,EAAE,WAAW,UAAU,CAAC,GAAG,WAAW,CAAC,GAAG,MAAM,CAAC,MAAM;CAC7D,OAAO;EACL,YAAY,EAAE,SAAS,CAAC,iBAAiB,EAAE;EAC3C,iBAAiB;GACf,SAAS,KACP,UAAU,iBACVC,OAAI,KAAK,EAAE,YAAY,oBAAoB;IACzC;IACA;IACA,QAAQ,CAAC,iBAAiB;GAC5B,EAAE,CACJ;GACA,QAAQ;GACR,YAAY;EACd;EACA,aAAa,cAAc,OAAO;EAClC,SAAS;GAAE,OAAO,UAAU;GAAmB,OAAO;EAAa;EACnE,UAAU,WAAW,QAAQ;EAC7B,MAAM;GAAE,UAAU,CAAC,GAAG,UAAU,YAAY;GAAG,iBAAiB;EAAK;EACrE,QAAQ,EAAE,KAAK,yCAAyC;EACxD,KAAK;GACH,gBAAgB,CAAC,GAAG,WAAW,GAAG,UAAU,KAAK,cAAc;GAC/D,aAAa;GACb,iBAAiB;GACjB,iBAAiB;EACnB;EACA,MAAM,OAAO,OAAO;EACpB,KAAK;GAAE,OAAO;GAAM,OAAO,QAAQ;IAAE;IAAW,UAAU,IAAI,SAAS,CAAC;GAAE,CAAC;EAAE;CAC/E;AACF"}
|
|
1
|
+
{"version":3,"file":"config.mjs","names":["Rec","Arr","preset","Rec"],"sources":["../src/app/repository-tasks.ts","../src/app/repository-text.ts","../src/app/repository-config.ts"],"sourcesContent":["import { Record as Rec } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\n\ntype Tasks = NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]>;\n\nexport interface TaskOptions {\n readonly workspace: WorkspaceSettings;\n readonly commands: Readonly<Record<string, string>>;\n}\n\nconst NOT_INPUTS = [\n \"!node_modules/.pnpm-store\",\n \"!node_modules/.pnpm-store/**\",\n \"!node_modules/.tmp\",\n \"!node_modules/.tmp/**\",\n \"!target/**\",\n \"!node_modules/.vitest-cache/**\",\n \"!node_modules/.cache/**\",\n];\n\nconst UNTRACKED_ENV = [\n \"CLOUDFLARE_ACCOUNT_ID\",\n \"CLOUDFLARE_AI_GATEWAY_ID\",\n \"CLOUDFLARE_API_TOKEN\",\n \"CLAUDECODE\",\n \"CLAUDE_CODE_REMOTE\",\n \"GITHUB_ACTIONS\",\n \"HTTPS_PROXY\",\n \"https_proxy\",\n \"NO_PROXY\",\n \"no_proxy\",\n \"SSL_CERT_FILE\",\n \"NODE_EXTRA_CA_CERTS\",\n];\n\nconst FALLOW = [\n \"fallow --skip dupes --fail-on-issues --quiet --format compact\",\n \"fallow dead-code --no-production --fail-on-issues --quiet --format compact\",\n \"fallow dead-code --no-production --quiet --format json | jq -n 'input | {prop_drilling_chains, thin_wrappers, duplicate_prop_shapes} | with_entries(select(.value | length > 0)) | if length > 0 then halt_error else empty end'\",\n \"fallow dupes --fail-on-issues --quiet --format compact\",\n \"fallow security --fail-on-issues --quiet\",\n];\n\nconst AUDIT =\n 'before=\"$(cksum pnpm-workspace.yaml)\"; vp pm audit --fix || exit; if [ \"$before\" != \"$(cksum pnpm-workspace.yaml)\" ]; then echo \"vp pm audit --fix rewrote pnpm-workspace.yaml. Run vp install and commit the diff.\" >&2; exit 1; fi';\n\nexport const tasksOf = ({\n workspace,\n commands,\n}: TaskOptions): NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]> => {\n const inputs = [{ auto: true }, ...workspace.ignoredDirectories, ...NOT_INPUTS];\n const checks: Tasks = {\n fallow: {\n command: FALLOW,\n cache: {\n input: [...inputs, \"!.fallow/**\", \"!**/dist/**\", \"!**/.fallow-verified\"],\n output: [],\n },\n },\n check: {\n command: \"GOMEMLIMIT=4GiB vp check --deny-warnings\",\n cache: { input: inputs, untrackedEnv: UNTRACKED_ENV },\n },\n test: {\n command: \"vp test run\",\n dependsOn: [\"check\"],\n cache: { input: [...inputs, \"!**/.cache/**\"] },\n },\n msch: { command: \"msch\", dependsOn: [\"check\", ...workspace.tasks.native], cache: false },\n audit: { command: AUDIT, cache: false },\n ...commands,\n };\n return {\n ...checks,\n verify: { command: [], dependsOn: [...workspace.tasks.verify, ...Rec.keys(checks)] },\n };\n};\n","import type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Array as Arr, pipe } from \"effect\";\n\nimport { textlintPresets } from \"#/features/define-lint-preset/index.ts\";\n\nexport interface TextOptions {\n readonly ignores?: readonly string[];\n readonly kanji?: readonly string[];\n readonly technicalWriting?: Readonly<Record<string, boolean | object>>;\n readonly rules?: Readonly<Record<string, boolean | object>>;\n readonly filters?: Readonly<Record<string, boolean | object>>;\n readonly sources?: NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"sources\"]>;\n}\n\nexport interface SecretOptions {\n readonly lines?: readonly string[];\n readonly paths?: readonly string[];\n}\n\nconst TEXT_IGNORES = [\"AGENTS.md\", \".agents/skills/**\", \"CHANGELOG.md\"];\nconst SENTENCE_LENGTH = 120;\nconst KANJI_RUN = 6;\nconst PUBLIC_LINES = [String.raw`\\bCF_BEACON_TOKEN = \"[0-9a-f]{32}\"`];\n\nexport const textlintOf = ({\n ignores = [],\n kanji = [],\n technicalWriting = {},\n rules = {},\n filters = {},\n sources = [],\n}: TextOptions): NonNullable<ToolSections[\"textlint\"]> => ({\n ignores: [...TEXT_IGNORES, ...ignores],\n presets: textlintPresets,\n sources,\n filters: { ...filters },\n rules: {\n \"@textlint-ja/preset-ai-writing\": true,\n \"@r_masseater/preset-ja\": true,\n \"preset-ja-technical-writing\": {\n \"sentence-length\": { max: SENTENCE_LENGTH },\n \"ja-no-mixed-period\": { allowPeriodMarks: [\":\"] },\n \"no-mix-dearu-desumasu\": { preferInBody: \"である\", preferInList: \"である\" },\n \"max-kanji-continuous-len\": { max: KANJI_RUN, allow: [...kanji] },\n ...technicalWriting,\n },\n ...rules,\n },\n});\n\nconst anyOf =\n (subject: string) =>\n (patterns: readonly string[]): readonly string[] => {\n if (Arr.isReadonlyArrayEmpty(patterns)) {\n return [];\n }\n const listed = pipe(\n patterns,\n Arr.map((pattern) => `\\`${pattern}\\``),\n Arr.join(\", \"),\n );\n return [`matchesAny(${subject}, [${listed}])`];\n };\n\nexport const betterleaksOf = ({\n lines = [],\n paths = [],\n}: SecretOptions): NonNullable<ToolSections[\"betterleaks\"]> => ({\n extend: { useDefault: true },\n filter: pipe(\n [...anyOf(\"finding.line\")([...PUBLIC_LINES, ...lines]), ...anyOf(`attributes[\"path\"]`)(paths)],\n Arr.join(\" || \"),\n ),\n});\n","import { fileURLToPath } from \"node:url\";\n\nimport { Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\nimport type { OxlintOverride } from \"vite-plus/lint\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\nimport type { MarkdownOptions } from \"#/features/define-lint-preset/index.ts\";\nimport {\n decisionTestRules,\n generated,\n lint as preset,\n markdownOf,\n requiredStack,\n steigerRules,\n} from \"#/features/define-lint-preset/index.ts\";\n\nimport { tasksOf } from \"./repository-tasks.ts\";\nimport { betterleaksOf, textlintOf } from \"./repository-text.ts\";\nimport type { SecretOptions, TextOptions } from \"./repository-text.ts\";\n\nexport interface RepositoryOptions {\n readonly workspace: WorkspaceSettings;\n readonly overrides?: readonly OxlintOverride[];\n readonly secrets?: SecretOptions;\n readonly textlint?: TextOptions;\n readonly markdown?: MarkdownOptions;\n readonly run?: { readonly tasks?: Readonly<Record<string, string>> };\n}\n\nconst COMMIT_CONVENTION = fileURLToPath(import.meta.resolve(\"@commitlint/config-conventional\"));\n\nconst lintOf = ({\n workspace,\n overrides = [],\n}: RepositoryOptions): NonNullable<UserConfig[\"lint\"]> => ({\n ...preset,\n ignorePatterns: [...generated, ...workspace.lint.ignorePatterns],\n overrides: [\n ...preset.overrides,\n {\n files: [...workspace.lint.shadcnUi],\n rules: { \"react/jsx-props-no-spreading\": \"off\" },\n },\n {\n files: [...workspace.lint.publicEntries, ...workspace.lint.deployEntries],\n rules: { \"import/no-default-export\": \"off\" },\n },\n ...overrides,\n ...workspace.lint.overrides,\n { files: [\"**/*.test.ts\"], rules: decisionTestRules },\n ],\n});\n\nexport const repositoryConfig = (options: RepositoryOptions): UserConfig => {\n const { workspace, secrets = {}, textlint = {}, markdown = {}, run = {} } = options;\n return {\n commitlint: { extends: [COMMIT_CONVENTION] },\n dependencyRules: {\n allowed: pipe(\n workspace.devDependencies,\n Rec.map(({ workspaces, dependencies }) => ({\n workspaces,\n dependencies,\n fields: [\"devDependencies\"] as const,\n })),\n ),\n banned: requiredStack,\n peerRanges: \"intersect\",\n },\n betterleaks: betterleaksOf(secrets),\n steiger: { paths: workspace.sourceDirectories, rules: steigerRules },\n textlint: textlintOf(textlint),\n y8: markdownOf(markdown),\n test: { projects: [...workspace.testProjects], passWithNoTests: true },\n staged: { \"*\": \"vp fmt --no-error-on-unmatched-pattern\" },\n fmt: {\n ignorePatterns: [...generated, ...workspace.lint.ignorePatterns],\n sortImports: true,\n sortTailwindcss: true,\n sortPackageJson: true,\n },\n lint: lintOf(options),\n run: { cache: true, tasks: tasksOf({ workspace, commands: run.tasks ?? {} }) },\n };\n};\n"],"mappings":";;;;AAYA,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,gBAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,SAAS;CACb;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,QACJ;AAEF,MAAa,WAAW,EACtB,WACA,eACuE;CACvE,MAAM,SAAS;EAAC,EAAE,MAAM,KAAK;EAAG,GAAG,UAAU;EAAoB,GAAG;CAAU;CAC9E,MAAM,SAAgB;EACpB,QAAQ;GACN,SAAS;G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CAAC,iBAAiB;GAC5B,EAAE,CACJ;GACA,QAAQ;GACR,YAAY;EACd;EACA,aAAa,cAAc,OAAO;EAClC,SAAS;GAAE,OAAO,UAAU;GAAmB,OAAO;EAAa;EACnE,UAAU,WAAW,QAAQ;EAC7B,IAAI,WAAW,QAAQ;EACvB,MAAM;GAAE,UAAU,CAAC,GAAG,UAAU,YAAY;GAAG,iBAAiB;EAAK;EACrE,QAAQ,EAAE,KAAK,yCAAyC;EACxD,KAAK;GACH,gBAAgB,CAAC,GAAG,WAAW,GAAG,UAAU,KAAK,cAAc;GAC/D,aAAa;GACb,iBAAiB;GACjB,iBAAiB;EACnB;EACA,MAAM,OAAO,OAAO;EACpB,KAAK;GAAE,OAAO;GAAM,OAAO,QAAQ;IAAE;IAAW,UAAU,IAAI,SAAS,CAAC;GAAE,CAAC;EAAE;CAC/E;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as _default } from "./index-lM4Pphgz.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/decision-rules.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { m as default } from "./define-lint-preset-BYMl7wof.mjs";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { n as JAPANESE, t as COMMENT_DIRECTIVES } from "./comment-directives-5-f_qs1E.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
|
-
import { Array, Option, Predicate, Record, String, Struct, pipe } from "effect";
|
|
3
|
+
import { Array, Option, Predicate, Record, String as String$1, Struct, pipe } from "effect";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { definePlugin, defineRule } from "@r_masseater/y8";
|
|
5
6
|
import tanstackQuery from "@r_masseater/oxlint-typed-rules/tanstack-query";
|
|
6
7
|
import tanstackRouter from "@r_masseater/oxlint-typed-rules/tanstack-router";
|
|
7
8
|
import { plugin } from "@shadcn/lint";
|
|
@@ -154,8 +155,8 @@ const generated = [
|
|
|
154
155
|
];
|
|
155
156
|
const asErrors = (names) => Record.fromEntries(pipe(names, Array.map((name) => [name, "error"])));
|
|
156
157
|
const allRulesOf = ({ prefix, rules }) => asErrors(pipe(Record.keys(rules), Array.map((rule) => `${prefix}/${rule}`)));
|
|
157
|
-
const reactHooksRules = asErrors(pipe(Struct.keys(reactHooks.configs["recommended-latest"].rules), Array.map(String.replace("react-hooks/", "react-hooks-js/"))));
|
|
158
|
-
const eslintReactRuleNames = pipe(Record.keys(eslintReact.configs["strict-typescript"].rules ?? {}), Array.filter((name) => !(String.replace("@eslint-react/", "react-hooks-js/")(name) in reactHooksRules)));
|
|
158
|
+
const reactHooksRules = asErrors(pipe(Struct.keys(reactHooks.configs["recommended-latest"].rules), Array.map(String$1.replace("react-hooks/", "react-hooks-js/"))));
|
|
159
|
+
const eslintReactRuleNames = pipe(Record.keys(eslintReact.configs["strict-typescript"].rules ?? {}), Array.filter((name) => !(String$1.replace("@eslint-react/", "react-hooks-js/")(name) in reactHooksRules)));
|
|
159
160
|
const effectRuleNames = pipe(Record.values(presets), Array.flatMap((preset) => Struct.keys(preset.rules ?? {})));
|
|
160
161
|
const pluginRules = {
|
|
161
162
|
...asErrors(Record.keys(htmlReact.configs.all.rules ?? {})),
|
|
@@ -348,7 +349,7 @@ const readonlyParameterAllow = [
|
|
|
348
349
|
{
|
|
349
350
|
from: "package",
|
|
350
351
|
package: "@vscode/tree-sitter-wasm",
|
|
351
|
-
name: "Language"
|
|
352
|
+
name: ["Language", "Node"]
|
|
352
353
|
},
|
|
353
354
|
{
|
|
354
355
|
from: "package",
|
|
@@ -771,7 +772,7 @@ const readonlyParameterAllow = [
|
|
|
771
772
|
const resolved = (specifier) => fileURLToPath(import.meta.resolve(specifier));
|
|
772
773
|
const DECISION_TIMEOUT_MS = 5e4;
|
|
773
774
|
const typedRules = "@r_masseater/oxlint-typed-rules";
|
|
774
|
-
const lint = {
|
|
775
|
+
const lint$1 = {
|
|
775
776
|
ignorePatterns: generated,
|
|
776
777
|
plugins: [
|
|
777
778
|
"eslint",
|
|
@@ -1206,6 +1207,61 @@ const textlintPresets = {
|
|
|
1206
1207
|
"@textlint-ja/preset-ai-writing": japanesePreset("@textlint-ja/textlint-rule-preset-ai-writing", required("@textlint-ja/textlint-rule-preset-ai-writing")),
|
|
1207
1208
|
"preset-ja-technical-writing": japanesePreset("textlint-rule-preset-ja-technical-writing", required("textlint-rule-preset-ja-technical-writing"))
|
|
1208
1209
|
};
|
|
1209
|
-
|
|
1210
|
+
// src/features/define-lint-preset/config/markdown.config.ts
|
|
1211
|
+
const README = /(?:^|\/)README\.md$/iu;
|
|
1212
|
+
const README_LINES = 150;
|
|
1213
|
+
const HEADING_MARKS = /^#+\s*|\s*#*$/gu;
|
|
1214
|
+
const API_HEADING = /^(?:api|api reference|options|configuration|parameters|props|reference|オプション|設定項目|リファレンス)$/iu;
|
|
1215
|
+
const readmeLength = defineRule({
|
|
1216
|
+
meta: { description: "A README stays short: the code and its types hold the details" },
|
|
1217
|
+
create: (context) => ({ document: () => {
|
|
1218
|
+
if (!README.test(context.filename) || context.lines.length <= README_LINES) return;
|
|
1219
|
+
context.report({
|
|
1220
|
+
line: 151,
|
|
1221
|
+
message: `README is longer than ${String(README_LINES)} lines; keep only what a reader needs to start`
|
|
1222
|
+
});
|
|
1223
|
+
} })
|
|
1224
|
+
});
|
|
1225
|
+
const readmeApiSection = defineRule({
|
|
1226
|
+
meta: { description: "A README has no API or option reference that repeats the types" },
|
|
1227
|
+
create: (context) => ({ heading: (node) => {
|
|
1228
|
+
if (!README.test(context.filename)) return;
|
|
1229
|
+
const title = pipe(context.textOf(node), String$1.replaceAll(HEADING_MARKS, ""));
|
|
1230
|
+
if (API_HEADING.test(title)) context.report({
|
|
1231
|
+
node,
|
|
1232
|
+
message: "README repeats the API; link the types or the source instead"
|
|
1233
|
+
});
|
|
1234
|
+
} })
|
|
1235
|
+
});
|
|
1236
|
+
const masseater = definePlugin({ rules: {
|
|
1237
|
+
"readme-length": readmeLength,
|
|
1238
|
+
"readme-api-section": readmeApiSection
|
|
1239
|
+
} });
|
|
1240
|
+
const ERROR = "error";
|
|
1241
|
+
const MASSEATER_RULES = pipe(["readme-length", "readme-api-section"], Array.map((name) => [`masseater/${name}`, ERROR]), Record.fromEntries);
|
|
1242
|
+
const MARKDOWN_RULES = {
|
|
1243
|
+
"markdownlint/MD013": "off",
|
|
1244
|
+
"markdownlint/MD034": "off",
|
|
1245
|
+
"markdownlint/MD041": "off",
|
|
1246
|
+
"markdownlint/MD060": "off",
|
|
1247
|
+
"markdownlint/MD024": ["error", { siblings_only: true }],
|
|
1248
|
+
"markdownlint/MD026": ["error", { punctuation: ".,;:。,;:" }]
|
|
1249
|
+
};
|
|
1250
|
+
const MARKDOWN_IGNORES = [
|
|
1251
|
+
".agents/skills/**",
|
|
1252
|
+
"**/fixtures/**",
|
|
1253
|
+
"**/upstream/**",
|
|
1254
|
+
"CHANGELOG.md"
|
|
1255
|
+
];
|
|
1256
|
+
const markdownOf = ({ ignores = [], rules = {} }) => ({
|
|
1257
|
+
plugins: { masseater },
|
|
1258
|
+
rules: {
|
|
1259
|
+
...MARKDOWN_RULES,
|
|
1260
|
+
...MASSEATER_RULES,
|
|
1261
|
+
...rules
|
|
1262
|
+
},
|
|
1263
|
+
ignores: [...MARKDOWN_IGNORES, ...ignores]
|
|
1264
|
+
});
|
|
1265
|
+
export { commandsOverride as _, tracedRules as a, lint$1 as c, decisionRules as d, decisionTestRules as f, cloudflareResourceSyntax as g, alchemyOverride as h, remotionRules as i, readonlyParameterAllow as l, decision_rules_default as m, textlintPresets as n, INSTRUMENTATION as o, generated as p, steigerRules as r, requiredStack as s, markdownOf as t, allRulesOf as u, removalPolicyOverride as v, removalPolicySyntax as y };
|
|
1210
1266
|
|
|
1211
|
-
//# sourceMappingURL=define-lint-preset-
|
|
1267
|
+
//# sourceMappingURL=define-lint-preset-BYMl7wof.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-lint-preset-BYMl7wof.mjs","names":["Rec","Arr","Str","effectPresets","decisionPlugin","shadcn","lint","Rec","Str","Arr","Rec"],"sources":["../src/features/define-lint-preset/config/lint-overrides.config.ts","../src/features/define-lint-preset/config/decision-rules.ts","../src/features/define-lint-preset/config/lint.config.ts","../src/features/define-lint-preset/config/readonly-binary.config.ts","../src/features/define-lint-preset/config/readonly-browser.config.ts","../src/features/define-lint-preset/config/readonly-lint-tools.config.ts","../src/features/define-lint-preset/config/readonly-types.config.ts","../src/features/define-lint-preset/config/preset.ts","../src/features/define-lint-preset/config/required-stack.config.ts","../src/features/define-lint-preset/config/traced-rules.config.ts","../src/features/define-lint-preset/config/remotion-rules.config.ts","../src/features/define-lint-preset/config/fsd-rules.ts","../src/features/define-lint-preset/config/textlint-presets.config.ts","../src/features/define-lint-preset/config/markdown.config.ts"],"sourcesContent":["const LOGPUSH = 'Property[key.name=\"logpush\"]:not([value.value=false])';\nconst LOGPUSH_MESSAGE =\n \"Worker には logpush: true を付ける。付けないと、その Worker のログが Logpush に流れない\";\n\nconst CPU_LIMIT = 'Property[key.name=\"limits\"]:has(Property[key.name=\"cpuMs\"])';\nconst CPU_LIMIT_MESSAGE =\n \"コードを動かす Worker には limits.cpuMs を付け、本番の CPU 時間の最大値をわずかに上回る値にする。付けないと、1 回の暴走が上限の CPU 時間まで請求される\";\n\nconst UNATTRIBUTED_MODEL_CALL =\n \"モデルの呼び出しは AI Gateway を通し、呼び出し元を metadata に載せる。載せないと、費用やエラーを後から呼び出し元で引けない\";\n\nexport const cloudflareResourceSyntax: readonly Readonly<{ selector: string; message: string }>[] =\n [\n {\n selector: `CallExpression[callee.object.name=\"Workers\"][callee.property.name=\"Worker\"] > ObjectExpression.arguments:not(:has(${LOGPUSH}))`,\n message: LOGPUSH_MESSAGE,\n },\n {\n selector: `CallExpression[callee.object.name=\"Website\"] > ObjectExpression.arguments:not(:has(${LOGPUSH}))`,\n message: LOGPUSH_MESSAGE,\n },\n {\n selector: `CallExpression[callee.object.name=/^(Workers|Website)$/] > ObjectExpression.arguments:has(Property[key.name=\"main\"]):not(:has(${CPU_LIMIT}))`,\n message: CPU_LIMIT_MESSAGE,\n },\n {\n selector: `CallExpression[callee.object.name=\"Website\"]:not([callee.property.name=\"StaticSite\"]) > ObjectExpression.arguments:not(:has(${CPU_LIMIT}))`,\n message: CPU_LIMIT_MESSAGE,\n },\n {\n selector:\n 'CallExpression[callee.property.name=\"run\"][callee.object.property.name=\"AI\"][arguments.length<3]',\n message: UNATTRIBUTED_MODEL_CALL,\n },\n {\n selector:\n 'CallExpression[callee.name=\"runWorkersAi\"] > ObjectExpression > Property[key.name=\"call\"] > ArrowFunctionExpression[params.length=0]',\n message: UNATTRIBUTED_MODEL_CALL,\n },\n {\n selector:\n 'CallExpression[callee.name=\"createAI\"] > ObjectExpression.arguments:not(:has(Property[key.name=\"metadata\"]))',\n message: UNATTRIBUTED_MODEL_CALL,\n },\n {\n selector:\n 'ObjectExpression:has(Property[key.value=\"cf-aig-gateway-id\"]):not(:has(Property[key.value=\"cf-aig-metadata\"]))',\n message: UNATTRIBUTED_MODEL_CALL,\n },\n {\n selector:\n 'CallExpression[callee.object.name=\"AI\"][callee.property.name=\"Gateway\"] > ObjectExpression.arguments:not(:has(Property[key.name=\"collectLogs\"][value.value=true]))',\n message:\n \"AI Gateway には collectLogs: true を付ける。付けないと、モデルの呼び出しが後から引けない\",\n },\n {\n selector:\n 'CallExpression[callee.object.name=\"AI\"][callee.property.name=\"Gateway\"] > ObjectExpression.arguments:not(:has(Property[key.name=\"spendLimits\"] > ObjectExpression > Property[key.name=\"enabled\"][value.value=true]))',\n message:\n \"AI Gateway には spendLimits を enabled: true で付け、日ごとの費用の上限を掛ける。付けないと、従量課金のモデルの呼び出しが上限なく請求される\",\n },\n {\n selector:\n 'CallExpression[callee.object.name=\"AI\"][callee.property.name=\"Gateway\"] > ObjectExpression.arguments:not(:has(Property[key.name=\"cacheTtl\"]))',\n message:\n \"AI Gateway には cacheTtl を付け、同じ問いの答えをキャッシュする。付けないと、同じ問いにも毎回課金される\",\n },\n {\n selector: 'MemberExpression[object.name=\"Rum\"][property.name=\"Site\"]',\n message:\n \"Rum.Site は使わない。CI のトークンに Account Settings Write が要る。Cloudflare API でホストごとに一度サイトを作り、トークンを CF_BEACON_TOKEN に置く\",\n },\n ];\nexport const removalPolicySyntax: Readonly<{ selector: string; message: string }> = {\n selector:\n 'CallExpression[callee.object.name=/^(D1|R2)$/][callee.property.name=/^(Database|Bucket)$/]:not(CallExpression[callee.property.name=\"pipe\"][arguments.0.callee.object.name=\"RemovalPolicy\"] > MemberExpression.callee > CallExpression.object)',\n message:\n \"D1 と R2 は作り直すと中身が消えるので、alchemy の RemovalPolicy.protect() を .pipe で付けて置き換えと削除を止める\",\n};\n\nexport const removalPolicyOverride: {\n files: string[];\n excludeFiles: string[];\n rules: Readonly<Record<string, [\"error\", ...unknown[]]>>;\n} = {\n files: [\"**/*.ts\"],\n excludeFiles: [\"**/*.test.ts\"],\n rules: {\n \"eslint-js/no-restricted-syntax\": [\"error\", ...cloudflareResourceSyntax, removalPolicySyntax],\n },\n};\n\nexport const alchemyOverride: {\n files: string[];\n rules: Readonly<Record<string, [\"error\", ...unknown[]]>>;\n} = {\n files: [\"**/alchemy.run.ts\"],\n rules: {\n \"eslint-js/no-restricted-syntax\": [\n \"error\",\n ...cloudflareResourceSyntax,\n removalPolicySyntax,\n {\n selector: 'CallExpression[callee.name=\"Stack\"]:not([arguments.0.name=\"APP_NAME\"])',\n message: \"スタック名には app-name.ts の APP_NAME を渡す\",\n },\n {\n selector:\n 'Program:not(:has(YieldExpression[delegate=true] > Identifier.argument[name=\"requireAppPrefix\"]))',\n message:\n \"スタックの最後で app-name.ts の requireAppPrefix を yield* して、リソース名の prefix を検査する\",\n },\n {\n selector:\n 'CallExpression[callee.name=\"Stack\"] > .arguments:nth-child(3):not(:has(FunctionExpression > BlockStatement > ExpressionStatement:nth-last-child(2) > YieldExpression[delegate=true] > Identifier.argument[name=\"requireAppPrefix\"]))',\n message:\n \"スタックの最後で app-name.ts の requireAppPrefix を yield* して、リソース名の prefix を検査する\",\n },\n ],\n },\n};\n\nexport const commandsOverride: {\n files: string[];\n rules: Readonly<Record<string, \"off\">>;\n} = {\n files: [\"bin/**\"],\n rules: {\n \"node/no-process-env\": \"off\",\n \"node/no-sync\": \"off\",\n \"effecttsgo/node-builtin-import\": \"off\",\n },\n};\n","import { createDecisionPlugin, defineDecisionRule } from \"@r_masseater/oxlint-plugin-decision\";\n\nexport default createDecisionPlugin({\n name: \"stack\",\n rules: [\n defineDecisionRule({\n id: \"exclusive-status\",\n target: \"file\",\n question:\n \"Does this code represent one piece of state with several boolean flags or optional fields whose combinations can contradict each other, instead of one exclusive status expressed as a discriminated union? Answer no when every state is a single exclusive status, or when the file holds no such state. A violation needs two or more booleans or optional fields that describe the same piece of state; a single boolean value, parameter, return value or field is not a violation, and a union of objects told apart by a status or kind field is already an exclusive status. A constant configuration object whose shape a library fixes, such as an OpenFeature flag definition, holds no state and is not a violation.\",\n message: \"状態は排他的なstatusを持つ判別共用体で表し、booleanフラグの組を使わない。\",\n cutoff: 0.8,\n }),\n defineDecisionRule({\n id: \"server-state-tanstack-query\",\n target: \"file\",\n question:\n \"Does this code fetch, cache or synchronize server data on the client with something other than TanStack Query, such as fetch inside useEffect, SWR or a hand-written cache? Answer no when server data on the client goes only through TanStack Query, or when the file handles none. Creating an API client such as a better-auth or Eden client, which fetches nothing until a query calls it, is not a violation.\",\n message: \"サーバー状態はTanStack Queryだけで扱う。\",\n cutoff: 0.8,\n }),\n defineDecisionRule({\n id: \"ui-state-effect-atom\",\n target: \"file\",\n question:\n \"Does this code hold client-side UI state with something other than effect-atom, such as useState, useReducer, React context used as a store, zustand, jotai or redux? Answer no when client-side UI state is held only by effect-atom, or when the file holds none. effect-atom is Atom from effect/reactivity, read and written through @effect/atom-react hooks such as useAtomValue and useAtomSet. Creating a TanStack Query QueryClient or configuring the router, which hold no UI state, is not a violation.\",\n message: \"UI状態はeffect-atomだけで扱う。\",\n cutoff: 0.8,\n }),\n ],\n});\n","import { presets as effectPresets } from \"@effect/tsgo/oxlint-presets\";\nimport htmlReact from \"@html-eslint/eslint-plugin-react\";\nimport eslintReact from \"@r_masseater/oxlint-typed-rules/react\";\nimport { Array as Arr, Record as Rec, String as Str, Struct, pipe } from \"effect\";\nimport reactHooks from \"eslint-plugin-react-hooks\";\n\nimport decisionPlugin from \"./decision-rules.ts\";\n\nexport const generated = [\n \"**/routeTree.gen.ts\",\n \"**/generated/**\",\n \"**/drizzle/**/snapshot.json\",\n \".claude/skills/**\",\n \".intent/**\",\n \"AGENTS.md\",\n \"**/CHANGELOG.md\",\n \".github/release-please/*manifest.json\",\n \"**/.release-please-manifest.json\",\n \"**/*.d.*.ts\",\n \"**/src-tauri/gen/**\",\n];\n\nconst asErrors = (names: readonly string[]): Readonly<Record<string, \"error\">> =>\n Rec.fromEntries(\n pipe(\n names,\n Arr.map((name) => [name, \"error\"] as const),\n ),\n );\n\nexport const allRulesOf = ({\n prefix,\n rules,\n}: Readonly<{ prefix: string; rules: Readonly<Record<string, unknown>> }>): Readonly<\n Record<string, \"error\">\n> =>\n asErrors(\n pipe(\n Rec.keys(rules),\n Arr.map((rule) => `${prefix}/${rule}`),\n ),\n );\n\nconst reactHooksRuleNames = pipe(\n Struct.keys(reactHooks.configs[\"recommended-latest\"].rules),\n Arr.map(Str.replace(\"react-hooks/\", \"react-hooks-js/\")),\n);\n\nconst reactHooksRules = asErrors(reactHooksRuleNames);\n\nconst eslintReactRuleNames = pipe(\n Rec.keys(eslintReact.configs[\"strict-typescript\"].rules ?? {}),\n Arr.filter(\n (name) => !(Str.replace(\"@eslint-react/\", \"react-hooks-js/\")(name) in reactHooksRules),\n ),\n);\n\nconst effectRuleNames = pipe(\n Rec.values(effectPresets),\n Arr.flatMap((preset) => Struct.keys(preset.rules ?? {})),\n);\n\nexport const pluginRules: Readonly<Record<string, \"error\">> = {\n ...asErrors(Rec.keys(htmlReact.configs.all.rules ?? {})),\n ...reactHooksRules,\n ...asErrors(eslintReactRuleNames),\n ...asErrors(effectRuleNames),\n};\n\nexport const decisionPluginName = decisionPlugin.meta.name;\n\nexport const decisionRules = allRulesOf({\n prefix: decisionPluginName,\n rules: decisionPlugin.rules,\n});\n\nexport const decisionTestRules = pipe(\n decisionRules,\n Rec.map(() => \"off\" as const),\n);\n\nexport const shadcnRestyleContracts = [\n { pattern: \"^Table(Head|Cell)$\", allow: [\"text-alignment\", \"fvn-spacing\"] },\n { pattern: \"^TableCaption$\", allow: [\"caption\", \"text-alignment\", \"mt-*\", \"mb-*\"] },\n];\n\nexport { COMMENT_DIRECTIVES } from \"#/shared/lib/comment-directives.ts\";\n","export const BINARY_DATA: readonly string[] = [\n \"ArrayBuffer\",\n \"DataView\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Float32Array\",\n \"Float64Array\",\n \"Int8Array\",\n \"Int16Array\",\n \"Int32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"Uint16Array\",\n \"Uint32Array\",\n];\n","export const WEBGPU_HANDLES: readonly string[] = [\n \"GPUDevice\",\n \"GPUCanvasContext\",\n \"GPUTexture\",\n \"GPUBuffer\",\n \"GPUBindGroup\",\n \"GPUBindGroupLayout\",\n \"GPUPipelineLayout\",\n \"GPURenderPipeline\",\n \"GPUSampler\",\n];\n\nexport const BROWSER_HANDLES: readonly string[] = [\n \"HTMLCanvasElement\",\n \"HTMLImageElement\",\n \"HTMLAnchorElement\",\n \"CanvasRenderingContext2D\",\n \"PointerEvent\",\n \"WheelEvent\",\n \"KeyboardEvent\",\n \"MouseEvent\",\n \"AbortSignal\",\n \"ImageBitmap\",\n \"AudioContext\",\n \"OfflineAudioContext\",\n \"AnalyserNode\",\n \"AudioBuffer\",\n \"AudioBufferSourceNode\",\n ...WEBGPU_HANDLES,\n];\n","export const lintToolReadonlyAllow = [\n {\n from: \"package\" as const,\n package: \"@oxlint/plugins\",\n name: [\n \"Context\",\n \"ExportNamedDeclaration\",\n \"ExportSpecifier\",\n \"Statement\",\n \"Fixer\",\n \"ImportDeclaration\",\n \"ImportDeclarationSpecifier\",\n \"Location\",\n \"MemberExpression\",\n \"Node\",\n \"Range\",\n \"Rule\",\n \"RuleMeta\",\n \"SourceCode\",\n \"VisitorWithHooks\",\n ],\n },\n {\n from: \"package\" as const,\n package: \"oxlint\",\n name: [\n \"DummyRule\",\n \"DummyRuleMap\",\n \"InvalidTestCase\",\n \"OxlintOverride\",\n \"Rule\",\n \"TestCases\",\n \"ValidTestCase\",\n ],\n },\n { from: \"package\" as const, package: \"@commitlint/types\", name: [\"QualifiedConfig\"] },\n {\n from: \"package\" as const,\n package: \"@textlint/config-loader\",\n name: [\"TextlintLoadPackagesFromRawConfigResult\"],\n },\n { from: \"package\" as const, package: \"markdownlint\", name: [\"LintError\"] },\n {\n from: \"package\" as const,\n package: \"steiger\",\n name: [\"ConfigObject\", \"GlobalIgnore\", \"Plugin\"],\n },\n {\n from: \"file\" as const,\n path: \"upstream/attw-core/lib/checkPackage.d.ts\",\n name: [\"CheckPackageOptions\"],\n },\n {\n from: \"package\" as const,\n package: \"@r_masseater/vite-plus-adopt\",\n name: [\"CheckPackageOptions\", \"TextlintSource\"],\n },\n {\n from: \"file\" as const,\n path: \"src/shared/config/types.ts\",\n name: [\"CommitlintConfig\", \"MarkdownlintConfig\", \"TextlintConfig\", \"ToolSections\"],\n },\n {\n from: \"file\" as const,\n name: [\n \"BoundSymbol\",\n \"CompatSymbol\",\n \"CompatType\",\n \"FileBinding\",\n \"SymbolTable\",\n \"TypedContext\",\n ],\n },\n];\n","import { BINARY_DATA } from \"./readonly-binary.config.ts\";\nimport { BROWSER_HANDLES, WEBGPU_HANDLES } from \"./readonly-browser.config.ts\";\nimport { lintToolReadonlyAllow } from \"./readonly-lint-tools.config.ts\";\n\nexport const readonlyParameterAllow = [\n {\n from: \"lib\" as const,\n name: [\n \"HTMLElement\",\n \"HTMLDivElement\",\n \"Worker\",\n \"ReadableStream\",\n \"Request\",\n \"Response\",\n ...BINARY_DATA,\n \"RegExp\",\n \"RegExpExecArray\",\n \"RegExpMatchArray\",\n \"Date\",\n \"SpeechRecognitionResult\",\n \"CryptoKey\",\n ...BROWSER_HANDLES,\n ],\n },\n { from: \"package\" as const, package: \"@webgpu/types\", name: [...WEBGPU_HANDLES] },\n { from: \"package\" as const, package: \"@vscode/tree-sitter-wasm\", name: [\"Language\", \"Node\"] },\n { from: \"package\" as const, package: \"domhandler\", name: [\"AnyNode\", \"Text\", \"Element\"] },\n {\n from: \"package\" as const,\n package: \"@cloudflare/workers-types\",\n name: [\n \"AnalyticsEngineDataset\",\n \"Container\",\n \"DurableObjectState\",\n \"DurableObjectStorage\",\n \"CryptoKey\",\n \"KVNamespace\",\n \"R2Bucket\",\n \"SecretsStoreSecret\",\n \"TailEvent\",\n \"Onset\",\n \"Log\",\n \"Exception\",\n \"Attribute\",\n \"SpanUpdateInfo\",\n \"FetchResponseInfo\",\n \"Span\",\n ],\n },\n { from: \"package\" as const, package: \"@alchemy.run/cloudflare\", name: [\"Store\", \"WorkerProps\"] },\n {\n from: \"package\" as const,\n package: \"@bufbuild/protobuf\",\n name: [\"DescMessage\", \"JsonObject\", \"JsonValue\", \"Message\"],\n },\n { from: \"package\" as const, package: \"lighthouse\", name: [\"FlowResult\", \"Step\", \"UserFlow\"] },\n { from: \"package\" as const, package: \"vitest\", name: \"TestProject\" },\n {\n from: \"package\" as const,\n package: \"puppeteer-core\",\n name: [\"Browser\", \"ElementHandle\", \"Page\"],\n },\n { from: \"package\" as const, package: \"miniflare\", name: \"Miniflare\" },\n { from: \"package\" as const, package: \"elysia\", name: \"ElysiaConfig\" },\n { from: \"package\" as const, package: \"@types/node\", name: [\"Request\", \"Response\"] },\n { from: \"package\" as const, package: \"@better-auth/drizzle-adapter\", name: \"DB\" },\n {\n from: \"package\" as const,\n package: \"drizzle-orm\",\n name: [\"DrizzleSqliteDODatabase\", \"SQL\"],\n },\n { from: \"package\" as const, package: \"@tanstack/query-core\", name: \"QueryClient\" },\n {\n from: \"package\" as const,\n package: \"@codemirror/view\",\n name: [\"Decoration\", \"EditorView\", \"GutterMarker\", \"ViewUpdate\", \"WidgetType\"],\n },\n {\n from: \"package\" as const,\n package: \"@codemirror/state\",\n name: [\"ChangeDesc\", \"EditorState\", \"Extension\", \"StateEffect\", \"Text\", \"Transaction\"],\n },\n { from: \"package\" as const, package: \"@codemirror/lint\", name: \"Diagnostic\" },\n { from: \"package\" as const, package: \"comlink\", name: \"Remote\" },\n {\n from: \"package\" as const,\n package: \"typescript\",\n name: [\n \"API\",\n \"ArrayLiteralExpression\",\n \"ArrowFunction\",\n \"BinaryExpression\",\n \"BindingElement\",\n \"CallExpression\",\n \"Checker\",\n \"ClassDeclaration\",\n \"CompilerHost\",\n \"CompilerOptions\",\n \"CompletionEntry\",\n \"ConfigFileResponse\",\n \"Declaration\",\n \"DeclarationBase\",\n \"DiagnosticResponse\",\n \"ElementAccessExpression\",\n \"EnumDeclaration\",\n \"ExportAssignment\",\n \"ExportDeclaration\",\n \"ExportSpecifier\",\n \"Expression\",\n \"ExpressionBase\",\n \"FunctionDeclaration\",\n \"FunctionExpression\",\n \"Identifier\",\n \"InterfaceDeclaration\",\n \"JSDocCallbackTag\",\n \"JSDocTagBase\",\n \"JSDocTypedefTag\",\n \"ModuleDeclaration\",\n \"Node\",\n \"NodeHandle\",\n \"NumericLiteral\",\n \"ParameterDeclaration\",\n \"ParseConfigFileHost\",\n \"ParsedCommandLine\",\n \"Program\",\n \"Project\",\n \"PropertyAccessExpression\",\n \"PropertyDeclaration\",\n \"PropertySignature\",\n \"Signature\",\n \"SignatureDeclaration\",\n \"Snapshot\",\n \"SourceFile\",\n \"StringLiteral\",\n \"Symbol\",\n \"Type\",\n \"TypeAliasDeclaration\",\n \"TypeChecker\",\n \"TypeFlags\",\n \"TypeNode\",\n \"TypeNodeBase\",\n \"UnionTypeNode\",\n \"VariableDeclaration\",\n \"VariableDeclarationList\",\n \"WasmTransport\",\n ],\n },\n { from: \"package\" as const, package: \"@codemirror/autocomplete\", name: \"CompletionContext\" },\n ...lintToolReadonlyAllow,\n {\n from: \"package\" as const,\n package: \"react\",\n name: [\n \"ReactNode\",\n \"ButtonHTMLAttributes\",\n \"ChangeEvent\",\n \"ClassAttributes\",\n \"FocusEvent\",\n \"KeyboardEvent\",\n \"SubmitEvent\",\n ],\n },\n { from: \"package\" as const, package: \"clsx\", name: \"ClassValue\" },\n {\n from: \"package\" as const,\n package: \"@anthropic-ai/claude-agent-sdk\",\n name: [\"SDKMessage\", \"SDKResultMessage\"],\n },\n {\n from: \"package\" as const,\n package: \"@types/dom-speech-recognition\",\n name: [\"SpeechRecognition\", \"SpeechRecognitionEvent\", \"SpeechRecognitionResult\"],\n },\n { from: \"package\" as const, package: \"@modelcontextprotocol/server\", name: \"McpServer\" },\n {\n from: \"package\" as const,\n package: \"@modelcontextprotocol/client\",\n name: [\"CallToolResult\", \"Client\", \"ContentBlock\"],\n },\n { from: \"package\" as const, package: \"discord.js\", name: [\"Client\", \"Guild\"] },\n {\n from: \"package\" as const,\n package: \"@discordjs/voice\",\n name: [\"AudioPlayer\", \"VoiceConnection\"],\n },\n { from: \"package\" as const, package: \"mdast\", name: [\"Root\", \"RootContent\", \"Yaml\"] },\n { from: \"package\" as const, package: \"@types/mdast\", name: [\"Code\", \"Nodes\"] },\n { from: \"package\" as const, package: \"@types/hast\", name: [\"Element\", \"RootContent\"] },\n { from: \"package\" as const, package: \"ical.js\", name: \"Component\" },\n {\n from: \"package\" as const,\n package: \"@jupyterlab/nbformat\",\n name: [\n \"ICell\",\n \"IDisplayData\",\n \"IExecuteResult\",\n \"INotebookContent\",\n \"IOutput\",\n \"MultilineString\",\n ],\n },\n { from: \"package\" as const, package: \"unpdf\", name: \"PDFDocumentProxy\" },\n { from: \"package\" as const, package: \"@kenjiuno/msgreader\", name: \"FieldsData\" },\n {\n from: \"package\" as const,\n package: \"parse5\",\n name: [\n \"Document\",\n \"DocumentFragment\",\n \"DocumentType\",\n \"Element\",\n \"Template\",\n \"CommentNode\",\n \"TextNode\",\n ],\n },\n { from: \"package\" as const, package: \"postal-mime\", name: [\"Address\", \"Email\"] },\n { from: \"package\" as const, package: \"fflate\", name: [\"Unzipped\"] },\n {\n from: \"package\" as const,\n package: \"@openrouter/sdk\",\n name: [\"DecisionsChoiceAnswer\", \"DecisionsNoulAnswer\", \"DecisionsScoreAnswer\", \"Unknown\"],\n },\n { from: \"package\" as const, package: \"recharts\", name: \"TooltipPayloadEntry\" },\n { from: \"package\" as const, package: \"vfile\", name: \"VFile\" },\n { from: \"package\" as const, package: \"modern-tar\", name: \"ParsedTarEntry\" },\n { from: \"package\" as const, package: \"@zip.js/zip.js\", name: [\"Entry\", \"FileEntry\"] },\n {\n from: \"package\" as const,\n package: \"three\",\n name: [\n \"LoadingManager\",\n \"Object3D\",\n \"WebGLRenderer\",\n \"PerspectiveCamera\",\n \"Scene\",\n \"Sphere\",\n \"BufferAttribute\",\n \"Material\",\n \"Mesh\",\n ],\n },\n {\n from: \"package\" as const,\n package: \"@huggingface/transformers\",\n name: [\"RawImage\", \"PretrainedConfig\", \"PreTrainedModel\", \"Processor\"],\n },\n {\n from: \"package\" as const,\n package: \"effect\",\n name: [\n \"Atom\",\n \"Cause\",\n \"Context\",\n \"DateTime\",\n \"Decoder\",\n \"Deferred\",\n \"Duration\",\n \"Effect\",\n \"Exit\",\n \"Fiber\",\n \"HashMap\",\n \"HashSet\",\n \"HttpClient\",\n \"HttpClientRequest\",\n \"HttpClientResponse\",\n \"HttpServerRequest\",\n \"HttpServerResponse\",\n \"Json\",\n \"JsonArray\",\n \"JsonObject\",\n \"Layer\",\n \"Logger\",\n \"NativeSpan\",\n \"Option\",\n \"Redacted\",\n \"Ref\",\n \"Stream\",\n \"Utc\",\n \"Writable\",\n ],\n },\n];\n","import { fileURLToPath } from \"node:url\";\n\nimport tanstackQuery from \"@r_masseater/oxlint-typed-rules/tanstack-query\";\nimport tanstackRouter from \"@r_masseater/oxlint-typed-rules/tanstack-router\";\nimport { plugin as shadcn } from \"@shadcn/lint\";\nimport baselineJs from \"eslint-plugin-baseline-js\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport {\n alchemyOverride,\n cloudflareResourceSyntax,\n removalPolicyOverride,\n commandsOverride,\n} from \"./lint-overrides.config.ts\";\nimport {\n COMMENT_DIRECTIVES,\n allRulesOf,\n decisionPluginName,\n generated,\n pluginRules,\n shadcnRestyleContracts,\n} from \"./lint.config.ts\";\nimport { readonlyParameterAllow } from \"./readonly-types.config.ts\";\n\ntype LintConfig = NonNullable<UserConfig[\"lint\"]>;\n\nconst resolved = (specifier: string): string => fileURLToPath(import.meta.resolve(specifier));\n\nconst DECISION_TIMEOUT_MS = 50_000;\n\nconst typedRules = \"@r_masseater/oxlint-typed-rules\";\n\nconst jsPlugins = [\n { name: \"vite-plus\", specifier: resolved(\"vite-plus/oxlint-plugin\") },\n { name: \"tanstack-query\", specifier: resolved(`${typedRules}/tanstack-query`) },\n { name: \"tanstack-router\", specifier: resolved(`${typedRules}/tanstack-router`) },\n { name: \"tanstack-start\", specifier: resolved(`${typedRules}/tanstack-start`) },\n { name: \"drizzle\", specifier: resolved(`${typedRules}/drizzle`) },\n { name: \"react-hooks-js\", specifier: resolved(\"eslint-plugin-react-hooks\") },\n { name: \"@eslint-react\", specifier: resolved(`${typedRules}/react`) },\n { name: \"@remotion\", specifier: resolved(`${typedRules}/remotion`) },\n { name: \"shadcn\", specifier: resolved(\"@shadcn/lint\") },\n { name: \"no-comments\", specifier: resolved(\"eslint-plugin-no-comments\") },\n { name: \"baseline-js\", specifier: resolved(\"eslint-plugin-baseline-js\") },\n { name: \"@html-eslint/react\", specifier: resolved(\"@html-eslint/eslint-plugin-react\") },\n { name: \"eslint-js\", specifier: resolved(\"oxlint-plugin-eslint\") },\n { name: decisionPluginName, specifier: resolved(\"@r_masseater/msch/decision-rules\") },\n { name: \"msch-lint\", specifier: resolved(\"@r_masseater/msch/lint-rules\") },\n];\n\nconst rules = {\n \"vite-plus/prefer-vite-plus-imports\": \"error\",\n \"tanstack-start/no-async-client-component\": \"error\",\n \"tanstack-start/no-client-code-in-server-component\": \"error\",\n \"no-comments/disallowComments\": [\"error\", { allow: COMMENT_DIRECTIVES }],\n ...allRulesOf({ prefix: \"tanstack-query\", rules: tanstackQuery.rules }),\n ...allRulesOf({ prefix: \"tanstack-router\", rules: tanstackRouter.rules }),\n \"drizzle/enforce-delete-with-where\": [\"error\", { drizzleObjectName: [\"db\"] }],\n \"drizzle/enforce-update-with-where\": [\"error\", { drizzleObjectName: [\"db\"] }],\n ...allRulesOf({ prefix: \"shadcn\", rules: shadcn.rules }),\n \"shadcn/no-restyle\": [\"error\", { contracts: shadcnRestyleContracts }],\n ...allRulesOf({ prefix: \"baseline-js\", rules: baselineJs.rules }),\n ...baselineJs.configs.recommended().rules,\n \"baseline-js/use-baseline\": [\n \"error\",\n {\n available: \"widely\",\n includeWebApis: { preset: \"auto\" },\n includeJsBuiltins: { preset: \"auto\" },\n },\n ],\n ...pluginRules,\n \"eslint/capitalized-comments\": \"off\",\n \"eslint/sort-imports\": \"off\",\n \"eslint/sort-keys\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/prefer-default-export\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/exports-last\": \"off\",\n \"msch-lint/ecosystem-readers\": \"error\",\n \"msch-lint/inline-exports\": \"error\",\n \"msch-lint/ui-state-in-atoms\": \"error\",\n \"msch-lint/no-hand-written-sql\": \"error\",\n \"react/react-in-jsx-scope\": \"off\",\n \"eslint/no-undef\": \"off\",\n \"typescript/promise-function-async\": \"off\",\n \"react/forbid-component-props\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"node/no-top-level-await\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"eslint/new-cap\": [\"error\", { capIsNew: false }],\n \"eslint/one-var\": [\"error\", \"never\"],\n \"unicorn/relative-url-style\": [\"error\", \"always\"],\n \"eslint/id-length\": [\"error\", { exceptions: [\"x\", \"y\"] }],\n \"jsdoc/check-tag-names\": [\"error\", { definedTags: [\"msch\"] }],\n \"jsdoc/require-param\": [\"error\", { exemptedBy: [\"inheritdoc\", \"internal\", \"msch\"] }],\n \"jsdoc/require-returns\": [\"error\", { exemptedBy: [\"inheritdoc\", \"internal\", \"msch\"] }],\n \"eslint-js/no-restricted-syntax\": [\"error\", ...cloudflareResourceSyntax],\n \"typescript/prefer-readonly-parameter-types\": [\n \"error\",\n { ignoreInferredTypes: true, allow: readonlyParameterAllow },\n ],\n \"eslint/no-duplicate-imports\": [\"error\", { allowSeparateTypeImports: true }],\n \"react/function-component-definition\": [\n \"error\",\n { namedComponents: \"arrow-function\", unnamedComponents: \"arrow-function\" },\n ],\n \"typescript/no-empty-interface\": [\"error\", { allowSingleExtends: true }],\n \"typescript/no-empty-object-type\": [\"error\", { allowInterfaces: \"with-single-extends\" }],\n \"react/jsx-filename-extension\": [\"error\", { extensions: [\".tsx\"] }],\n \"react/only-export-components\": [\"error\", { allowExportNames: [\"Route\"] }],\n} satisfies LintConfig[\"rules\"];\n\nconst overrides = [\n removalPolicyOverride,\n alchemyOverride,\n {\n files: [\"**/*.config.ts\", \"**/alchemy.*.ts\", \"**/decision-rules.ts\"],\n rules: { \"import/no-default-export\": \"off\" },\n },\n commandsOverride,\n {\n files: [\"**/vite.config.ts\"],\n rules: {\n \"eslint/max-lines\": \"off\",\n \"eslint/max-lines-per-function\": \"off\",\n \"baseline-js/use-baseline\": \"off\",\n },\n },\n] satisfies LintConfig[\"overrides\"];\n\nexport const lint = {\n ignorePatterns: generated,\n plugins: [\n \"eslint\",\n \"typescript\",\n \"unicorn\",\n \"oxc\",\n \"import\",\n \"react\",\n \"react-perf\",\n \"jsx-a11y\",\n \"jsdoc\",\n \"promise\",\n \"node\",\n \"effecttsgo\",\n ],\n categories: {\n correctness: \"error\",\n suspicious: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n style: \"error\",\n restriction: \"error\",\n nursery: \"error\",\n },\n jsPlugins,\n rules,\n overrides,\n settings: {\n [decisionPluginName]: {\n model: \"cloudflare/@cf/cloudflare/clef-flash\",\n timeoutMs: DECISION_TIMEOUT_MS,\n ci: \"skip\",\n },\n },\n options: {\n typeAware: true,\n typeCheck: true,\n denyWarnings: true,\n reportUnusedDisableDirectives: \"error\",\n },\n} satisfies LintConfig;\n","const UI_STATE = \"UI 状態は effect-atom だけで扱う\";\n\nexport const INSTRUMENTATION = \"計装は Effect のトレーシングだけで扱う\";\nconst INFRASTRUCTURE = \"インフラは Alchemy の IaC と Cloudflare だけで扱い、wrangler は使わない\";\n\nexport const requiredStack: Readonly<Record<string, readonly string[]>> = {\n [UI_STATE]: [\n \"zustand\",\n \"jotai\",\n \"valtio\",\n \"recoil\",\n \"mobx\",\n \"mobx-*\",\n \"redux\",\n \"@reduxjs/*\",\n \"react-redux\",\n \"xstate\",\n \"@xstate/*\",\n \"nanostores\",\n \"@nanostores/*\",\n \"@preact/signals*\",\n ],\n \"サーバー状態は TanStack Query と Eden だけで扱う\": [\n \"swr\",\n \"react-query\",\n \"@apollo/*\",\n \"urql\",\n \"@urql/*\",\n \"axios\",\n \"ky\",\n \"ofetch\",\n \"got\",\n \"node-fetch\",\n \"graphql-request\",\n \"@trpc/*\",\n ],\n \"ルーティングとサーバーは TanStack Start と Elysia だけで扱う\": [\n \"react-router\",\n \"react-router-dom\",\n \"next\",\n \"@remix-run/*\",\n \"wouter\",\n \"express\",\n \"hono\",\n \"fastify\",\n \"koa\",\n \"@nestjs/*\",\n ],\n \"データベースは Drizzle だけで扱い、スキーマはマイグレーションで生成する\": [\n \"prisma\",\n \"@prisma/*\",\n \"typeorm\",\n \"sequelize\",\n \"kysely\",\n \"knex\",\n \"@mikro-orm/*\",\n \"better-sqlite3\",\n \"pg\",\n \"mysql2\",\n ],\n \"認証は better-auth だけで扱う\": [\n \"next-auth\",\n \"@auth/*\",\n \"lucia\",\n \"passport\",\n \"passport-*\",\n \"@clerk/*\",\n \"firebase/auth\",\n \"@supabase/*\",\n ],\n \"UI は shadcn/ui と Tailwind CSS だけで組む\": [\n \"@mui/*\",\n \"antd\",\n \"@chakra-ui/*\",\n \"@mantine/*\",\n \"styled-components\",\n \"@emotion/*\",\n \"bootstrap\",\n \"react-bootstrap\",\n ],\n \"検証、日時、ログ、関数型ユーティリティは Effect だけで扱う\": [\n \"zod\",\n \"yup\",\n \"joi\",\n \"valibot\",\n \"arktype\",\n \"io-ts\",\n \"superstruct\",\n \"moment\",\n \"dayjs\",\n \"date-fns\",\n \"luxon\",\n \"winston\",\n \"pino\",\n \"bunyan\",\n \"loglevel\",\n \"lodash\",\n \"lodash-es\",\n \"ramda\",\n \"rxjs\",\n \"fp-ts\",\n \"neverthrow\",\n \"ts-results\",\n \"purify-ts\",\n ],\n \"CSV は effect/encoding の Csv だけで読み書きする\": [\n \"papaparse\",\n \"csv-parse\",\n \"csv-parser\",\n \"csv-stringify\",\n \"fast-csv\",\n \"@fast-csv/*\",\n \"d3-dsv\",\n ],\n \"tar は effect/encoding の Tar だけで読み書きする\": [\n \"modern-tar\",\n \"nanotar\",\n \"tar\",\n \"tar-stream\",\n \"tar-fs\",\n \"tar-js\",\n \"tarts\",\n \"it-tar\",\n ],\n \"エージェントスキルは vite.config.ts の skills に書き、msch --prepare で入れる\": [\"skills\"],\n \"フィーチャーフラグは OpenFeature だけで扱う\": [\n \"launchdarkly-*\",\n \"@launchdarkly/*\",\n \"@growthbook/*\",\n \"unleash-client\",\n \"flagsmith\",\n \"@vercel/flags\",\n ],\n \"テストは Vitest と Playwright だけで扱う\": [\n \"jest\",\n \"jest-*\",\n \"@jest/*\",\n \"ts-jest\",\n \"mocha\",\n \"jasmine\",\n \"jasmine-core\",\n \"ava\",\n \"cypress\",\n \"tap\",\n \"uvu\",\n ],\n \"決済は Stripe だけで扱う\": [\n \"@paypal/*\",\n \"paypal-rest-sdk\",\n \"braintree\",\n \"@paddle/*\",\n \"@lemonsqueezy/*\",\n \"square\",\n ],\n \"整形は Vite+ の vp fmt だけで扱う\": [\n \"prettier\",\n \"prettier-plugin-*\",\n \"@prettier/*\",\n \"@biomejs/*\",\n \"dprint\",\n ],\n \"lint は Vite+ の vp lint だけで扱い、ESLint のプラグインは oxlint の JS プラグインとして読む\": [\n \"eslint\",\n \"@eslint/*\",\n \"eslint-config-*\",\n \"tslint\",\n \"standard\",\n \"xo\",\n ],\n [INSTRUMENTATION]: [\"@opentelemetry/*\", \"dd-trace\", \"newrelic\"],\n [INFRASTRUCTURE]: [\n \"wrangler\",\n \"miniflare\",\n \"@cloudflare/vite-plugin\",\n \"@vercel/*\",\n \"@netlify/*\",\n \"aws-cdk\",\n \"aws-cdk-lib\",\n \"@pulumi/*\",\n \"cdktf\",\n ],\n};\n","export const tracedRules = {\n \"msch-lint/traced-elysia\": \"error\",\n \"msch-lint/traced-effect-run\": \"error\",\n} as const;\n","import remotion from \"@r_masseater/oxlint-typed-rules/remotion\";\n\nimport { allRulesOf } from \"./lint.config.ts\";\n\nexport const remotionRules = allRulesOf({ prefix: \"@remotion\", rules: remotion.rules });\n","import type { SteigerConfig } from \"@r_masseater/vite-plus-adopt\";\nimport fsd from \"@r_masseater/vite-plus-adopt/fsd\";\n\nexport const steigerRules: SteigerConfig = [\n ...fsd.configs.recommended,\n {\n rules: {\n \"fsd/excessive-slicing\": \"off\",\n \"fsd/insignificant-slice\": \"off\",\n \"fsd/no-cross-imports\": \"error\",\n \"fsd/no-higher-level-imports\": \"error\",\n \"fsd/no-wildcard-exports\": \"error\",\n },\n },\n];\n","import { createRequire } from \"node:module\";\n\nimport presetJa from \"@r_masseater/textlint-rule-preset-ja\";\nimport type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Option, Predicate, Record as Rec, pipe } from \"effect\";\n\nimport { JAPANESE } from \"#/shared/config/index.ts\";\n\ntype Preset = NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"presets\"]>[string];\ntype Rule = Preset[\"rules\"][string];\ntype Reporter = Extract<Rule, (...args: never) => unknown>;\ntype Fixable = Exclude<Rule, Reporter>;\n\nconst NO_HANDLERS = {};\n\nconst isPreset = (value: unknown): value is Preset =>\n Predicate.hasProperty(value, \"rules\") &&\n Predicate.isObject(value.rules) &&\n Predicate.hasProperty(value, \"rulesConfig\") &&\n Predicate.isObject(value.rulesConfig);\n\nconst presetIn = (value: unknown): Option.Option<Preset> => {\n if (isPreset(value)) {\n return Option.some(value);\n }\n if (Predicate.hasProperty(value, \"default\")) {\n return presetIn(value.default);\n }\n return Option.none();\n};\n\nconst required = createRequire(import.meta.url);\n\nconst presetOf = (specifier: string, loaded: unknown): Preset =>\n Option.getOrThrowWith(\n presetIn(loaded),\n () => new TypeError(`${specifier} does not export a textlint preset`),\n );\n\nconst japaneseOnly =\n (reporter: Reporter): Reporter =>\n (context, options) => {\n if (JAPANESE.test(context.getSource())) {\n return reporter(context, options);\n }\n return NO_HANDLERS;\n };\n\nconst forJapanese = (rule: Reporter | Readonly<Fixable>): Rule => {\n if (Predicate.isFunction(rule)) {\n return japaneseOnly(rule);\n }\n return { linter: japaneseOnly(rule.linter), fixer: japaneseOnly(rule.fixer) };\n};\n\nconst japanesePreset = (specifier: string, loaded: unknown): Preset => {\n const { rules, rulesConfig } = presetOf(specifier, loaded);\n return { rules: pipe(rules, Rec.map(forJapanese)), rulesConfig };\n};\n\nexport const textlintPresets: NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"presets\"]> = {\n \"@r_masseater/preset-ja\": japanesePreset(\"@r_masseater/textlint-rule-preset-ja\", presetJa),\n \"@textlint-ja/preset-ai-writing\": japanesePreset(\n \"@textlint-ja/textlint-rule-preset-ai-writing\",\n required(\"@textlint-ja/textlint-rule-preset-ai-writing\"),\n ),\n \"preset-ja-technical-writing\": japanesePreset(\n \"textlint-rule-preset-ja-technical-writing\",\n required(\"textlint-rule-preset-ja-technical-writing\"),\n ),\n};\n","import { definePlugin, defineRule } from \"@r_masseater/y8\";\nimport type { Y8Config, RuleEntry } from \"@r_masseater/y8\";\nimport { Array as Arr, Record as Rec, String as Str, pipe } from \"effect\";\n\nconst README = /(?:^|\\/)README\\.md$/iu;\nconst README_LINES = 150;\nconst NEXT_LINE = 1;\nconst HEADING_MARKS = /^#+\\s*|\\s*#*$/gu;\nconst API_HEADING =\n /^(?:api|api reference|options|configuration|parameters|props|reference|オプション|設定項目|リファレンス)$/iu;\n\nconst readmeLength = defineRule({\n meta: { description: \"A README stays short: the code and its types hold the details\" },\n create: (context) => ({\n document: (): void => {\n if (!README.test(context.filename) || context.lines.length <= README_LINES) {\n return;\n }\n context.report({\n line: README_LINES + NEXT_LINE,\n message: `README is longer than ${String(README_LINES)} lines; keep only what a reader needs to start`,\n });\n },\n }),\n});\n\nconst readmeApiSection = defineRule({\n meta: { description: \"A README has no API or option reference that repeats the types\" },\n create: (context) => ({\n heading: (node): void => {\n if (!README.test(context.filename)) {\n return;\n }\n const title = pipe(context.textOf(node), Str.replaceAll(HEADING_MARKS, \"\"));\n if (API_HEADING.test(title)) {\n context.report({\n node,\n message: \"README repeats the API; link the types or the source instead\",\n });\n }\n },\n }),\n});\n\nconst masseater = definePlugin({\n rules: { \"readme-length\": readmeLength, \"readme-api-section\": readmeApiSection },\n});\n\nconst ERROR: RuleEntry = \"error\";\n\nconst MASSEATER_RULES: Readonly<Record<string, RuleEntry>> = pipe(\n [\"readme-length\", \"readme-api-section\"],\n Arr.map((name): readonly [string, RuleEntry] => [`masseater/${name}`, ERROR]),\n Rec.fromEntries,\n);\n\nconst MARKDOWN_RULES: Readonly<Record<string, RuleEntry>> = {\n \"markdownlint/MD013\": \"off\",\n \"markdownlint/MD034\": \"off\",\n \"markdownlint/MD041\": \"off\",\n \"markdownlint/MD060\": \"off\",\n \"markdownlint/MD024\": [\"error\", { siblings_only: true }],\n \"markdownlint/MD026\": [\"error\", { punctuation: \".,;:。,;:\" }],\n};\n\nconst MARKDOWN_IGNORES = [\".agents/skills/**\", \"**/fixtures/**\", \"**/upstream/**\", \"CHANGELOG.md\"];\n\nexport interface MarkdownOptions {\n readonly ignores?: readonly string[];\n readonly rules?: Readonly<Record<string, RuleEntry>>;\n}\n\nexport const markdownOf = ({ ignores = [], rules = {} }: MarkdownOptions): Y8Config => ({\n plugins: { masseater },\n rules: { ...MARKDOWN_RULES, ...MASSEATER_RULES, ...rules },\n ignores: [...MARKDOWN_IGNORES, ...ignores],\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAM,UAAU;AAChB,MAAM,kBACJ;AAEF,MAAM,YAAY;AAClB,MAAM,oBACJ;AAEF,MAAM,0BACJ;AAEF,MAAa,2BACX;CACE;EACE,UAAU,qHAAqH,QAAQ;EACvI,SAAS;CACX;CACA;EACE,UAAU,sFAAsF,QAAQ;EACxG,SAAS;CACX;CACA;EACE,UAAU,iIAAiI,UAAU;EACrJ,SAAS;CACX;CACA;EACE,UAAU,+HAA+H,UAAU;EACnJ,SAAS;CACX;CACA;EACE,UACE;EACF,SAAS;CACX;CACA;EACE,UACE;EACF,SAAS;CACX;CACA;EACE,UACE;EACF,SAAS;CACX;CACA;EACE,UACE;EACF,SAAS;CACX;CACA;EACE,UACE;EACF,SACE;CACJ;CACA;EACE,UACE;EACF,SACE;CACJ;CACA;EACE,UACE;EACF,SACE;CACJ;CACA;EACE,UAAU;EACV,SACE;CACJ;AACF;AACF,MAAa,sBAAuE;CAClF,UACE;CACF,SACE;AACJ;AAEA,MAAa,wBAIT;CACF,OAAO,CAAC,SAAS;CACjB,cAAc,CAAC,cAAc;CAC7B,OAAO,EACL,kCAAkC;EAAC;EAAS,GAAG;EAA0B;CAAmB,EAC9F;AACF;AAEA,MAAa,kBAGT;CACF,OAAO,CAAC,mBAAmB;CAC3B,OAAO,EACL,kCAAkC;EAChC;EACA,GAAG;EACH;EACA;GACE,UAAU;GACV,SAAS;EACX;EACA;GACE,UACE;GACF,SACE;EACJ;EACA;GACE,UACE;GACF,SACE;EACJ;CACF,EACF;AACF;AAEA,MAAa,mBAGT;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M;CAAK;CAChF;EACE,MAAM;EACN,SAAS;EACT,MAAM,CAAC,2BAA2B,KAAK;CACzC;CACA;EAAE,MAAM;EAAoB,SAAS;EAAwB,MAAM;CAAc;CACjF;EACE,MAAM;EACN,SAAS;EACT,MAAM;GAAC;GAAc;GAAc;GAAgB;GAAc;EAAY;CAC/E;CACA;EACE,MAAM;EACN,SAAS;EACT,MAAM;GAAC;GAAc;GAAe;GAAa;GAAe;GAAQ;EAAa;CACvF;CACA;EAAE,MAAM;EAAoB,SAAS;EAAoB,MAAM;CAAa;CAC5E;EAAE,MAAM;EAAoB,SAAS;EAAW,MAAM;CAAS;CAC/D;EACE,MAAM;EACN,SAAS;EACT,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;CACA;EAAE,MAAM;EAAoB,SAAS;EAA4B,MAAM;CAAoB;CAC3F,GAAG;CACH;EACE,MAAM;EACN,SAAS;EACT,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;CACA;EAAE,MAAM;EAAoB,SAAS;EAAQ,MAAM;CAAa;CAChE;EACE,MAAM;EACN,SAAS;EACT,MAAM,CAAC,cAAc,kBAAkB;CACzC;CACA;EACE,MAAM;EACN,SAAS;EACT,MAAM;GAAC;GAAqB;GAA0B;EAAyB;CACjF;CACA;EAAE,MAAM;EAAoB,SAAS;EAAgC,MAAM;CAAY;CACvF;EACE,MAAM;EACN,SAAS;EACT,MAAM;GAAC;GAAkB;GAAU;EAAc;CACnD;CACA;EAAE,MAAM;EAAoB,SAAS;EAAc,MAAM,CAAC,UAAU,OAAO;CAAE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ACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,8CAA8C;EAC5C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,4CAA4C;EAC1C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yBAAyB;EACvB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,uCAAuC;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,qCAAqC;EACnC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yCAAyC;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yCAAyC;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,8DAA8D,CAAC,QAAQ;CACvE,gCAAgC;EAC9B;EACA;EACA;EACA;EACA;EACA;CACF;CACA,kCAAkC;EAChC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,oBAAoB;EAClB;EACA;EACA;EACA;EACA;EACA;CACF;CACA,4BAA4B;EAC1B;EACA;EACA;EACA;EACA;CACF;CACA,sEAAsE;EACpE;EACA;EACA;EACA;EACA;EACA;CACF;EACC,kBAAkB;EAAC;EAAoB;EAAY;CAAU;EAC7D,iBAAiB;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;;ACrLA,MAAa,cAAc;CACzB,2BAA2B;CAC3B,+BAA+B;AACjC;;ACCA,MAAa,gBAAgB,WAAW;CAAE,QAAQ;CAAa,OAAO,SAAS;AAAM,CAAC;;ACDtF,MAAa,eAA8B,CACzC,GAAG,IAAI,QAAQ,aACf,EACE,OAAO;CACL,yBAAyB;CACzB,2BAA2B;CAC3B,wBAAwB;CACxB,+BAA+B;CAC/B,2BAA2B;AAC7B,EACF,CACF;;ACDA,MAAM,cAAc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effect, Layer, Option, Schema } from "effect";
|
|
1
|
+
import { Context, Effect, FileSystem, Layer, Option, Path, Schema } from "effect";
|
|
2
|
+
import { ChildProcessSpawner } from "effect/process";
|
|
2
3
|
import "@pnpm/workspace.workspace-manifest-reader";
|
|
3
4
|
import { readWantedLockfile } from "@pnpm/lockfile.fs";
|
|
4
5
|
import { OxlintOverride } from "vite-plus/lint";
|
|
5
6
|
interface WorkspaceTasks {
|
|
6
7
|
readonly verify: readonly string[];
|
|
8
|
+
readonly native: readonly string[];
|
|
7
9
|
}
|
|
8
10
|
interface IgnoredDirectory {
|
|
9
11
|
readonly pattern: string;
|
|
@@ -39,4 +41,4 @@ interface SettingsOptions {
|
|
|
39
41
|
}
|
|
40
42
|
declare const workspaceSettings: (options: SettingsOptions) => Promise<WorkspaceSettings>;
|
|
41
43
|
export { SettingsOptions as a, workspaceSettings as c, WorkspaceTasks as d, RuleSets as i, IgnoredDirectory as l, DevDependencyAllowance as n, WorkspaceLint as o, RuleSet as r, WorkspaceSettings as s, DependencySets as t, ignoredDirectories as u };
|
|
42
|
-
//# sourceMappingURL=index-
|
|
44
|
+
//# sourceMappingURL=index-CcVKuHBw.d.mts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SteigerConfig, ToolSections } from "@r_masseater/vite-plus-adopt";
|
|
2
|
+
import { RuleEntry, Y8Config } from "@r_masseater/y8";
|
|
2
3
|
declare const generated: string[];
|
|
3
4
|
declare const allRulesOf: ({ prefix, rules }: Readonly<{
|
|
4
5
|
prefix: string;
|
|
@@ -7,7 +8,7 @@ declare const allRulesOf: ({ prefix, rules }: Readonly<{
|
|
|
7
8
|
declare const decisionPluginName: string;
|
|
8
9
|
declare const decisionRules: Readonly<Record<string, "error">>;
|
|
9
10
|
declare const decisionTestRules: Record<string, "off">;
|
|
10
|
-
declare const lint: {
|
|
11
|
+
declare const lint$1: {
|
|
11
12
|
ignorePatterns: string[];
|
|
12
13
|
plugins: ("effecttsgo" | "eslint" | "import" | "jsdoc" | "jsx-a11y" | "node" | "oxc" | "promise" | "react" | "react-perf" | "typescript" | "unicorn")[];
|
|
13
14
|
categories: {
|
|
@@ -213,5 +214,10 @@ declare const readonlyParameterAllow: ({
|
|
|
213
214
|
name: string;
|
|
214
215
|
})[];
|
|
215
216
|
declare const _default: import("@r_masseater/oxlint-plugin-decision").DecisionPlugin;
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
interface MarkdownOptions {
|
|
218
|
+
readonly ignores?: readonly string[];
|
|
219
|
+
readonly rules?: Readonly<Record<string, RuleEntry>>;
|
|
220
|
+
}
|
|
221
|
+
declare const markdownOf: ({ ignores, rules }: MarkdownOptions) => Y8Config;
|
|
222
|
+
export { allRulesOf as _, textlintPresets as a, generated as b, tracedRules as c, alchemyOverride as d, cloudflareResourceSyntax as f, lint$1 as g, removalPolicySyntax as h, readonlyParameterAllow as i, INSTRUMENTATION as l, removalPolicyOverride as m, markdownOf as n, steigerRules as o, commandsOverride as p, _default as r, remotionRules as s, MarkdownOptions as t, requiredStack as u, decisionRules as v, decisionTestRules as y };
|
|
223
|
+
//# sourceMappingURL=index-lM4Pphgz.d.mts.map
|
package/dist/lint.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { INSTRUMENTATION, alchemyOverride, allRulesOf, cloudflareResourceSyntax, commandsOverride, _default as decisionPlugin, decisionRules, decisionTestRules, generated, lint, readonlyParameterAllow, remotionRules, removalPolicyOverride, removalPolicySyntax, requiredStack, steigerRules, textlintPresets, tracedRules };
|
|
1
|
+
import { _ as allRulesOf, a as textlintPresets, b as generated, c as tracedRules, d as alchemyOverride, f as cloudflareResourceSyntax, g as lint, h as removalPolicySyntax, i as readonlyParameterAllow, l as INSTRUMENTATION, m as removalPolicyOverride, n as markdownOf, o as steigerRules, p as commandsOverride, r as _default, s as remotionRules, t as MarkdownOptions, u as requiredStack, v as decisionRules, y as decisionTestRules } from "./index-lM4Pphgz.mjs";
|
|
2
|
+
export { INSTRUMENTATION, type MarkdownOptions, alchemyOverride, allRulesOf, cloudflareResourceSyntax, commandsOverride, _default as decisionPlugin, decisionRules, decisionTestRules, generated, lint, markdownOf, readonlyParameterAllow, remotionRules, removalPolicyOverride, removalPolicySyntax, requiredStack, steigerRules, textlintPresets, tracedRules };
|
package/dist/lint.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { o as INSTRUMENTATION, h as alchemyOverride, u as allRulesOf, g as cloudflareResourceSyntax, _ as commandsOverride, m as decisionPlugin, d as decisionRules, f as decisionTestRules, p as generated, c as lint, t as markdownOf, l as readonlyParameterAllow, i as remotionRules, v as removalPolicyOverride, y as removalPolicySyntax, s as requiredStack, r as steigerRules, n as textlintPresets, a as tracedRules } from "./define-lint-preset-BYMl7wof.mjs";
|
package/dist/oxlint.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ProblemList, r as describeFinding, t as JSON_FLAG } from "./cli-contract-
|
|
1
|
+
import { n as ProblemList, r as describeFinding, t as JSON_FLAG } from "./cli-contract-8SnKqhGw.mjs";
|
|
2
2
|
import { Array, Option, Schema, pipe } from "effect";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { execFileSync } from "node:child_process";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RepositoryFiles, t as NODE_MODULES } from "./repository-files-
|
|
1
|
+
import { n as RepositoryFiles, t as NODE_MODULES } from "./repository-files-CorshdqY.mjs";
|
|
2
2
|
import { Array, Effect, Match, Option, Order, Predicate, Record, Schema, String as String$1, pipe } from "effect";
|
|
3
3
|
import { parse, resolveConfigFromFile } from "vite-plus";
|
|
4
4
|
import { readWorkspaceManifest } from "@pnpm/workspace.workspace-manifest-reader";
|
|
@@ -160,8 +160,12 @@ const workspaceConfigOf = Effect.fn("workspaceConfigOf")(function* workspaceConf
|
|
|
160
160
|
// src/entities/workspace/model/workspace-tasks.ts
|
|
161
161
|
const VERIFY_TASK = ["tasks", "verify"];
|
|
162
162
|
const TEST_TASK = ["tasks", "test"];
|
|
163
|
+
const NATIVE_TASK = ["tasks", "native"];
|
|
163
164
|
const RUN_TASKS = ["run", "tasks"];
|
|
164
|
-
const NO_TASKS = {
|
|
165
|
+
const NO_TASKS = {
|
|
166
|
+
verify: [],
|
|
167
|
+
native: []
|
|
168
|
+
};
|
|
165
169
|
const Tasks = Schema.Struct({ verify: Schema.Unknown });
|
|
166
170
|
const isVerified = Schema.is(Schema.Struct({ run: Schema.Struct({ tasks: Tasks }) }));
|
|
167
171
|
const definesTask = (path) => (program) => Array.isReadonlyArrayNonEmpty(nestedValues(path)(program));
|
|
@@ -174,7 +178,10 @@ const hasVerifyTask = Effect.fn("hasVerifyTask")(function* hasVerifyTask(file) {
|
|
|
174
178
|
});
|
|
175
179
|
const tasksOf = (manifest) => (program) => pipe(manifest, Option.flatMap((found) => Option.fromUndefinedOr(found.name)), Option.match({
|
|
176
180
|
onNone: () => NO_TASKS,
|
|
177
|
-
onSome: (name) => ({
|
|
181
|
+
onSome: (name) => ({
|
|
182
|
+
verify: Array.getSomes([Option.liftPredicate(`${name}#verify`, () => definesTask(VERIFY_TASK)(program)), Option.liftPredicate(`${name}#test`, () => definesTask(TEST_TASK)(program))]),
|
|
183
|
+
native: Array.filter([`${name}#native`], () => definesTask(NATIVE_TASK)(program))
|
|
184
|
+
})
|
|
178
185
|
}));
|
|
179
186
|
// src/entities/workspace/model/run-tasks.ts
|
|
180
187
|
const TaskProperty = Schema.Struct({
|
|
@@ -647,4 +654,4 @@ const publishedWorkspaces = Effect.fn("publishedWorkspaces")(function* published
|
|
|
647
654
|
});
|
|
648
655
|
export { programOf as A, stringsIn as B, TEST_TASK as C, tasksOf as D, hasVerifyTask as E, childrenOf as F, keyName as I, literalOf as L, usedFrom as M, workspaceConfigOf as N, literalSettings as O, KeySchema as P, nestedValues as R, RUN_TASKS as S, definesTask as T, publishedProjects as _, publicEntriesOf as a, runTasksOf as b, readManifest as c, lockedPackages as d, deployEntries as f, withoutRelative as g, prefixed as h, EntryManifestJson as i, settingsInvalid as j, merged as k, workspaceDependencies as l, patternOf as m, entriesOf as n, MANIFEST_FILE as o, namedWorkspaces as p, publishedWorkspaces as r, dependencyEntries as s, PackEntry as t, lockedGraph as u, workspaceDirectories as v, VERIFY_TASK as w, NO_TASKS as x, workspaceManifest as y, propertyValue as z };
|
|
649
656
|
|
|
650
|
-
//# sourceMappingURL=package-
|
|
657
|
+
//# sourceMappingURL=package-A62qq8pE.mjs.map
|