@r_masseater/msch 0.97.0 → 0.98.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.mjs +2 -2
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -2
- package/dist/decision-rules.d.mts +1 -1
- package/dist/decision-rules.mjs +1 -1
- package/dist/{define-lint-preset-B-hC9_df.mjs → define-lint-preset-YcRo_ZW9.mjs} +1 -5
- package/dist/define-lint-preset-YcRo_ZW9.mjs.map +1 -0
- package/dist/{index-CEazCJ_w.d.mts → index-CUrewm-i.d.mts} +2 -1
- package/dist/lint-rules.mjs +19 -0
- package/dist/lint-rules.mjs.map +1 -1
- package/dist/lint.d.mts +1 -1
- package/dist/lint.mjs +1 -1
- package/dist/{repository-text-DGfYd5Wq.mjs → repository-text-DE4rRWEZ.mjs} +2 -2
- package/dist/{repository-text-DGfYd5Wq.mjs.map → repository-text-DE4rRWEZ.mjs.map} +1 -1
- package/package.json +1 -1
- package/skills/msch-repository-config/SKILL.md +1 -1
- package/dist/define-lint-preset-B-hC9_df.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -11,8 +11,8 @@ import { r as JAPANESE } from "./config-BBdsNPSO.mjs";
|
|
|
11
11
|
import { d as RENOVATE_PRESET, f as SELF_NAME } from "./package-routes-BQWX5ttU.mjs";
|
|
12
12
|
import { n as readTree, t as loadLanguage } from "./tree-sitter-BfzHNwTR.mjs";
|
|
13
13
|
import { n as baseRevision, t as baseName$1 } from "./base-revision-Bl-4nxAd.mjs";
|
|
14
|
-
import { S as exempt, f as lint$3, h as decisionTestRules, n as MARKDOWN_RULES, t as MARKDOWN_IGNORES } from "./define-lint-preset-
|
|
15
|
-
import { a as MSCH_TASK_COMMANDS, n as builtTextRuleNames, r as secretsOf, t as TEXT_IGNORES } from "./repository-text-
|
|
14
|
+
import { S as exempt, f as lint$3, h as decisionTestRules, n as MARKDOWN_RULES, t as MARKDOWN_IGNORES } from "./define-lint-preset-YcRo_ZW9.mjs";
|
|
15
|
+
import { a as MSCH_TASK_COMMANDS, n as builtTextRuleNames, r as secretsOf, t as TEXT_IGNORES } from "./repository-text-DE4rRWEZ.mjs";
|
|
16
16
|
import { a as presentFiles, i as listedFiles, n as isScannedText, o as scanText, r as isToolVersions, t as upstreamRecords } from "./upstream-record-DRNGym9S.mjs";
|
|
17
17
|
import { a as offsetIn$1, i as namedCatalogsOf, n as manifestPattern, o as quoted$1, r as manifestSpecifiers, s as specifiedIn, t as fieldsOf } from "./specifiers-BrCyPubD.mjs";
|
|
18
18
|
import { i as withTrailingSlash, n as PUBLIC_REGISTRY, r as scopeOfName, t as INSTALL_REGISTRY } from "./registries-DePiYd3D.mjs";
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as WorkspaceSettings } from "./index-Dm0Gg9wS.mjs";
|
|
2
|
-
import { r as MarkdownOptions } from "./index-
|
|
2
|
+
import { r as MarkdownOptions } from "./index-CUrewm-i.mjs";
|
|
3
3
|
import { ToolSections } from "@r_masseater/vite-plus-adopt";
|
|
4
4
|
import { Schema } from "effect";
|
|
5
5
|
import { UserConfig } from "vite-plus";
|
package/dist/config.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as exempt, d as requiredStack, f as lint, h as decisionTestRules, o as structureOf, r as markdownOf } from "./define-lint-preset-
|
|
2
|
-
import { i as textlintOf, o as tasksOf, r as secretsOf } from "./repository-text-
|
|
1
|
+
import { S as exempt, d as requiredStack, f as lint, h as decisionTestRules, o as structureOf, r as markdownOf } from "./define-lint-preset-YcRo_ZW9.mjs";
|
|
2
|
+
import { i as textlintOf, o as tasksOf, r as secretsOf } from "./repository-text-DE4rRWEZ.mjs";
|
|
3
3
|
import { Array, Option, Record, pipe } from "effect";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { recommended } from "@r_masseater/fu4/presets";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as _default } from "./index-
|
|
1
|
+
import { a as _default } from "./index-CUrewm-i.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/decision-rules.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { g as default } from "./define-lint-preset-
|
|
1
|
+
export { g as default } from "./define-lint-preset-YcRo_ZW9.mjs";
|
|
@@ -102,10 +102,6 @@ const cloudflareResourceSyntax = [
|
|
|
102
102
|
{
|
|
103
103
|
selector: "CallExpression[callee.object.name=\"AI\"][callee.property.name=\"Gateway\"] > ObjectExpression.arguments:not(:has(Property[key.name=\"cacheTtl\"]))",
|
|
104
104
|
message: "AI Gateway には cacheTtl を付け、同じ問いの答えをキャッシュする。付けないと、同じ問いにも毎回課金される"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
selector: "MemberExpression[object.name=\"Rum\"][property.name=\"Site\"]",
|
|
108
|
-
message: "Rum.Site は使わない。CI のトークンに Account Settings Write が要る。Cloudflare API でホストごとに一度サイトを作り、トークンを CF_BEACON_TOKEN に置く"
|
|
109
105
|
}
|
|
110
106
|
];
|
|
111
107
|
const removalPolicySyntax = {
|
|
@@ -833,4 +829,4 @@ const markdownOf = ({ indexSkill, docs = {} }) => {
|
|
|
833
829
|
};
|
|
834
830
|
export { exempt as S, alchemyOverride as _, textlintPresets as a, removalPolicyOverride as b, remotionRules as c, requiredStack as d, lint as f, decision_rules_default as g, decisionTestRules as h, textlintFilters as i, tracedRules as l, decisionRules as m, MARKDOWN_RULES as n, structureOf as o, allRulesOf as p, markdownOf as r, videoRules as s, MARKDOWN_IGNORES as t, INSTRUMENTATION as u, cloudflareResourceSyntax as v, removalPolicySyntax as x, commandsOverride as y };
|
|
835
831
|
|
|
836
|
-
//# sourceMappingURL=define-lint-preset-
|
|
832
|
+
//# sourceMappingURL=define-lint-preset-YcRo_ZW9.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-lint-preset-YcRo_ZW9.mjs","names":["Rec","Arr","Str","effectPresets","decisionPlugin","shadcn","Str","Arr","Rec"],"sources":["../src/shared/config/exempt.ts","../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/web-guidance.config.ts","../src/features/define-lint-preset/config/lint.config.ts","../src/features/define-lint-preset/config/test-rules.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/video-rules.config.ts","../src/features/define-lint-preset/config/structure.config.ts","../src/features/define-lint-preset/config/kuromojin.config.ts","../src/features/define-lint-preset/config/textlint-presets.config.ts","../src/features/define-lint-preset/config/textlint-filters.config.ts","../src/features/define-lint-preset/config/markdown.config.ts"],"sourcesContent":["export const generated = [\n \"**/routeTree.gen.ts\",\n \"**/generated/**\",\n \"**/drizzle/**/snapshot.json\",\n \".claude/skills/**\",\n \".intent/**\",\n \"AGENTS.md\",\n \"CLAUDE.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 checkerInputs = [\"**/fixtures/**\"];\n\nconst vendored = [\"**/upstream/**\"];\n\nexport const exempt = [...generated, ...checkerInputs, ...vendored];\n","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\nconst UNGATED_MODEL_CALL =\n \"モデルの呼び出しは AI Gateway を通す。通らない呼び出しには日ごとの費用の上限が掛からず、無料枠を超えた分がそのまま請求される\";\n\nconst MODEL_RUN =\n 'CallExpression[callee.property.name=\"run\"]:matches([callee.object.name=\"AI\"], [callee.object.property.name=\"AI\"])';\n\nconst AI_RUN_URL =\n \":matches(Literal[value=/ai.run/], TemplateLiteral:has(TemplateElement[value.raw=/ai.run/]))\";\n\nconst AI_RUN_REQUEST = `CallExpression:has(> ${AI_RUN_URL})`;\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: `${MODEL_RUN}[arguments.length<3]`,\n message: UNATTRIBUTED_MODEL_CALL,\n },\n {\n selector: `${MODEL_RUN} > .arguments:nth-child(3):not(Identifier[name=\"options\"])`,\n message: `${UNGATED_MODEL_CALL}。AI.run の第 3 引数には、runWorkersAi の call が受け取る options をそのまま渡す`,\n },\n {\n selector: `${AI_RUN_REQUEST} > ObjectExpression.arguments:not(:has(Property[key.name=\"headers\"]))`,\n message: `${UNGATED_MODEL_CALL}。REST の /ai/run を呼ぶときは、headers に cf-aig-gateway-id を付ける`,\n },\n {\n selector: `${AI_RUN_REQUEST} > ObjectExpression.arguments > Property[key.name=\"headers\"] > ObjectExpression:not(:has(Property[key.value=\"cf-aig-gateway-id\"]))`,\n message: `${UNGATED_MODEL_CALL}。REST の /ai/run を呼ぶときは、headers に cf-aig-gateway-id を付ける`,\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 ];\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 type { UserConfig } from \"vite-plus\";\n\ntype LintRules = NonNullable<NonNullable<UserConfig[\"lint\"]>[\"rules\"]>;\n\nexport const webGuidanceRules = {\n \"jsx-a11y/no-redundant-roles\": [\"error\", { ul: [\"list\"], ol: [\"list\"] }],\n \"jsx-a11y/no-noninteractive-tabindex\": [\"error\", { tags: [\"section\"], roles: [\"tabpanel\"] }],\n} satisfies LintRules;\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\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 { webGuidanceRules } from \"./web-guidance.config.ts\";\n","import type { UserConfig } from \"vite-plus\";\n\ntype LintRules = NonNullable<NonNullable<UserConfig[\"lint\"]>[\"rules\"]>;\n\nconst NO_TEST_DOUBLES =\n \"依存の振る舞いを差し替えない。Effect の Layer を差し替えるか、本物の実装を使う\";\n\nexport const testRules = {\n \"vitest/expect-expect\": [\n \"error\",\n { assertFunctionNames: [\"expect\", \"expect*\", \"assert*\", \"waitFor*\", \"run\", \"*.run\"] },\n ],\n \"vitest/valid-expect\": [\"error\", { maxArgs: 2 }],\n \"vitest/valid-title\": [\"error\", { allowArguments: true }],\n \"vitest/prefer-called-times\": \"off\",\n \"vitest/prefer-import-in-mock\": \"off\",\n \"vitest/no-standalone-expect\": \"off\",\n \"vitest/no-conditional-in-test\": \"off\",\n \"vitest/require-test-timeout\": \"off\",\n \"vitest/prefer-expect-assertions\": \"off\",\n \"vitest/require-top-level-describe\": \"off\",\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/require-hook\": \"off\",\n \"vitest/no-hooks\": \"off\",\n \"vitest/consistent-test-it\": \"off\",\n \"vitest/prefer-describe-function-title\": \"off\",\n \"vitest/prefer-lowercase-title\": \"off\",\n \"vitest/prefer-to-be-truthy\": \"off\",\n \"vitest/prefer-to-be-falsy\": \"off\",\n \"vitest/padding-around-after-all-blocks\": \"off\",\n \"vitest/padding-around-test-blocks\": \"off\",\n \"vitest/max-expects\": \"off\",\n} satisfies LintRules;\n\nconst NO_FLAKE_MASKING =\n \"再試行や flakyTest で不安定なテストを隠さない。待つ対象のイベントを await して直す\";\n\nexport const testDoubleSyntax: readonly Readonly<{ selector: string; message: string }>[] = [\n {\n selector: 'CallExpression[callee.object.name=\"vi\"][callee.property.name=/^(mock|doMock)$/]',\n message: NO_TEST_DOUBLES,\n },\n {\n selector: 'CallExpression[callee.object.name=\"vi\"][callee.property.name=\"stubGlobal\"]',\n message: NO_TEST_DOUBLES,\n },\n];\n\nexport const flakeMaskingSyntax: readonly Readonly<{ selector: string; message: string }>[] = [\n { selector: 'Property[key.name=\"retry\"]', message: NO_FLAKE_MASKING },\n { selector: 'MemberExpression[property.name=\"retry\"]', message: NO_FLAKE_MASKING },\n { selector: 'MemberExpression[property.name=\"flakyTest\"]', message: NO_FLAKE_MASKING },\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 { DECISION_MODEL, DECISION_TIMEOUT_MS, generated } from \"#/shared/config/index.ts\";\n\nimport {\n alchemyOverride,\n cloudflareResourceSyntax,\n removalPolicyOverride,\n commandsOverride,\n} from \"./lint-overrides.config.ts\";\nimport {\n allRulesOf,\n decisionPluginName,\n pluginRules,\n shadcnRestyleContracts,\n webGuidanceRules,\n} from \"./lint.config.ts\";\nimport { flakeMaskingSyntax, testDoubleSyntax, testRules } from \"./test-rules.config.ts\";\n\ntype LintConfig = NonNullable<UserConfig[\"lint\"]>;\n\nconst resolved = (specifier: string): string => fileURLToPath(import.meta.resolve(specifier));\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: \"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 ...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 ignoreFeatures: [\"top-level-await\"],\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 ...testRules,\n ...webGuidanceRules,\n \"msch-lint/array-from-async\": \"error\",\n \"msch-lint/ecosystem-readers\": \"error\",\n \"msch-lint/explicit-import-path\": \"error\",\n \"msch-lint/get-or-insert\": \"error\",\n \"msch-lint/mcp-tool-layer\": \"error\",\n \"msch-lint/main-through-node-main\": \"error\",\n \"msch-lint/inline-exports\": \"error\",\n \"msch-lint/ui-state-in-atoms\": \"error\",\n \"msch-lint/no-hand-written-sql\": \"error\",\n \"msch-lint/platform-node-by-module\": \"error\",\n \"msch-lint/readonly-parameters\": \"error\",\n \"msch-lint/separate-min-max\": \"error\",\n \"msch-lint/typed-calls-not-reflect\": \"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\", \"stability\"] }],\n \"jsdoc/require-param\": [\"error\", { exemptedBy: [\"inheritdoc\", \"internal\", \"msch\", \"stability\"] }],\n \"jsdoc/require-returns\": [\n \"error\",\n { exemptedBy: [\"inheritdoc\", \"internal\", \"msch\", \"stability\"] },\n ],\n \"eslint-js/no-restricted-syntax\": [\"error\", ...cloudflareResourceSyntax],\n \"typescript/prefer-readonly-parameter-types\": \"off\",\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 actionScriptsOverride = {\n files: [\".github/**/*.ts\"],\n rules: {\n \"baseline-js/use-baseline\": \"off\",\n \"effecttsgo/async-function\": \"off\",\n \"effecttsgo/global-console\": \"off\",\n \"effecttsgo/global-fetch\": \"off\",\n \"effecttsgo/global-json\": \"off\",\n \"effecttsgo/missing-pipeable-signature\": \"off\",\n \"effecttsgo/node-builtin-import\": \"off\",\n \"effecttsgo/prefer-effect-array\": \"off\",\n \"effecttsgo/prefer-effect-record\": \"off\",\n \"effecttsgo/prefer-effect-string\": \"off\",\n \"effecttsgo/process-env\": \"off\",\n \"eslint/no-console\": \"off\",\n \"eslint/no-undefined\": \"off\",\n \"import/no-relative-parent-imports\": \"off\",\n \"node/no-process-env\": \"off\",\n \"node/no-sync\": \"off\",\n \"oxc/no-async-await\": \"off\",\n \"unicorn/no-process-exit\": \"off\",\n },\n} satisfies NonNullable<LintConfig[\"overrides\"]>[number];\n\nconst overrides = [\n removalPolicyOverride,\n actionScriptsOverride,\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: [\"**/bin/**\"],\n rules: { \"baseline-js/use-baseline\": \"off\" },\n },\n {\n files: [\"**/*.test.ts\", \"**/*.test.tsx\", \"**/*.test.support.ts\", \"**/vite.config.ts\"],\n rules: {\n \"eslint-js/no-restricted-syntax\": [\n \"error\",\n ...cloudflareResourceSyntax,\n ...flakeMaskingSyntax,\n ...testDoubleSyntax,\n ],\n },\n },\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 \"vitest\",\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: DECISION_MODEL,\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 { VideoIntro } from \"#/shared/config/index.ts\";\n\nexport interface VideoSayOptions {\n readonly terms?: Readonly<Record<string, string>>;\n readonly banned?: Readonly<Record<string, string>>;\n readonly maxEmphasis?: number;\n}\n\nexport interface VideoSeriesOptions {\n readonly values?: Readonly<Record<string, string>>;\n readonly voices?: readonly string[];\n readonly opener?: string;\n readonly closer?: string;\n readonly intro?: VideoIntro;\n readonly introValues?: Readonly<Record<string, string>>;\n readonly afterIntro?: Readonly<Record<string, string>>;\n}\n\nexport interface VideoRulesOptions {\n readonly say: VideoSayOptions;\n readonly series: Readonly<Record<string, VideoSeriesOptions>>;\n readonly banned?: Readonly<Record<string, string>>;\n}\n\nexport const videoRules = ({ say, series, banned = {} }: VideoRulesOptions) =>\n ({\n \"msch-lint/video-say\": [\"error\", say],\n \"msch-lint/video-readings\": \"error\",\n \"msch-lint/video-series\": [\"error\", { series, banned }],\n }) as const;\n","import type { WismConfig } from \"@r_masseater/wism\";\nimport { rustCrate, skill, structure, workspace } from \"@r_masseater/wism/presets\";\nimport { Array as Arr, Predicate, String as Str, pipe } from \"effect\";\n\nconst NEGATION = \"!\";\nconst isIgnore = Predicate.not(Str.startsWith(NEGATION));\n\nexport interface StructureOptions {\n readonly members: readonly string[];\n readonly ignorePatterns: readonly string[];\n}\n\nexport const structureOf = ({ members, ignorePatterns }: StructureOptions): WismConfig =>\n structure({\n kinds: [workspace({ paths: members }), rustCrate(), skill()],\n ignores: pipe(ignorePatterns, Arr.filter(isIgnore)),\n });\n","import { createRequire, registerHooks } from \"node:module\";\n\nexport const KUROMOJIN = \"kuromojin\";\nconst ON_Y8 = \"@r_masseater/y8/kuromojin\";\n\nexport const requireWithY8Kuromojin = (parentUrl: string): NodeJS.Require => {\n registerHooks({\n resolve: (specifier, context, nextResolve) => {\n if (specifier === KUROMOJIN) {\n return nextResolve(ON_Y8, { ...context, parentURL: import.meta.url });\n }\n return nextResolve(specifier, context);\n },\n });\n return createRequire(parentUrl);\n};\n","import 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\nimport { requireWithY8Kuromojin } from \"./kuromojin.config.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 = requireWithY8Kuromojin(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 { createRequire } from \"node:module\";\n\nimport type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Option, Predicate, pipe } from \"effect\";\n\ntype Filter = NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"filterModules\"]>[string];\n\nconst isFilter = (value: unknown): value is Filter => Predicate.isFunction(value);\n\nconst filterIn = (specifier: string, loaded: unknown): Filter =>\n pipe(\n Option.liftPredicate(loaded, isFilter),\n Option.getOrThrowWith(() => new TypeError(`${specifier} does not export a textlint filter`)),\n );\n\nexport const textlintFilters: NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"filterModules\"]> =\n {\n comments: filterIn(\n \"textlint-filter-rule-comments\",\n createRequire(import.meta.url)(\"textlint-filter-rule-comments\"),\n ),\n };\n","import type { Y8Config } from \"@r_masseater/y8\";\nimport { recommended } from \"@r_masseater/y8/presets\";\nimport type { RecommendedOptions } from \"@r_masseater/y8/presets\";\nimport { Option } from \"effect\";\n\nimport { exempt } from \"#/shared/config/index.ts\";\n\ntype SkillNames = NonNullable<NonNullable<RecommendedOptions[\"skills\"]>[\"skillNames\"]>;\n\nconst skillNamesOf = (indexSkill: Option.Option<string>): SkillNames =>\n Option.match(indexSkill, {\n onNone: (): SkillNames => ({}),\n onSome: (index): SkillNames => ({ index }),\n });\n\nconst docsOf = (indexSkill: Option.Option<string>): RecommendedOptions => {\n const skillNames = skillNamesOf(indexSkill);\n return {\n agents: {\n sections: [[\"Tech stack\"], [\"Commands\"], [\"Rules\"]],\n commands: [\"Commands\"],\n stack: [\"Tech stack\"],\n skillNames,\n },\n skills: { skillNames },\n };\n};\n\nexport const MARKDOWN_IGNORES = [\".agents/skills/**\", \"CHANGELOG.md\", \"**/CLAUDE.md\", ...exempt];\n\nexport const MARKDOWN_RULES = { \"agnix/XP-001\": \"off\" } as const;\n\nexport interface MarkdownOptions {\n readonly indexSkill: Option.Option<string>;\n readonly docs?: RecommendedOptions;\n}\n\nexport const markdownOf = ({ indexSkill, docs = {} }: MarkdownOptions): Y8Config => {\n const base = docsOf(indexSkill);\n return {\n extends: [\n recommended({\n ...base,\n ...docs,\n agents: { ...base.agents, ...docs.agents },\n skills: { ...base.skills, ...docs.skills },\n }),\n ],\n rules: MARKDOWN_RULES,\n reportUnusedDirectives: true,\n ignores: MARKDOWN_IGNORES,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAa,YAAY;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,gBAAgB,CAAC,gBAAgB;AAEvC,MAAM,WAAW,CAAC,gBAAgB;AAElC,MAAa,SAAS;CAAC,GAAG;CAAW,GAAG;CAAe,GAAG;AAAQ;;ACnBlE,MAAM,UAAU;AAChB,MAAM,kBACJ;AAEF,MAAM,YAAY;AAClB,MAAM,oBACJ;AAEF,MAAM,0BACJ;AAEF,MAAM,qBACJ;AAEF,MAAM,YACJ;AAKF,MAAM,iBAAiB;AAEvB,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,UAAU,GAAG,UAAU;EACvB,SAAS;CACX;CACA;EACE,UAAU,GAAG,UAAU;EACvB,SAAS,GAAG,mBAAmB;CACjC;CACA;EACE,UAAU,GAAG,eAAe;EAC5B,SAAS,GAAG,mBAAmB;CACjC;CACA;EACE,UAAU,GAAG,eAAe;EAC5B,SAAS,GAAG,mBAAmB;CACjC;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;AACF;AACF,MAAa,sBAAuE;CAClF,UACE;CACF,SACE;AACJ;AAEA,MAAa,wBAIT;CACF,OAAO,CAAC,SAAS;CACjB,cAAc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ChB,sBAAsB;IACtB,2BAA2B;GAC7B;EAKoB;EACpB;EACA;GACE,OAAO;IAAC;IAAkB;IAAmB;GAAsB;GACnE,OAAO,EAAE,4BAA4B,MAAM;EAC7C;EACA;EACA;GACE,OAAO,CAAC,WAAW;GACnB,OAAO,EAAE,4BAA4B,MAAM;EAC7C;EACA;GACE,OAAO;IAAC;IAAgB;IAAiB;IAAwB;GAAmB;GACpF,OAAO,EACL,kCAAkC;IAChC;IACA,GAAG;IACH,GAAG;IACH,GAAG;GACL,EACF;EACF;EACA;GACE,OAAO,CAAC,mBAAmB;GAC3B,OAAO;IACL,oBAAoB;IACpB,iCAAiC;IACjC,4BAA4B;GAC9B;EACF;CA+BA;CACA,UAAU,GACP,qBAAqB;EACpB,OAAO;EACP,WAAW;EACX,IAAI;CACN,EACF;CACA,SAAS;EACP,WAAW;EACX,WAAW;EACX,cAAc;EACd,+BAA+B;CACjC;AACF;;AC9NA,MAAM,WAAW;AAEjB,MAAa,kBAAkB;AAC/B,MAAM,iBAAiB;AAEvB,MAAa,gBAA6D;EACvE,WAAW;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,uCAAuC;EACrC;EACA;EACA;EACA;EACA;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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QAAQ,QAAQ,GACrC,OAAO,qCAAqB,IAAI,UAAU,GAAG,UAAU,mCAAmC,CAAC,CAC7F;AAEF,MAAa,kBACX,EACE,UAAU,SACR,iCACA,cAAc,YAAY,GAAG,CAAC,CAAC,+BAA+B,CAChE,EACF;;ACZF,MAAM,gBAAgB,eACpB,OAAO,MAAM,YAAY;CACvB,eAA2B,CAAC;CAC5B,SAAS,WAAuB,EAAE,MAAM;AAC1C,CAAC;AAEH,MAAM,UAAU,eAA0D;CACxE,MAAM,aAAa,aAAa,UAAU;CAC1C,OAAO;EACL,QAAQ;GACN,UAAU;IAAC,CAAC,YAAY;IAAG,CAAC,UAAU;IAAG,CAAC,OAAO;GAAC;GAClD,UAAU,CAAC,UAAU;GACrB,OAAO,CAAC,YAAY;GACpB;EACF;EACA,QAAQ,EAAE,WAAW;CACvB;AACF;AAEA,MAAa,mBAAmB;CAAC;CAAqB;CAAgB;CAAgB,GAAG;AAAM;AAE/F,MAAa,iBAAiB,EAAE,gBAAgB,MAAM;AAOtD,MAAa,cAAc,EAAE,YAAY,OAAO,CAAC,QAAmC;CAClF,MAAM,OAAO,OAAO,UAAU;CAC9B,OAAO;EACL,SAAS,CACP,YAAY;GACV,GAAG;GACH,GAAG;GACH,QAAQ;IAAE,GAAG,KAAK;IAAQ,GAAG,KAAK;GAAO;GACzC,QAAQ;IAAE,GAAG,KAAK;IAAQ,GAAG,KAAK;GAAO;EAC3C,CAAC,CACH;EACA,OAAO;EACP,wBAAwB;EACxB,SAAS;CACX;AACF"}
|
|
@@ -242,6 +242,7 @@ interface VideoSeriesOptions {
|
|
|
242
242
|
readonly opener?: string;
|
|
243
243
|
readonly closer?: string;
|
|
244
244
|
readonly intro?: VideoIntro;
|
|
245
|
+
readonly introValues?: Readonly<Record<string, string>>;
|
|
245
246
|
readonly afterIntro?: Readonly<Record<string, string>>;
|
|
246
247
|
}
|
|
247
248
|
interface VideoRulesOptions {
|
|
@@ -275,4 +276,4 @@ interface MarkdownOptions {
|
|
|
275
276
|
}
|
|
276
277
|
declare const markdownOf: ({ indexSkill, docs }: MarkdownOptions) => Y8Config;
|
|
277
278
|
export { lint$2 as C, decisionTestRules as E, removalPolicySyntax as S, decisionRules as T, exempt as _, _default as a, commandsOverride as b, structureOf as c, VideoSeriesOptions as d, videoRules as f, requiredStack as g, INSTRUMENTATION as h, markdownOf as i, VideoRulesOptions as l, tracedRules as m, MARKDOWN_RULES as n, textlintFilters as o, remotionRules as p, MarkdownOptions as r, textlintPresets as s, MARKDOWN_IGNORES as t, VideoSayOptions as u, alchemyOverride as v, allRulesOf as w, removalPolicyOverride as x, cloudflareResourceSyntax as y };
|
|
278
|
-
//# sourceMappingURL=index-
|
|
279
|
+
//# sourceMappingURL=index-CUrewm-i.d.mts.map
|
package/dist/lint-rules.mjs
CHANGED
|
@@ -940,6 +940,18 @@ const checkIntro = (check) => {
|
|
|
940
940
|
}
|
|
941
941
|
checkPlain(check, intro.value);
|
|
942
942
|
};
|
|
943
|
+
const checkIntroValues = ({ context, script, name, values }) => {
|
|
944
|
+
for (const cut of Option.toArray(Array.findFirst(cutsOf({
|
|
945
|
+
context,
|
|
946
|
+
script
|
|
947
|
+
}), isIntro))) checkValues({
|
|
948
|
+
context,
|
|
949
|
+
object: cut,
|
|
950
|
+
values,
|
|
951
|
+
name,
|
|
952
|
+
before: Option.none()
|
|
953
|
+
});
|
|
954
|
+
};
|
|
943
955
|
const checkAfterIntro = ({ context, script, name, values }) => {
|
|
944
956
|
const cuts = cutsOf({
|
|
945
957
|
context,
|
|
@@ -975,6 +987,7 @@ const SeriesSchema = Schema.Struct({
|
|
|
975
987
|
opener: Schema.optional(Schema.String),
|
|
976
988
|
closer: Schema.optional(Schema.String),
|
|
977
989
|
intro: Schema.optional(Schema.Literals(VIDEO_INTROS)),
|
|
990
|
+
introValues: Schema.optional(Texts),
|
|
978
991
|
afterIntro: Schema.optional(Texts)
|
|
979
992
|
});
|
|
980
993
|
const optionsOf = optionsWith({
|
|
@@ -1051,6 +1064,12 @@ const checkSeries = (check) => {
|
|
|
1051
1064
|
name,
|
|
1052
1065
|
before: propertyOf$1(CUTS)(script)
|
|
1053
1066
|
});
|
|
1067
|
+
checkIntroValues({
|
|
1068
|
+
context,
|
|
1069
|
+
script,
|
|
1070
|
+
name,
|
|
1071
|
+
values: series.introValues ?? {}
|
|
1072
|
+
});
|
|
1054
1073
|
checkAfterIntro({
|
|
1055
1074
|
context,
|
|
1056
1075
|
script,
|
package/dist/lint-rules.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint-rules.mjs","names":["START","END","ONE","textOf","Str","Arr","MESSAGE","ONE","Arr","Arr","Rec","MESSAGE_ID","MESSAGE","Str","Arr","isStringLiteral","visitorOf","MESSAGE","Arr","MESSAGE","Arr","MESSAGE","Str","Arr","Arr","Arr","Str","MESSAGE","Arr","unwrapped","Str","Arr","START","NEXT","propertyOf","Arr","Str","MESSAGES","Arr","Str","MESSAGES","OptionsSchema","optionsOf","Str","Arr","Rec","NEXT","Arr","propertyOf","Rec","propertyOf","Arr","Str","propertyOf","Arr","Rec","Arr","Str","Rec"],"sources":["../src/features/define-lint-rules/model/get-or-insert-ast.ts","../src/features/define-lint-rules/model/array-from-async.ts","../src/features/define-lint-rules/model/ecosystem-readers.ts","../src/features/define-lint-rules/model/typed-rule.ts","../src/features/define-lint-rules/model/explicit-import-path.ts","../src/features/define-lint-rules/model/get-or-insert.ts","../src/features/define-lint-rules/model/inline-exports.ts","../src/features/define-lint-rules/model/mcp-tool-layer.ts","../src/features/define-lint-rules/model/declared-outside.ts","../src/features/define-lint-rules/model/writable-part.ts","../src/features/define-lint-rules/model/readonly-parameters.ts","../src/features/define-lint-rules/model/separate-min-max.ts","../src/features/define-lint-rules/model/video-script-ast.ts","../src/features/define-lint-rules/model/video-readings.ts","../src/features/define-lint-rules/model/video-say.ts","../src/features/define-lint-rules/model/video-values.ts","../src/features/define-lint-rules/model/video-intro.ts","../src/features/define-lint-rules/model/video-series.ts","../src/features/define-lint-rules/model/video-rules.ts","../src/features/define-lint-rules/model/coded-rules.ts","../src/features/define-lint-rules/model/intent-rule.ts","../src/features/define-lint-rules/model/intents.ts","../src/features/define-lint-rules/model/plugin.ts"],"sourcesContent":["import { Array as Arr, Option, Predicate, Schema, String as Str, pipe } from \"effect\";\n\nexport type Keys = Readonly<Record<string, readonly string[] | undefined>>;\n\nexport interface Scope {\n readonly text: string;\n readonly keys: Keys;\n}\n\nexport interface Access {\n readonly map: string;\n readonly key: string;\n readonly value: Option.Option<string>;\n}\n\nconst START = 0;\nconst END = 1;\nconst KEY = 0;\nconst VALUE = 1;\nconst ONE = 1;\n\nconst RangeSchema = Schema.Tuple([Schema.Finite, Schema.Finite]);\nconst RangedSchema = Schema.Struct({ range: RangeSchema });\n\ntype Ranged = typeof RangedSchema.Type;\n\nconst decodeRanged = Schema.decodeUnknownOption(RangedSchema);\n\nconst IdentifierSchema = Schema.Struct({ type: Schema.Literal(\"Identifier\"), name: Schema.String });\n\nconst MemberSchema = Schema.Struct({\n type: Schema.Literal(\"MemberExpression\"),\n computed: Schema.Literal(false),\n object: RangedSchema,\n property: IdentifierSchema,\n});\n\nconst MemberCallSchema = Schema.Struct({\n type: Schema.Literal(\"CallExpression\"),\n callee: MemberSchema,\n arguments: Schema.Array(RangedSchema),\n});\n\nconst decodeMemberCall = Schema.decodeUnknownOption(MemberCallSchema);\n\nconst decodeCall = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"CallExpression\"),\n callee: RangedSchema,\n arguments: Schema.Array(Schema.Unknown),\n }),\n);\n\nconst decodeBlock = Schema.decodeUnknownOption(\n Schema.Struct({ type: Schema.Literal(\"BlockStatement\"), body: Schema.Array(Schema.Unknown) }),\n);\n\nconst decodeExpressionStatement = Schema.decodeUnknownOption(\n Schema.Struct({ type: Schema.Literal(\"ExpressionStatement\"), expression: Schema.Unknown }),\n);\n\nconst decodeReturn = Schema.decodeUnknownOption(\n Schema.Struct({ type: Schema.Literal(\"ReturnStatement\"), argument: RangedSchema }),\n);\n\nconst decodeTyped = Schema.decodeUnknownOption(Schema.Struct({ type: Schema.String }));\n\nconst textOf =\n (scope: Scope) =>\n (node: Ranged): string =>\n Str.slice(node.range[START], node.range[END])(scope.text);\n\nexport const textOfNode =\n (scope: Scope) =>\n (node: unknown): Option.Option<string> =>\n pipe(decodeRanged(node), Option.map(textOf(scope)));\n\nexport const accessOf =\n (scope: Scope) =>\n (method: string) =>\n (node: unknown): Option.Option<Access> =>\n pipe(\n decodeMemberCall(node),\n Option.filter((call) => call.callee.property.name === method),\n Option.flatMap((call) =>\n pipe(\n Arr.get(call.arguments, KEY),\n Option.map((key) => ({\n map: textOf(scope)(call.callee.object),\n key: textOf(scope)(key),\n value: pipe(Arr.get(call.arguments, VALUE), Option.map(textOf(scope))),\n })),\n ),\n ),\n );\n\nexport const sameEntry =\n (left: Access) =>\n (right: Access): boolean =>\n left.map === right.map && left.key === right.key;\n\nexport const calleeMatches =\n (scope: Scope) =>\n (pattern: RegExp) =>\n (node: unknown): Option.Option<readonly unknown[]> =>\n pipe(\n decodeCall(node),\n Option.filter((call) => pattern.test(textOf(scope)(call.callee))),\n Option.map((call) => call.arguments),\n );\n\nexport const expressionOf = (statement: unknown): Option.Option<unknown> =>\n pipe(\n decodeExpressionStatement(statement),\n Option.map((found) => found.expression),\n );\n\nexport const returnedText =\n (scope: Scope) =>\n (statement: unknown): Option.Option<string> =>\n pipe(\n decodeReturn(statement),\n Option.map((found) => textOf(scope)(found.argument)),\n );\n\nexport const bodyOf = (node: unknown): Option.Option<readonly unknown[]> =>\n pipe(\n decodeBlock(node),\n Option.map((block) => block.body),\n );\n\nexport const onlyStatement = (statement: unknown): Option.Option<unknown> =>\n Option.match(bodyOf(statement), {\n onNone: () => Option.some(statement),\n onSome: (body) =>\n Option.flatMap(\n Option.liftPredicate(body, (all) => all.length === ONE),\n Arr.head,\n ),\n });\n\nexport const typeOf = (node: unknown): string =>\n pipe(decodeTyped(node), Option.match({ onNone: () => \"\", onSome: (found) => found.type }));\n\nexport const parentOf = (node: unknown): Option.Option<unknown> =>\n pipe(\n Option.liftPredicate(node, Predicate.hasProperty(\"parent\")),\n Option.flatMap((found) => Option.fromNullishOr(found.parent)),\n );\n\nconst childrenOf = (keys: Keys, node: unknown): readonly unknown[] =>\n pipe(\n Option.liftPredicate(node, Predicate.isObject),\n Option.match({\n onNone: (): readonly unknown[] => [],\n onSome: (found) =>\n pipe(\n keys[typeOf(found)] ?? [],\n Arr.flatMap((key): readonly unknown[] =>\n pipe(\n Option.liftPredicate(found, Predicate.hasProperty(key)),\n Option.match({\n onNone: (): readonly unknown[] => [],\n onSome: (owner) => Arr.ensure(owner[key]),\n }),\n ),\n ),\n Arr.filter(Predicate.isObject),\n ),\n }),\n );\n\nexport const descendants =\n (keys: Keys) =>\n (node: unknown): readonly unknown[] => [\n node,\n ...pipe(childrenOf(keys, node), Arr.flatMap(descendants(keys))),\n ];\n\nexport const accessesIn =\n (scope: Scope) =>\n (method: string) =>\n (node: unknown): readonly Access[] =>\n pipe(descendants(scope.keys)(node), Arr.map(accessOf(scope)(method)), Arr.getSomes);\n","import { Array as Arr, Option, Schema, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nimport { expressionOf, onlyStatement } from \"./get-or-insert-ast.ts\";\n\nconst MESSAGE =\n \"Collect an async iterable with Array.fromAsync, passing the mapping as its second argument. Do not push each item from a for await loop.\";\n\nconst ONE = 1;\n\nconst DeclarationSchema = Schema.Struct({\n type: Schema.Literal(\"VariableDeclaration\"),\n declarations: Schema.Array(Schema.Unknown),\n});\n\nconst decodeLoop = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"ForOfStatement\"),\n await: Schema.Literal(true),\n left: DeclarationSchema,\n body: Schema.Unknown,\n }),\n);\n\nconst PushNameSchema = Schema.Struct({\n type: Schema.Literal(\"Identifier\"),\n name: Schema.Literal(\"push\"),\n});\n\nconst PushCalleeSchema = Schema.Struct({\n type: Schema.Literal(\"MemberExpression\"),\n computed: Schema.Literal(false),\n property: PushNameSchema,\n});\n\nconst ArgumentSchema = Schema.Struct({ type: Schema.String });\n\nconst decodePush = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"CallExpression\"),\n callee: PushCalleeSchema,\n arguments: Schema.Array(ArgumentSchema),\n }),\n);\n\nconst pushesOne = (statement: unknown): boolean =>\n pipe(\n expressionOf(statement),\n Option.flatMap(decodePush),\n Option.exists(\n (call) =>\n call.arguments.length === ONE &&\n !pipe(\n call.arguments,\n Arr.some((argument) => argument.type === \"SpreadElement\"),\n ),\n ),\n );\n\nconst collectsByHand = (node: unknown): boolean =>\n pipe(\n decodeLoop(node),\n Option.filter((loop) => loop.left.declarations.length === ONE),\n Option.flatMap((loop) => onlyStatement(loop.body)),\n Option.exists(pushesOne),\n );\n\nexport const arrayFromAsync: Rule = {\n meta: { type: \"suggestion\" },\n create: (context) => ({\n ForOfStatement: (node): void => {\n if (collectsByHand(node)) {\n context.report({ node, message: MESSAGE });\n }\n },\n }),\n};\n","import { baseName } from \"@masseater.dev/path-kit\";\nimport { Array as Arr, Option, Record as Rec, pipe } from \"effect\";\nimport type { Context, ESTree, Rule } from \"vite-plus/lint/plugins\";\n\ntype Format = \"json\" | \"toml\" | \"typescript\" | \"yaml\";\n\ninterface EcosystemFile {\n readonly name: RegExp;\n readonly format: Format;\n readonly reader: string;\n}\n\nconst ECOSYSTEM_FILES: readonly EcosystemFile[] = [\n {\n name: /^pnpm-workspace\\.yaml$/u,\n format: \"yaml\",\n reader:\n \"readWorkspaceManifest, findWorkspaceProjects or updateWorkspaceManifest from @r_masseater/masseater-utils/kestrion/pnpm, which run the @pnpm readers\",\n },\n {\n name: /^pnpm-lock\\.yaml$/u,\n format: \"yaml\",\n reader:\n \"readWantedLockfile, lockedPackageIds or lockedGraph from @r_masseater/masseater-utils/kestrion/pnpm, which run @pnpm/lockfile.fs\",\n },\n { name: /^Cargo\\.(?:toml|lock)$/u, format: \"toml\", reader: \"cargo metadata\" },\n {\n name: /^tsconfig(?:\\.[\\w-]+)?\\.json$/u,\n format: \"json\",\n reader: \"parse from tsconfck or the TypeScript compiler API\",\n },\n {\n name: /^vite\\.config\\.[cm]?[jt]s$/u,\n format: \"typescript\",\n reader:\n \"resolveConfigFromFile from vite-plus, or parse from vite-plus for a read that must not run the file\",\n },\n];\n\nconst PARSER_MODULES: Readonly<Record<Format, readonly string[]>> = {\n json: [\"jsonc-parser\", \"json5\", \"strip-json-comments\"],\n toml: [\"smol-toml\", \"@iarna/toml\", \"toml\", \"toml-eslint-parser\"],\n typescript: [\"typescript\", \"oxc-parser\", \"@babel/parser\", \"@typescript-eslint/parser\", \"acorn\"],\n yaml: [\"yaml\", \"js-yaml\"],\n};\n\nconst PARSER_CALLS: Readonly<Record<Format, Option.Option<RegExp>>> = {\n json: Option.some(/\\b(?:JSON\\.parse|parseJson)\\b/u),\n toml: Option.none(),\n typescript: Option.none(),\n yaml: Option.none(),\n};\n\nconst importedModules = (statements: readonly ESTree.Statement[]): readonly string[] =>\n pipe(\n statements,\n Arr.filter((statement) => statement.type === \"ImportDeclaration\"),\n Arr.map((declaration) => declaration.source.value),\n );\n\nconst parserIn =\n (context: Context) =>\n (format: Format): Option.Option<string> => {\n const imported = importedModules(context.sourceCode.ast.body);\n const fromModule = pipe(\n Rec.get(PARSER_MODULES, format),\n Option.getOrElse((): readonly string[] => []),\n Arr.findFirst((module) => Arr.contains(imported, module)),\n );\n if (Option.isSome(fromModule)) {\n return fromModule;\n }\n return pipe(\n Rec.get(PARSER_CALLS, format),\n Option.flatten,\n Option.flatMap((pattern) => Option.fromNullishOr(pattern.exec(context.sourceCode.text))),\n Option.map(([call]) => call),\n );\n };\n\nconst messageFor =\n (context: Context) =>\n (text: string): Option.Option<string> => {\n const name = baseName(text);\n return pipe(\n ECOSYSTEM_FILES,\n Arr.findFirst((entry) => entry.name.test(name)),\n Option.flatMap(({ format, reader }) =>\n pipe(\n parserIn(context)(format),\n Option.map(\n (parser) =>\n `${name} has an official reader: ${reader}. Read it with that instead of parsing it with ${parser}, so that the file means what its own tool says it means.`,\n ),\n ),\n ),\n );\n };\n\nexport const ecosystemReaders: Rule = {\n meta: { type: \"problem\" },\n create: (context) => ({\n Literal: (node): void => {\n const message = pipe(\n Option.liftPredicate(node.value, (value) => typeof value === \"string\"),\n Option.flatMap(messageFor(context)),\n );\n if (Option.isSome(message)) {\n context.report({ node, message: message.value });\n }\n },\n TemplateElement: (node): void => {\n const message = messageFor(context)(node.value.raw);\n if (Option.isSome(message)) {\n context.report({ node, message: message.value });\n }\n },\n }),\n};\n","import { withTypeInformation } from \"@r_masseater/oxlint-typed-rules\";\nimport type { ParserServices, TypedContext } from \"@r_masseater/oxlint-typed-rules\";\nimport { Option, pipe } from \"effect\";\nimport type { Rule, RuleMeta, Visitor } from \"vite-plus/lint/plugins\";\n\nexport interface TypedRuleParts {\n readonly meta: RuleMeta;\n readonly visitorOf: (context: TypedContext, services: ParserServices) => Visitor;\n}\n\nexport const typedRuleOf = ({ meta, visitorOf }: TypedRuleParts): Rule =>\n withTypeInformation({\n meta,\n create: (context: TypedContext) =>\n pipe(\n Option.fromNullishOr(context.sourceCode.parserServices),\n Option.match({\n onNone: (): Visitor => ({}),\n onSome: (services) => visitorOf(context, services),\n }),\n ),\n });\n","import { baseName, parent } from \"@masseater.dev/path-kit\";\nimport type { ParserServices, TypedContext } from \"@r_masseater/oxlint-typed-rules\";\nimport { Array as Arr, Option, Predicate, String as Str, pipe } from \"effect\";\nimport type { ESTree, Rule, Visitor } from \"vite-plus/lint/plugins\";\n\nimport { typedRuleOf } from \"./typed-rule.ts\";\n\nconst MESSAGE_ID = \"spellOut\";\nconst MESSAGE =\n \"`{{specifier}}` does not name a file. Write `{{fixed}}`: Node ESM and TypeScript nodenext resolve neither a missing extension nor a directory index, so spelling out the file works under every resolver.\";\n\nconst RELATIVE = /^\\.{1,2}(?:\\/|$)/u;\nconst PARTS = /^(?<path>[^?]*)(?<query>.*)$/su;\nconst TRAILING_SEPARATORS = /\\/+$/u;\nconst DIRECTORY_NAMES: readonly string[] = [\".\", \"..\"];\nconst INDEX = \"index.\";\nconst DEFAULT_QUOTE = '\"';\nconst FIRST = 0;\n\ninterface Parts {\n readonly path: string;\n readonly query: string;\n}\n\nconst partsOf = (specifier: string): Option.Option<Parts> =>\n pipe(\n Str.match(PARTS)(specifier),\n Option.flatMap((matched) => Option.fromNullishOr(matched.groups)),\n Option.map((groups) => ({ path: groups[\"path\"] ?? \"\", query: groups[\"query\"] ?? \"\" })),\n );\n\nconst completionOf = (resolved: string, path: string): Option.Option<string> => {\n const file = baseName(resolved);\n const name = baseName(path);\n const index = Str.startsWith(INDEX)(file);\n if (Arr.contains(DIRECTORY_NAMES, name)) {\n return Option.liftPredicate(`/${file}`, () => index);\n }\n if (Str.startsWith(`${name}.`)(file)) {\n return Option.some(Str.slice(name.length)(file));\n }\n return Option.liftPredicate(`/${file}`, () => index && baseName(parent(resolved)) === name);\n};\n\nconst resolvedFileOf = (\n services: ParserServices,\n source: ESTree.StringLiteral,\n): Option.Option<string> =>\n pipe(\n Option.fromNullishOr(services.getSymbolAtLocation(source)),\n Option.flatMap((symbol) => Arr.head(symbol.declarations)),\n Option.map((declaration) => declaration.getSourceFile().fileName),\n );\n\nconst fixedOf = (services: ParserServices, source: ESTree.StringLiteral): Option.Option<string> =>\n pipe(\n partsOf(source.value),\n Option.filter(({ path }) => RELATIVE.test(path)),\n Option.flatMap(({ path, query }) =>\n pipe(\n resolvedFileOf(services, source),\n Option.flatMap((resolved) =>\n completionOf(resolved, Str.replace(TRAILING_SEPARATORS, \"\")(path)),\n ),\n Option.map(\n (completion) => `${Str.replace(TRAILING_SEPARATORS, \"\")(path)}${completion}${query}`,\n ),\n ),\n ),\n );\n\nconst quoteOf = (source: ESTree.StringLiteral): string =>\n pipe(\n Option.fromNullishOr(source.raw),\n Option.flatMap(Str.charAt(FIRST)),\n Option.getOrElse(() => DEFAULT_QUOTE),\n );\n\nconst isStringLiteral = (node: ESTree.Node | null): node is ESTree.StringLiteral =>\n Predicate.isNotNull(node) && node.type === \"Literal\" && Predicate.isString(node.value);\n\nconst visitorOf = (context: TypedContext, services: ParserServices): Visitor => {\n const check = (source: ESTree.Node | null): void => {\n if (!isStringLiteral(source)) {\n return;\n }\n const fixed = fixedOf(services, source);\n if (Option.isSome(fixed)) {\n context.report({\n node: source,\n messageId: MESSAGE_ID,\n data: { specifier: source.value, fixed: fixed.value },\n fix: (fixer) =>\n fixer.replaceText(source, `${quoteOf(source)}${fixed.value}${quoteOf(source)}`),\n });\n }\n };\n return {\n ImportDeclaration: (node): void => {\n check(node.source);\n },\n ExportAllDeclaration: (node): void => {\n check(node.source);\n },\n ExportNamedDeclaration: (node): void => {\n check(node.source);\n },\n ImportExpression: (node): void => {\n check(node.source);\n },\n };\n};\n\nexport const explicitImportPath: Rule = typedRuleOf({\n meta: { type: \"suggestion\", fixable: \"code\", messages: { [MESSAGE_ID]: MESSAGE } },\n visitorOf,\n});\n","import { Array as Arr, Option, Schema, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nimport {\n accessOf,\n accessesIn,\n bodyOf,\n calleeMatches,\n descendants,\n expressionOf,\n onlyStatement,\n parentOf,\n returnedText,\n sameEntry,\n textOfNode,\n typeOf,\n} from \"./get-or-insert-ast.ts\";\nimport type { Access, Scope } from \"./get-or-insert-ast.ts\";\n\nconst MESSAGE =\n \"Use getOrInsert or getOrInsertComputed on the Map or WeakMap, so that reading a key and storing its first value is one call. Do not read the key and then set it by hand.\";\n\nconst ONE = 1;\nconst TWO = 2;\nconst OPTION_FROM = /^(?:Option\\.)?from(?:NullishOr|UndefinedOr|Nullable)$/u;\nconst GET_OR_ELSE = /^(?:Option\\.)?getOrElse$/u;\nconst FUNCTIONS: readonly string[] = [\"ArrowFunctionExpression\", \"FunctionExpression\"];\n\nconst decodeGuard = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"IfStatement\"),\n test: Schema.Unknown,\n consequent: Schema.Unknown,\n alternate: Schema.Null,\n }),\n);\n\nconst decodeNot = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"UnaryExpression\"),\n operator: Schema.Literal(\"!\"),\n argument: Schema.Unknown,\n }),\n);\n\nconst DeclaratorSchema = Schema.Struct({\n id: Schema.Struct({ type: Schema.Literal(\"Identifier\"), name: Schema.String }),\n init: Schema.Unknown,\n});\n\ntype Declarator = typeof DeclaratorSchema.Type;\n\nconst decodeDeclaration = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"VariableDeclaration\"),\n declarations: Schema.Array(DeclaratorSchema),\n }),\n);\n\nconst decodeNullish = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"LogicalExpression\"),\n operator: Schema.Literal(\"??\"),\n left: Schema.Unknown,\n }),\n);\n\nconst storeOf =\n (scope: Scope) =>\n (statement: unknown): Option.Option<Access> =>\n pipe(expressionOf(statement), Option.flatMap(accessOf(scope)(\"set\")));\n\nconst isHasGuard = (scope: Scope, node: unknown): boolean =>\n pipe(\n decodeGuard(node),\n Option.exists((guard) => {\n const guarded = pipe(\n decodeNot(guard.test),\n Option.flatMap((not) => accessOf(scope)(\"has\")(not.argument)),\n );\n const stored = pipe(onlyStatement(guard.consequent), Option.flatMap(storeOf(scope)));\n return Option.isSome(guarded) && Option.exists(stored, sameEntry(guarded.value));\n }),\n );\n\nconst deletes =\n (scope: Scope, read: Access) =>\n (statement: unknown): boolean =>\n pipe(\n expressionOf(statement),\n Option.flatMap(accessOf(scope)(\"delete\")),\n Option.exists(sameEntry(read)),\n );\n\nconst storesBack =\n (scope: Scope, read: Access, name: string) =>\n (statement: unknown): boolean =>\n Option.exists(\n storeOf(scope)(statement),\n (stored) => sameEntry(read)(stored) && Option.exists(stored.value, (value) => value === name),\n );\n\nconst fallsBack =\n (scope: Scope, later: readonly unknown[]) =>\n (declarator: Declarator): boolean =>\n pipe(\n decodeNullish(declarator.init),\n Option.flatMap((nullish) => accessOf(scope)(\"get\")(nullish.left)),\n Option.exists(\n (read) =>\n pipe(later, Arr.some(storesBack(scope, read, declarator.id.name))) &&\n !pipe(later, Arr.some(deletes(scope, read))),\n ),\n );\n\nconst fallbackIndices = (scope: Scope, body: readonly unknown[]): readonly number[] =>\n pipe(\n body,\n Arr.map((statement, index) => {\n const fallsBackLater = fallsBack(scope, Arr.drop(body, index + ONE));\n return pipe(\n decodeDeclaration(statement),\n Option.map((declaration) => declaration.declarations),\n Option.filter(Arr.some(fallsBackLater)),\n Option.as(index),\n );\n }),\n Arr.getSomes,\n );\n\ninterface CachedCheck {\n readonly test: (name: string) => string;\n readonly value: (name: string) => string;\n}\n\nconst itself = (name: string): string => name;\n\nconst CACHED_CHECKS: readonly CachedCheck[] = [\n { test: (name) => `${name} !== undefined`, value: itself },\n { test: (name) => `${name} != null`, value: itself },\n { test: (name) => `${name} !== null`, value: itself },\n { test: (name) => `Predicate.isNotUndefined(${name})`, value: itself },\n { test: (name) => `Predicate.isNotNullish(${name})`, value: itself },\n { test: itself, value: itself },\n { test: (name) => `Option.isSome(${name})`, value: (name) => `${name}.value` },\n];\n\nconst returnsCached =\n (scope: Scope, name: string) =>\n (statement: unknown): boolean =>\n pipe(\n decodeGuard(statement),\n Option.exists((guard) => {\n const tested = textOfNode(scope)(guard.test);\n const returned = pipe(onlyStatement(guard.consequent), Option.flatMap(returnedText(scope)));\n return pipe(\n CACHED_CHECKS,\n Arr.some(\n (check) =>\n Option.exists(tested, (found) => found === check.test(name)) &&\n Option.exists(returned, (found) => found === check.value(name)),\n ),\n );\n }),\n );\n\nconst unwrapOption =\n (scope: Scope) =>\n (node: unknown): unknown =>\n pipe(\n calleeMatches(scope)(OPTION_FROM)(node),\n Option.flatMap(Arr.head),\n Option.getOrElse(() => node),\n );\n\nconst readsCached =\n (scope: Scope, stored: Access) =>\n (declarator: Declarator): boolean =>\n pipe(\n unwrapOption(scope)(declarator.init),\n accessOf(scope)(\"get\"),\n Option.exists(sameEntry(stored)),\n );\n\nconst earlyReturn = (scope: Scope, body: readonly unknown[], stored: Access): boolean =>\n pipe(\n body,\n Arr.some((statement, index) =>\n pipe(\n decodeDeclaration(statement),\n Option.flatMap((declaration) => Arr.head(declaration.declarations)),\n Option.filter(readsCached(scope, stored)),\n Option.exists((declarator) =>\n Option.exists(Arr.get(body, index + ONE), returnsCached(scope, declarator.id.name)),\n ),\n ),\n ),\n );\n\nconst storedAndReturned = (scope: Scope, body: readonly unknown[]): Option.Option<Access> => {\n const returned = pipe(Arr.last(body), Option.flatMap(returnedText(scope)));\n return pipe(\n Arr.get(body, body.length - TWO),\n Option.flatMap(storeOf(scope)),\n Option.filter(\n (stored) => Option.isSome(returned) && Option.contains(stored.value, returned.value),\n ),\n );\n};\n\nconst optionRegion = (scope: Scope, block: unknown): Option.Option<unknown> =>\n pipe(\n parentOf(block),\n Option.filter((fn) => Arr.contains(FUNCTIONS, typeOf(fn))),\n Option.flatMap(parentOf),\n Option.filter((call) => Option.isSome(calleeMatches(scope)(GET_OR_ELSE)(call))),\n Option.flatMap(parentOf),\n );\n\nconst readsThroughOption =\n (scope: Scope, stored: Access) =>\n (node: unknown): boolean =>\n pipe(\n calleeMatches(scope)(OPTION_FROM)(node),\n Option.flatMap(Arr.head),\n Option.flatMap(accessOf(scope)(\"get\")),\n Option.exists(sameEntry(stored)),\n );\n\nconst storesOnce =\n (scope: Scope, stored: Access) =>\n (region: unknown): boolean =>\n pipe(accessesIn(scope)(\"set\")(region), Arr.filter(sameEntry(stored))).length === ONE;\n\nconst returnsOnce = (scope: Scope, block: unknown): boolean =>\n pipe(\n descendants(scope.keys)(block),\n Arr.filter((node) => typeOf(node) === \"ReturnStatement\"),\n ).length === ONE;\n\nconst fallsBackInOption = (scope: Scope, block: unknown, stored: Access): boolean =>\n returnsOnce(scope, block) &&\n Option.exists(\n optionRegion(scope, block),\n (region) =>\n pipe(descendants(scope.keys)(region), Arr.some(readsThroughOption(scope, stored))) &&\n storesOnce(scope, stored)(region),\n );\n\nconst isMemoized = (scope: Scope, block: unknown): boolean =>\n pipe(\n bodyOf(block),\n Option.exists((body) =>\n Option.exists(storedAndReturned(scope, body), (stored) => {\n if (earlyReturn(scope, body, stored)) {\n return storesOnce(scope, stored)(block);\n }\n return fallsBackInOption(scope, block, stored);\n }),\n ),\n );\n\nexport const getOrInsert: Rule = {\n meta: { type: \"suggestion\" },\n create: (context) => {\n const scope: Scope = { text: context.sourceCode.text, keys: context.sourceCode.visitorKeys };\n return {\n IfStatement: (node): void => {\n if (isHasGuard(scope, node)) {\n context.report({ node, message: MESSAGE });\n }\n },\n BlockStatement: (node): void => {\n for (const index of fallbackIndices(scope, node.body)) {\n for (const statement of Option.toArray(Arr.get(node.body, index))) {\n context.report({ node: statement, message: MESSAGE });\n }\n }\n if (isMemoized(scope, node)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n};\n","import { Array as Arr, pipe } from \"effect\";\nimport type { Context, ESTree, Rule } from \"vite-plus/lint/plugins\";\n\nconst MESSAGE =\n \"export は宣言に付ける(export const・export function など)。ファイルの末尾で export { … } にまとめない。\";\nconst TYPE = \"type\";\nconst CLASS_NAME = \"ClassName\";\n\nconst isList = (node: ESTree.ExportNamedDeclaration): boolean =>\n node.declaration === null && node.source === null && !Arr.isReadonlyArrayEmpty(node.specifiers);\n\nconst localName = (specifier: ESTree.ExportSpecifier): string => {\n if (specifier.local.type === \"Literal\") {\n return specifier.local.value;\n }\n return specifier.local.name;\n};\n\nconst isClass = (context: Context, name: string): boolean =>\n pipe(\n context.sourceCode.scopeManager.scopes,\n Arr.flatMap((scope) => scope.variables),\n Arr.filter((variable) => variable.name === name),\n Arr.flatMap((variable) => variable.defs),\n (defs) =>\n Arr.isReadonlyArrayNonEmpty(defs) &&\n pipe(\n defs,\n Arr.every(({ type }) => type === CLASS_NAME),\n ),\n );\n\nconst isTypeOnlyClass =\n (context: Context, node: ESTree.ExportNamedDeclaration) =>\n (specifier: ESTree.ExportSpecifier): boolean =>\n (node.exportKind === TYPE || specifier.exportKind === TYPE) &&\n isClass(context, localName(specifier));\n\nexport const inlineExports: Rule = {\n meta: { type: \"suggestion\" },\n create: (context) => ({\n ExportNamedDeclaration: (node): void => {\n if (isList(node) && !pipe(node.specifiers, Arr.every(isTypeOnlyClass(context, node)))) {\n context.report({ node, message: MESSAGE });\n }\n },\n }),\n};\n","import { segments, toPosix } from \"@masseater.dev/path-kit\";\nimport { Array as Arr, Option, String as Str, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nconst SOURCE = \"/src/\";\nconst TOOL_LAYERS: readonly string[] = [\"features\", \"shared\"];\nconst TEST_FILE = /\\.test(?:\\.support)?\\.[cm]?[jt]sx?$/u;\nconst METHOD = \"registerTool\";\n\nconst MESSAGE =\n \"Register an MCP tool in the features slice of the operation it performs. A tool is one operation, so app/ only composes the slices' register functions and entities/ only holds the data they share.\";\n\nconst layerIn = (path: string): Option.Option<string> =>\n pipe(\n Str.lastIndexOf(SOURCE)(path),\n Option.map((index) => Arr.headNonEmpty(segments(Str.slice(index + SOURCE.length)(path)))),\n );\n\nconst layerOf = (filename: string): Option.Option<string> => layerIn(toPosix(filename));\n\nconst outsideToolLayers = (filename: string): boolean =>\n !TEST_FILE.test(filename) &&\n Option.exists(layerOf(filename), (layer) => !Arr.contains(TOOL_LAYERS, layer));\n\nexport const mcpToolLayer: Rule = {\n meta: { type: \"problem\" },\n create: (context) => {\n if (!outsideToolLayers(context.filename)) {\n return {};\n }\n return {\n CallExpression: (node): void => {\n const { callee } = node;\n if (\n callee.type === \"MemberExpression\" &&\n callee.property.type === \"Identifier\" &&\n callee.property.name === METHOD\n ) {\n context.report({ node: callee.property, message: MESSAGE });\n }\n },\n };\n },\n};\n","import { Array as Arr, Option, pipe } from \"effect\";\nimport { SymbolFlags } from \"tsrs/sync\";\nimport type { NodeHandle, Project, Symbol as TypeSymbol } from \"tsrs/sync\";\n\nexport type Origin = \"own\" | \"package\" | \"builtin\";\n\nconst origins = new WeakMap<TypeSymbol, Origin>();\nconst readonlyForms = new WeakMap<Project, Map<string, Option.Option<string>>>();\n\nconst fileOrigin = (project: Project, handle: NodeHandle): Option.Option<Origin> =>\n pipe(\n Option.fromNullishOr(project.program.getSourceFileMetadataByPath(handle.path)),\n Option.flatMap(({ isDefaultLibrary, isFromExternalLibrary }): Option.Option<Origin> => {\n if (isDefaultLibrary) {\n return Option.some(\"builtin\");\n }\n if (isFromExternalLibrary) {\n return Option.some(\"package\");\n }\n return Option.none();\n }),\n );\n\nconst declarationOrigin =\n (project: Project) =>\n (handle: NodeHandle): Origin =>\n pipe(\n fileOrigin(project, handle),\n Option.orElse(() =>\n pipe(\n Option.fromNullishOr(handle.resolve(project)),\n Option.filter((node) => node.getSourceFile().isDeclarationFile),\n Option.as<Origin>(\"package\"),\n ),\n ),\n Option.getOrElse((): Origin => \"own\"),\n );\n\nexport const originOf =\n (project: Project) =>\n (symbol: TypeSymbol): Origin =>\n origins.getOrInsertComputed(symbol, () => {\n const found = pipe(symbol.declarations, Arr.map(declarationOrigin(project)));\n if (Arr.contains(found, \"builtin\")) {\n return \"builtin\";\n }\n if (Arr.contains(found, \"package\")) {\n return \"package\";\n }\n return \"own\";\n });\n\nconst builtinNamed =\n (project: Project) =>\n (name: string): Option.Option<string> =>\n pipe(\n Option.fromNullishOr(project.checker.resolveName(name, SymbolFlags.Type)),\n Option.filter((symbol) => originOf(project)(symbol) === \"builtin\"),\n Option.as(name),\n );\n\nexport const readonlyFormOf =\n (project: Project) =>\n (name: string): Option.Option<string> =>\n readonlyForms\n .getOrInsertComputed(project, () => new Map<string, Option.Option<string>>())\n .getOrInsertComputed(name, () =>\n pipe([`Readonly${name}`, `${name}ReadOnly`], Arr.findFirst(builtinNamed(project))),\n );\n","import { Array as Arr, Option, String as Str, pipe } from \"effect\";\nimport type { Checker, Project, Symbol as TypeSymbol, Type } from \"tsrs/sync\";\n\nimport { originOf, readonlyFormOf } from \"./declared-outside.ts\";\nimport type { Origin } from \"./declared-outside.ts\";\n\nexport type Mutability =\n | { readonly kind: \"array\" }\n | { readonly kind: \"tuple\" }\n | { readonly kind: \"property\" }\n | { readonly kind: \"index\" }\n | { readonly kind: \"form\"; readonly name: string; readonly readonlyName: string };\n\nexport interface WritablePart {\n readonly path: readonly string[];\n readonly mutability: Mutability;\n}\n\ntype Found = Option.Option<WritablePart>;\n\ninterface Search {\n readonly project: Project;\n readonly partOf: (type: Type) => Found;\n}\n\nexport const ELEMENT = \"[]\";\n\nconst MUTABLE_ARRAY = \"Array\";\nconst PRIVATE_NAME = \"__#\";\nconst SYMBOL_NAME = \"__@\";\n\nconst here = (mutability: Mutability): Found => Option.some({ path: [], mutability });\n\nconst under =\n (segment: string) =>\n (part: WritablePart): WritablePart => ({ ...part, path: [segment, ...part.path] });\n\nconst firstPart = (search: Search, types: readonly Type[]): Found =>\n pipe(types, Arr.findFirst(search.partOf));\n\nconst formOf =\n (project: Project) =>\n (name: string): Found =>\n pipe(\n readonlyFormOf(project)(name),\n Option.flatMap((readonlyName) => here({ kind: \"form\", name, readonlyName })),\n );\n\nconst isOpaqueAlias = (project: Project, type: Type): boolean =>\n pipe(\n Option.fromNullishOr(type.getAliasSymbol()),\n Option.exists((alias) => {\n const origin = originOf(project)(alias);\n return (\n origin === \"package\" ||\n (origin === \"builtin\" && Arr.isReadonlyArrayEmpty(type.getAliasTypeArguments()))\n );\n }),\n );\n\nconst isNamed = (type: Type): boolean =>\n type.isClassOrInterface() || (type.isTypeReference() && type.getTarget().isClassOrInterface());\n\nconst declaredOutside = (project: Project, type: Type): Option.Option<Found> =>\n pipe(\n Option.fromNullishOr(type.getSymbol()),\n Option.flatMap((symbol): Option.Option<Found> => {\n const origin = originOf(project)(symbol);\n if (origin === \"package\") {\n return Option.some(Option.none());\n }\n if (origin === \"own\" || !isNamed(type)) {\n return Option.none();\n }\n return Option.some(formOf(project)(symbol.name));\n }),\n );\n\nconst isOutside = (project: Project, type: Type): boolean =>\n isOpaqueAlias(project, type) ||\n (type.isObjectType() && Option.exists(declaredOutside(project, type), Option.isNone));\n\nconst sourceOf = (type: Type): Option.Option<Type> => {\n if (!type.isMappedType()) {\n return Option.none();\n }\n const template = type.getTemplateType();\n if (!template.isIndexedAccessType()) {\n return Option.none();\n }\n return Option.some(template.getObjectType());\n};\n\nconst takenFromOutside =\n (project: Project) =>\n (type: Type): readonly string[] => {\n if (isOutside(project, type)) {\n return pipe(\n type.getProperties(),\n Arr.map((property) => property.name),\n );\n }\n if (type.isUnionType() || type.isIntersectionType()) {\n return pipe(type.getTypes(), Arr.flatMap(takenFromOutside(project)));\n }\n return pipe(\n sourceOf(type),\n Option.map(takenFromOutside(project)),\n Option.getOrElse((): readonly string[] => []),\n );\n };\n\nconst elementsPart = (search: Search, type: Type): Found => {\n if (!type.isTypeReference()) {\n return Option.none();\n }\n return pipe(\n firstPart(search, search.project.checker.getTypeArguments(type)),\n Option.map(under(ELEMENT)),\n );\n};\n\nconst arrayPart = (search: Search, type: Type): Found => {\n const mutable = pipe(\n Option.fromNullishOr(type.getSymbol()),\n Option.exists((symbol) => symbol.name === MUTABLE_ARRAY),\n );\n if (mutable) {\n return here({ kind: \"array\" });\n }\n return elementsPart(search, type);\n};\n\nconst tuplePart = (search: Search, type: Type): Found => {\n if (type.isTupleType() && !type.getTarget().readonly) {\n return here({ kind: \"tuple\" });\n }\n return elementsPart(search, type);\n};\n\nconst named =\n (prefix: string) =>\n (property: TypeSymbol): boolean =>\n pipe(String(property.escapedName), Str.startsWith(prefix));\n\nconst isWritable =\n (checker: Checker) =>\n (property: TypeSymbol): boolean =>\n !checker.isReadonlySymbol(property) && !named(PRIVATE_NAME)(property);\n\nconst isStringNamed = (property: TypeSymbol): boolean =>\n !named(PRIVATE_NAME)(property) && !named(SYMBOL_NAME)(property);\n\nconst declaredIn =\n (project: Project, origin: Origin) =>\n (property: TypeSymbol): boolean =>\n originOf(project)(property) === origin;\n\nconst inheritedForm =\n (project: Project) =>\n (property: TypeSymbol): Found =>\n pipe(\n Option.fromNullishOr(property.getParent()),\n Option.flatMap((owner) => formOf(project)(owner.name)),\n );\n\nconst propertyTypesPart = (search: Search, properties: readonly TypeSymbol[]): Found => {\n const judged = pipe(properties, Arr.filter(isStringNamed));\n return pipe(\n Arr.zip(judged, search.project.checker.getTypeOfSymbol(judged)),\n Arr.findFirst(([property, type]) =>\n pipe(search.partOf(type), Option.map(under(property.name))),\n ),\n );\n};\n\nconst indexPart = (search: Search, type: Type): Found =>\n pipe(\n type.getIndexInfos(),\n Arr.findFirst((info) => {\n if (!info.isReadonly) {\n return here({ kind: \"index\" });\n }\n return pipe(search.partOf(info.valueType), Option.map(under(ELEMENT)));\n }),\n );\n\nconst membersPart = (search: Search, type: Type): Found => {\n const { project } = search;\n const properties = type.getProperties();\n const taken = pipe(\n sourceOf(type),\n Option.map(takenFromOutside(project)),\n Option.getOrElse((): readonly string[] => []),\n );\n const own = pipe(\n properties,\n Arr.filter(\n (property) => declaredIn(project, \"own\")(property) && !Arr.contains(taken, property.name),\n ),\n );\n return pipe(\n own,\n Arr.findFirst(isWritable(project.checker)),\n Option.map((property): WritablePart => ({\n path: [property.name],\n mutability: { kind: \"property\" },\n })),\n Option.orElse(() =>\n pipe(\n properties,\n Arr.filter(declaredIn(project, \"builtin\")),\n Arr.findFirst(inheritedForm(project)),\n ),\n ),\n Option.orElse(() => propertyTypesPart(search, own)),\n Option.orElse(() => indexPart(search, type)),\n );\n};\n\nconst isFunction = (type: Type): boolean =>\n Arr.isReadonlyArrayNonEmpty(type.getCallSignatures()) &&\n Arr.isReadonlyArrayEmpty(type.getProperties());\n\nconst objectPart = (search: Search, type: Type): Found => {\n if (isFunction(type)) {\n return Option.none();\n }\n if (search.project.checker.isArrayType(type)) {\n return arrayPart(search, type);\n }\n if (type.isTupleType()) {\n return tuplePart(search, type);\n }\n return pipe(\n declaredOutside(search.project, type),\n Option.getOrElse(() => membersPart(search, type)),\n );\n};\n\nconst typePart = (search: Search, type: Type): Found => {\n if (isOpaqueAlias(search.project, type)) {\n return Option.none();\n }\n if (type.isUnionType() || type.isIntersectionType()) {\n return firstPart(search, type.getTypes());\n }\n if (type.isConditionalType()) {\n return firstPart(search, [type.getTrueType(), type.getFalseType()]);\n }\n if (!type.isObjectType()) {\n return Option.none();\n }\n return objectPart(search, type);\n};\n\nexport const writablePartOf =\n (project: Project) =>\n (type: Type): Option.Option<WritablePart> => {\n const seen = new Set<Type>();\n const partOf = (inner: Type): Found => {\n if (seen.has(inner)) {\n return Option.none();\n }\n seen.add(inner);\n return typePart({ project, partOf }, inner);\n };\n return partOf(type);\n };\n","import type { ParserServices, TypedContext } from \"@r_masseater/oxlint-typed-rules\";\nimport { Array as Arr, Match, Option, String as Str, pipe } from \"effect\";\nimport type { Node } from \"tsrs/ast\";\nimport { isTypeNode } from \"tsrs/ast/is\";\nimport type { Type } from \"tsrs/sync\";\nimport type { ESTree, Rule, Visitor } from \"vite-plus/lint/plugins\";\n\nimport { typedRuleOf } from \"./typed-rule.ts\";\nimport { ELEMENT, writablePartOf } from \"./writable-part.ts\";\nimport type { Mutability, WritablePart } from \"./writable-part.ts\";\n\nconst MESSAGE =\n \"A function must not be able to change its arguments, but {{part}}. Declare the parameter with a read-only type. Types declared by a package or by the language are exempt unless the language has a read-only form of them.\";\nconst MESSAGE_ID = \"shouldBeReadonly\";\nconst WHOLE = \"the type\";\nconst SEPARATOR = \".\";\nconst TAGGABLE: readonly string[] = [\"string\", \"number\", \"bigint\"];\n\ntype Annotated = ESTree.FormalParameter | ESTree.FormalParameterRest;\n\ntype FunctionLike =\n | ESTree.ArrowFunctionExpression\n | ESTree.Function\n | ESTree.TSCallSignatureDeclaration\n | ESTree.TSConstructSignatureDeclaration\n | ESTree.TSFunctionType\n | ESTree.TSMethodSignature;\n\nconst isBrandObject = (type: Type): boolean =>\n type.isObjectType() &&\n Arr.isReadonlyArrayEmpty(type.getCallSignatures()) &&\n Arr.isReadonlyArrayEmpty(type.getConstructSignatures());\n\nconst isTaggable = (type: Type): boolean =>\n type.isLiteralType() ||\n type.isTemplateLiteralType() ||\n (type.isIntrinsicType() && Arr.contains(TAGGABLE, type.intrinsicName));\n\nconst isBrandedLiteral = (type: Type): boolean => {\n if (!type.isIntersectionType()) {\n return false;\n }\n const parts = type.getTypes();\n const objects = pipe(parts, Arr.filter(isBrandObject));\n const primitives = pipe(parts, Arr.filter(isTaggable));\n return (\n Arr.isReadonlyArrayNonEmpty(objects) &&\n Arr.isReadonlyArrayNonEmpty(primitives) &&\n objects.length + primitives.length === parts.length\n );\n};\n\nconst isBrandedLiteralLike = (type: Type): boolean => {\n if (type.isUnionType()) {\n return pipe(type.getTypes(), Arr.every(isBrandedLiteral));\n }\n return isBrandedLiteral(type);\n};\n\nconst outermost = (node: Node): Node =>\n pipe(\n Option.fromNullishOr(node.parent),\n Option.filter((parent) => parent.getStart() === node.getStart() && parent.end === node.end),\n Option.match({ onNone: () => node, onSome: outermost }),\n );\n\nconst unwrapped = (parameter: ESTree.ParamPattern): Annotated => {\n if (parameter.type === \"TSParameterProperty\") {\n return parameter.parameter;\n }\n return parameter;\n};\n\nconst annotationOf = (parameter: Annotated): Option.Option<ESTree.TSTypeAnnotation> => {\n if (parameter.type === \"AssignmentPattern\") {\n return Option.fromNullishOr(parameter.left.typeAnnotation);\n }\n return Option.fromNullishOr(parameter.typeAnnotation);\n};\n\nconst annotatedType = (services: ParserServices, parameter: Annotated): Option.Option<Type> =>\n pipe(\n annotationOf(parameter),\n Option.map((annotation) =>\n outermost(services.esTreeNodeToTSNodeMap.get(annotation.typeAnnotation)),\n ),\n Option.filter(isTypeNode),\n Option.map((node) => services.program.native.checker.getTypeFromTypeNode(node)),\n );\n\nconst subjectOf = (path: readonly string[]): string => {\n if (Arr.isReadonlyArrayEmpty(path)) {\n return WHOLE;\n }\n return `\\`${pipe(Arr.join(path, SEPARATOR), Str.replaceAll(`${SEPARATOR}${ELEMENT}`, ELEMENT))}\\``;\n};\n\nconst predicateOf = Match.type<Mutability>().pipe(\n Match.discriminatorsExhaustive(\"kind\")({\n array: () => \"is a mutable array\",\n tuple: () => \"is a mutable tuple\",\n property: () => \"is writable\",\n index: () => \"has a writable index signature\",\n form: ({ name, readonlyName }) =>\n `is a \\`${name}\\`, which has the read-only form \\`${readonlyName}\\``,\n }),\n);\n\nconst describe = ({ path, mutability }: WritablePart): string =>\n `${subjectOf(path)} ${predicateOf(mutability)}`;\n\nconst visitorOf = (context: TypedContext, services: ParserServices): Visitor => {\n const partOf = writablePartOf(services.program.native);\n const check = ({ params }: FunctionLike): void => {\n for (const parameter of pipe(params, Arr.map(unwrapped))) {\n const part = pipe(\n annotatedType(services, parameter),\n Option.filter((type) => !isBrandedLiteralLike(type)),\n Option.flatMap(partOf),\n );\n if (Option.isSome(part)) {\n context.report({\n node: parameter,\n messageId: MESSAGE_ID,\n data: { part: describe(part.value) },\n });\n }\n }\n };\n return {\n ArrowFunctionExpression: check,\n FunctionDeclaration: check,\n FunctionExpression: check,\n TSCallSignatureDeclaration: check,\n TSConstructSignatureDeclaration: check,\n TSDeclareFunction: check,\n TSEmptyBodyFunctionExpression: check,\n TSFunctionType: check,\n TSMethodSignature: check,\n };\n};\n\nexport const readonlyParameters: Rule = typedRuleOf({\n meta: { type: \"suggestion\", messages: { [MESSAGE_ID]: MESSAGE } },\n visitorOf,\n});\n","import { Array as Arr, Option, Schema, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nconst MESSAGE =\n \"Select min and max in separate queries. SQLite uses an index for a lone min or max only, so one select with both reads every row in the range, and D1 bills each row read.\";\n\nconst AGGREGATES = [\"min\", \"max\"] as const;\n\ntype Aggregate = (typeof AGGREGATES)[number];\n\nconst AggregateCallSchema = Schema.Struct({\n type: Schema.Literal(\"CallExpression\"),\n callee: Schema.Struct({\n type: Schema.Literal(\"Identifier\"),\n name: Schema.Literals(AGGREGATES),\n }),\n});\n\nconst PropertySchema = Schema.Struct({\n type: Schema.Literal(\"Property\"),\n value: Schema.Unknown,\n});\n\nconst SelectMemberSchema = Schema.Struct({\n type: Schema.Literal(\"MemberExpression\"),\n computed: Schema.Literal(false),\n property: Schema.Struct({\n type: Schema.Literal(\"Identifier\"),\n name: Schema.Literal(\"select\"),\n }),\n});\n\nconst decodeSelect = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"CallExpression\"),\n callee: SelectMemberSchema,\n arguments: Schema.Array(Schema.Unknown),\n }),\n);\n\nconst decodeFields = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"ObjectExpression\"),\n properties: Schema.Array(Schema.Unknown),\n }),\n);\n\nconst decodeProperty = Schema.decodeUnknownOption(PropertySchema);\nconst decodeAggregate = Schema.decodeUnknownOption(AggregateCallSchema);\n\nconst aggregateNameOf = (field: unknown): Option.Option<Aggregate> =>\n pipe(\n decodeProperty(field),\n Option.flatMap((property) => decodeAggregate(property.value)),\n Option.map((call) => call.callee.name),\n );\n\nconst aggregatesOf = (fields: readonly unknown[]): readonly Aggregate[] =>\n pipe(fields, Arr.map(aggregateNameOf), Arr.getSomes);\n\nconst selectsBoth = (node: unknown): boolean =>\n pipe(\n decodeSelect(node),\n Option.flatMap((call) => Arr.head(call.arguments)),\n Option.flatMap(decodeFields),\n Option.map((fields) => aggregatesOf(fields.properties)),\n Option.exists((found) => Arr.contains(found, \"min\") && Arr.contains(found, \"max\")),\n );\n\nexport const separateMinMax: Rule = {\n meta: { type: \"problem\" },\n create: (context) => ({\n CallExpression: (node): void => {\n if (selectsBoth(node)) {\n context.report({ node, message: MESSAGE });\n }\n },\n }),\n};\n","import { Array as Arr, Option, Predicate, Schema, String as Str, pipe } from \"effect\";\nimport type { Context, ESTree } from \"vite-plus/lint/plugins\";\n\nexport const SAY = \"say\";\nexport const CUTS = \"cuts\";\n\nexport type Property = ESTree.ObjectProperty;\nexport type StringLiteral = ESTree.StringLiteral;\nexport type ObjectExpression = ESTree.ObjectExpression;\nexport type Range = [number, number];\n\nconst START = 0;\nconst END = 1;\nconst NEXT = 1;\n\nexport const keyOf = (property: ObjectExpression[\"properties\"][number]): Option.Option<string> => {\n if (property.type !== \"Property\" || property.computed) {\n return Option.none();\n }\n if (property.key.type === \"Identifier\") {\n return Option.some(property.key.name);\n }\n if (property.key.type === \"Literal\" && Predicate.isString(property.key.value)) {\n return Option.some(property.key.value);\n }\n return Option.none();\n};\n\nexport const propertyOf =\n (key: string) =>\n (object: ObjectExpression): Option.Option<Property> =>\n Arr.findFirst(\n object.properties,\n (property): property is Property =>\n property.type === \"Property\" && Option.contains(keyOf(property), key),\n );\n\nexport const propertiesOf = (object: ObjectExpression): readonly Property[] =>\n pipe(\n object.properties,\n Arr.filter((property): property is Property => property.type === \"Property\"),\n );\n\nexport const isStringLiteral = (node: unknown): node is StringLiteral =>\n Predicate.hasProperty(node, \"type\") &&\n node[\"type\"] === \"Literal\" &&\n Predicate.hasProperty(node, \"value\") &&\n Predicate.isString(node[\"value\"]);\n\nconst unwrapped = (node: ESTree.Node): ESTree.Node => {\n if (\n node.type === \"TSAsExpression\" ||\n node.type === \"TSSatisfiesExpression\" ||\n node.type === \"TSNonNullExpression\"\n ) {\n return unwrapped(node.expression);\n }\n return node;\n};\n\nexport const asObject = (node: ESTree.Node): Option.Option<ObjectExpression> =>\n Option.liftPredicate(\n unwrapped(node),\n (value): value is ObjectExpression => value.type === \"ObjectExpression\",\n );\n\nexport const asArray = (node: ESTree.Node): Option.Option<ESTree.ArrayExpression> =>\n Option.liftPredicate(\n unwrapped(node),\n (value): value is ESTree.ArrayExpression => value.type === \"ArrayExpression\",\n );\n\nexport const stringsOf = (node: ESTree.Node): readonly StringLiteral[] =>\n pipe(\n asArray(node),\n Option.map(({ elements }) => pipe(elements, Arr.filter(isStringLiteral))),\n Option.getOrElse(() => []),\n );\n\nexport const saidOf = (property: Property): readonly StringLiteral[] => {\n if (!Option.contains(keyOf(property), SAY)) {\n return [];\n }\n return stringsOf(property.value);\n};\n\nexport const quotedOf = (text: string): string =>\n pipe(\n text,\n Str.replaceAll(\"\\\\\", String.raw`\\\\`),\n Str.replaceAll('\"', String.raw`\\\"`),\n Str.replaceAll(\"\\n\", String.raw`\\n`),\n (escaped) => `\"${escaped}\"`,\n );\n\nexport const removedRange = ({\n object,\n property,\n}: Readonly<{ object: ObjectExpression; property: Property }>): Range => {\n const index = object.properties.indexOf(property);\n const next = Arr.get(object.properties, index + NEXT);\n if (Option.isSome(next)) {\n return [property.range[START], next.value.range[START]];\n }\n return pipe(\n Arr.get(object.properties, index - NEXT),\n Option.map((previous): Range => [previous.range[END], property.range[END]]),\n Option.getOrElse((): Range => [property.range[START], property.range[END]]),\n );\n};\n\ntype TopLevel = ESTree.Program[\"body\"][number];\n\nconst declaratorsOf = (statement: TopLevel): readonly ESTree.VariableDeclarator[] => {\n if (statement.type === \"VariableDeclaration\") {\n return statement.declarations;\n }\n if (statement.type === \"ExportNamedDeclaration\") {\n return pipe(\n Option.fromNullishOr(statement.declaration),\n Option.filter(\n (declaration): declaration is ESTree.VariableDeclaration =>\n declaration.type === \"VariableDeclaration\",\n ),\n Option.map(({ declarations }) => declarations),\n Option.getOrElse(() => []),\n );\n }\n return [];\n};\n\nconst declaredArray = (context: Context, name: string): Option.Option<ESTree.ArrayExpression> =>\n pipe(\n context.sourceCode.ast.body,\n Arr.flatMap(declaratorsOf),\n Arr.findFirst(({ id }) => id.type === \"Identifier\" && id.name === name),\n Option.flatMap(({ init }) => Option.fromNullishOr(init)),\n Option.flatMap(asArray),\n );\n\nconst objectsOf = ({ elements }: ESTree.ArrayExpression): readonly ObjectExpression[] =>\n pipe(\n elements,\n Arr.filter(Predicate.isNotNull),\n Arr.flatMap((element) => Option.toArray(asObject(element))),\n );\n\nconst cutArrayOf =\n (context: Context) =>\n ({ value }: Property): Option.Option<ESTree.ArrayExpression> => {\n if (value.type === \"Identifier\") {\n return declaredArray(context, value.name);\n }\n return asArray(value);\n };\n\nexport const cutsOf = ({\n context,\n script,\n}: Readonly<{ context: Context; script: ObjectExpression }>): readonly ObjectExpression[] =>\n pipe(\n propertyOf(CUTS)(script),\n Option.flatMap(cutArrayOf(context)),\n Option.map(objectsOf),\n Option.getOrElse(() => []),\n );\n\nexport const Texts = Schema.Record(Schema.String, Schema.String);\n\nexport const optionsWith =\n <Value>({ schema, fallback }: Readonly<{ schema: Schema.Decoder<Value>; fallback: Value }>) =>\n (options: readonly unknown[]): Value =>\n pipe(\n Arr.head(options),\n Option.flatMap(Schema.decodeUnknownOption(schema)),\n Option.getOrElse(() => fallback),\n );\n","import { Array as Arr, Option, String as Str, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nimport type { ObjectExpression, StringLiteral } from \"./video-script-ast.ts\";\nimport { asObject, keyOf, propertiesOf, saidOf } from \"./video-script-ast.ts\";\n\nconst UNREAD = \"unread\";\nconst MESSAGES = {\n [UNREAD]:\n \"英字の語「{{word}}」の読みが readings にない。VOICEVOX は英字を1文字ずつ読むことがある\",\n} as const;\n\nconst READINGS = \"readings\";\nconst RUBY = /\\{[^}]*\\}/gu;\nconst WORD = /[A-Za-z][A-Za-z0-9+#.-]*/gu;\n\nconst isRead =\n (keys: readonly string[]) =>\n (word: string): boolean =>\n pipe(\n keys,\n Arr.some((key) => Str.includes(key)(word) || Str.includes(word)(key)),\n );\n\nconst wordsOf = (say: string): readonly string[] =>\n pipe(\n Str.replaceAll(RUBY, Str.empty)(say),\n Str.matchAll(WORD),\n Arr.fromIterable,\n Arr.map(([word]) => word),\n Arr.dedupe,\n );\n\nconst keysOf = ({ properties }: ObjectExpression): readonly string[] =>\n pipe(\n properties,\n Arr.flatMap((property) => Option.toArray(keyOf(property))),\n );\n\nexport const videoReadings: Rule = {\n meta: { type: \"problem\", messages: MESSAGES },\n create: (context) => {\n const keys: string[] = [];\n const said: StringLiteral[] = [];\n return {\n ObjectExpression: (object): void => {\n for (const node of propertiesOf(object)) {\n said.push(...saidOf(node));\n if (Option.contains(keyOf(node), READINGS)) {\n keys.push(...pipe(asObject(node.value), Option.toArray, Arr.flatMap(keysOf)));\n }\n }\n },\n \"Program:exit\": (): void => {\n for (const literal of said) {\n for (const word of pipe(\n wordsOf(literal.value),\n Arr.filter((candidate) => !isRead(keys)(candidate)),\n )) {\n context.report({ node: literal, messageId: UNREAD, data: { word } });\n }\n }\n },\n };\n },\n};\n","import { Array as Arr, Record as Rec, Schema, String as Str, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nimport type { StringLiteral } from \"./video-script-ast.ts\";\nimport { Texts, optionsWith, propertiesOf, quotedOf, saidOf } from \"./video-script-ast.ts\";\n\nconst FIX = \"fix\";\nconst BANNED = \"banned\";\nconst EMPHASIS = \"emphasis\";\n\nconst MESSAGES = {\n [FIX]:\n \"「{{say}}」は日本語と英数字の間に空白があるか、決まった言葉を言い換えている。「{{fixed}}」と書く\",\n [BANNED]: \"「{{say}}」に「{{word}}」がある。{{instead}}\",\n [EMPHASIS]: \"「{{say}}」の太字(**)が{{count}}か所ある。{{max}}か所までにする\",\n} as const;\n\nconst JAPANESE = String.raw`[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}ー々、。!?」』)]`;\nconst LATIN = \"[A-Za-z0-9]\";\nconst SPACE = \"[ ]+\";\nconst AFTER_JAPANESE = new RegExp(`(?<head>${JAPANESE}[*}]*)${SPACE}(?<tail>[*{]*${LATIN})`, \"gu\");\nconst BEFORE_JAPANESE = new RegExp(`(?<head>${LATIN}[*}]*)${SPACE}(?<tail>[*{]*${JAPANESE})`, \"gu\");\nconst KEPT = \"$<head>$<tail>\";\nconst OUTSIDE_RUBY = String.raw`(?![^{]*\\})`;\nconst EMPHASIZED = /\\*\\*[^*]+\\*\\*/gu;\nconst SPECIAL = /[.*+?^${}()|[\\]\\\\]/gu;\nconst ESCAPED = String.raw`\\$&`;\nconst DEFAULT_MAX = 1;\n\nconst OptionsSchema = Schema.Struct({\n terms: Schema.optional(Texts),\n banned: Schema.optional(Texts),\n maxEmphasis: Schema.optional(Schema.Finite),\n});\n\nconst optionsOf = optionsWith({ schema: OptionsSchema, fallback: {} });\n\nconst unspacedOf = (say: string): string =>\n pipe(say, Str.replaceAll(AFTER_JAPANESE, KEPT), Str.replaceAll(BEFORE_JAPANESE, KEPT));\n\nconst outsideRuby = (word: string): RegExp =>\n new RegExp(`${Str.replaceAll(SPECIAL, ESCAPED)(word)}${OUTSIDE_RUBY}`, \"gu\");\n\nconst termedOf =\n (terms: Readonly<Record<string, string>>) =>\n (say: string): string =>\n Arr.reduce(Rec.toEntries(terms), say, (text, [vague, precise]) =>\n Str.replaceAll(outsideRuby(vague), precise)(text),\n );\n\nconst emphasisCount = (say: string): number =>\n Arr.fromIterable(Str.matchAll(EMPHASIZED)(say)).length;\n\nexport const videoSay: Rule = {\n meta: {\n type: \"suggestion\",\n fixable: \"code\",\n messages: MESSAGES,\n schema: [{ type: \"object\", additionalProperties: true }],\n },\n create: (context) => {\n const { terms = {}, banned = {}, maxEmphasis = DEFAULT_MAX } = optionsOf(context.options);\n const check = (literal: StringLiteral): void => {\n const say = literal.value;\n const fixed = termedOf(terms)(unspacedOf(say));\n if (fixed !== say) {\n context.report({\n node: literal,\n messageId: FIX,\n data: { say, fixed },\n fix: (fixer) => fixer.replaceText(literal, quotedOf(fixed)),\n });\n }\n for (const [word, instead] of Rec.toEntries(banned)) {\n if (Str.includes(word)(say)) {\n context.report({ node: literal, messageId: BANNED, data: { say, word, instead } });\n }\n }\n const count = emphasisCount(say);\n if (count > maxEmphasis) {\n context.report({\n node: literal,\n messageId: EMPHASIS,\n data: { say, count: String(count), max: String(maxEmphasis) },\n });\n }\n };\n return {\n ObjectExpression: (node): void => {\n for (const literal of pipe(propertiesOf(node), Arr.flatMap(saidOf))) {\n check(literal);\n }\n },\n };\n },\n};\n","import { Array as Arr, Option, Record as Rec, pipe } from \"effect\";\nimport type { Context, ESTree } from \"vite-plus/lint/plugins\";\n\nimport type { ObjectExpression, Property } from \"./video-script-ast.ts\";\nimport { asObject, propertyOf } from \"./video-script-ast.ts\";\n\nconst START = 0;\nconst NEXT = 1;\n\nexport interface ValuesCheck {\n readonly context: Context;\n readonly object: ObjectExpression;\n readonly values: Readonly<Record<string, string>>;\n readonly name: string;\n readonly before: Option.Option<ESTree.Node>;\n}\n\nexport const textOf =\n (context: Context) =>\n (node: ESTree.Node): string =>\n context.sourceCode.getText(node);\n\nconst valueTarget = (property: Property): ESTree.Node =>\n pipe(\n asObject(property.value),\n Option.flatMap(({ properties }) =>\n Arr.findFirst(\n properties,\n (part): part is ESTree.SpreadElement => part.type === \"SpreadElement\",\n ),\n ),\n Option.match({ onNone: () => property.value, onSome: ({ argument }) => argument }),\n );\n\nconst reportMissing = (\n { context, object, before }: ValuesCheck,\n {\n key,\n expected,\n data,\n }: Readonly<{ key: string; expected: string; data: Readonly<Record<string, string>> }>,\n): void => {\n context.report({\n node: object,\n messageId: \"value\",\n data,\n fix: (fixer) =>\n Option.match(before, {\n onNone: () =>\n fixer.insertTextAfterRange(\n [object.range[START], object.range[START] + NEXT],\n ` ${key}: ${expected},`,\n ),\n onSome: (node) => fixer.insertTextBefore(node, `${key}: ${expected},\\n `),\n }),\n });\n};\n\nconst checkValue =\n (check: ValuesCheck) =>\n ([key, expected]: readonly [string, string]): void => {\n const { context, object, name } = check;\n const data = { series: name, key, expected };\n const property = propertyOf(key)(object);\n if (Option.isNone(property)) {\n reportMissing(check, { key, expected, data });\n return;\n }\n const target = valueTarget(property.value);\n if (textOf(context)(target) !== expected) {\n context.report({\n node: target,\n messageId: \"value\",\n data,\n fix: (fixer) => fixer.replaceText(target, expected),\n });\n }\n };\n\nexport const checkValues = (check: ValuesCheck): void => {\n for (const entry of Rec.toEntries(check.values)) {\n checkValue(check)(entry);\n }\n};\n","import { Array as Arr, Option, String as Str, pipe } from \"effect\";\nimport type { Context } from \"vite-plus/lint/plugins\";\n\nimport type { VideoIntro } from \"#/shared/config/index.ts\";\n\nimport type { ObjectExpression, StringLiteral } from \"./video-script-ast.ts\";\nimport {\n SAY,\n cutsOf,\n isStringLiteral,\n propertyOf,\n quotedOf,\n removedRange,\n stringsOf,\n} from \"./video-script-ast.ts\";\nimport { checkValues } from \"./video-values.ts\";\n\nexport type IntroRule = VideoIntro;\n\nexport interface IntroCheck {\n readonly context: Context;\n readonly script: ObjectExpression;\n readonly name: string;\n readonly rule: IntroRule;\n}\n\nconst ID = \"id\";\nconst AT = \"at\";\nconst INTRO = \"intro\";\nconst PART = \"|\";\nconst NEXT = 1;\n\nconst isIntro = (cut: ObjectExpression): boolean =>\n pipe(\n propertyOf(ID)(cut),\n Option.exists(({ value }) => isStringLiteral(value) && value.value === INTRO),\n );\n\nconst partedLines = (cut: ObjectExpression): readonly StringLiteral[] =>\n pipe(\n propertyOf(SAY)(cut),\n Option.map(({ value }) => stringsOf(value)),\n Option.getOrElse((): readonly StringLiteral[] => []),\n Arr.filter(({ value }) => Str.includes(PART)(value)),\n );\n\nconst checkBeats = ({ context, name }: IntroCheck, cut: ObjectExpression): void => {\n if (Option.isNone(propertyOf(AT)(cut)) || Arr.isReadonlyArrayEmpty(partedLines(cut))) {\n context.report({ node: cut, messageId: \"beats\", data: { series: name } });\n }\n};\n\nconst checkPlain = ({ context, name }: IntroCheck, cut: ObjectExpression): void => {\n const data = { series: name };\n for (const property of Option.toArray(propertyOf(AT)(cut))) {\n context.report({\n node: property,\n messageId: \"plainBeats\",\n data,\n fix: (fixer) => fixer.removeRange(removedRange({ object: cut, property })),\n });\n }\n for (const line of partedLines(cut)) {\n context.report({\n node: line,\n messageId: \"plainParts\",\n data,\n fix: (fixer) =>\n fixer.replaceText(line, quotedOf(Str.replaceAll(PART, Str.empty)(line.value))),\n });\n }\n};\n\nexport const checkIntro = (check: IntroCheck): void => {\n const { context, script, name, rule } = check;\n const intro = Arr.findFirst(cutsOf({ context, script }), isIntro);\n if (Option.isNone(intro)) {\n context.report({ node: script, messageId: \"noIntro\", data: { series: name } });\n return;\n }\n if (rule === \"beats\") {\n checkBeats(check, intro.value);\n return;\n }\n checkPlain(check, intro.value);\n};\n\nexport interface AfterIntroCheck {\n readonly context: Context;\n readonly script: ObjectExpression;\n readonly name: string;\n readonly values: Readonly<Record<string, string>>;\n}\n\nexport const checkAfterIntro = ({ context, script, name, values }: AfterIntroCheck): void => {\n const cuts = cutsOf({ context, script });\n const next = pipe(\n Arr.findFirstIndex(cuts, isIntro),\n Option.flatMap((index) => Arr.get(cuts, index + NEXT)),\n );\n for (const cut of Option.toArray(next)) {\n checkValues({ context, object: cut, values, name, before: Option.none() });\n }\n};\n","import { Array as Arr, Option, Record as Rec, Schema, pipe } from \"effect\";\nimport type { Context, ESTree, Rule } from \"vite-plus/lint/plugins\";\n\nimport { VIDEO_INTROS } from \"#/shared/config/index.ts\";\n\nimport { checkAfterIntro, checkIntro } from \"./video-intro.ts\";\nimport type { ObjectExpression } from \"./video-script-ast.ts\";\nimport {\n CUTS,\n Texts,\n cutsOf,\n isStringLiteral,\n keyOf,\n optionsWith,\n propertiesOf,\n propertyOf,\n removedRange,\n} from \"./video-script-ast.ts\";\nimport { checkValues, textOf } from \"./video-values.ts\";\n\nconst MESSAGES = {\n unknown: \"series「{{series}}」の決まりがない。{{known}} のどれかにする\",\n value: \"{{series}} の {{key}} は {{expected}} にする\",\n banned: \"{{key}} を使わない。{{reason}}\",\n voice: \"{{series}} に出ない話者 {{voice}} が話している\",\n opener: \"{{series}} の最初の台詞は {{voice}} が言う\",\n closer: \"{{series}} の最後の台詞は {{voice}} が言う\",\n noIntro: \"{{series}} は最初のカットを intro にする\",\n plainBeats: \"{{series}} のイントロは音ハメしない。at を外す\",\n plainParts: \"{{series}} のイントロは句に分けず、1つの台詞で読む\",\n beats: \"{{series}} のイントロは「|」で句に分け、at で各句の頭を拍に置く\",\n} as const;\n\nconst SERIES = \"series\";\nconst VOICE = \"voice\";\n\nconst SeriesSchema = Schema.Struct({\n values: Schema.optional(Texts),\n voices: Schema.String.pipe(Schema.Array, Schema.optional),\n opener: Schema.optional(Schema.String),\n closer: Schema.optional(Schema.String),\n intro: Schema.optional(Schema.Literals(VIDEO_INTROS)),\n afterIntro: Schema.optional(Texts),\n});\n\ntype Series = typeof SeriesSchema.Type;\n\nconst OptionsSchema = Schema.Struct({\n series: Schema.Record(Schema.String, SeriesSchema),\n banned: Schema.optional(Texts),\n});\n\ntype Options = typeof OptionsSchema.Type;\n\nconst optionsOf = optionsWith({ schema: OptionsSchema, fallback: { series: {} } });\n\ninterface Check {\n readonly context: Context;\n readonly script: ObjectExpression;\n readonly name: string;\n readonly series: Series;\n}\n\nconst voiceOf = (context: Context, object: ObjectExpression): Option.Option<string> =>\n Option.map(propertyOf(VOICE)(object), ({ value }) => textOf(context)(value));\n\nconst speakerOf =\n ({ context, script }: Check) =>\n (cut: ObjectExpression): Option.Option<string> =>\n Option.orElse(voiceOf(context, cut), () => voiceOf(context, script));\n\nconst checkCast = (check: Check, cuts: readonly ObjectExpression[]): void => {\n const { context, name, series } = check;\n const voices = series.voices ?? [];\n if (Arr.isReadonlyArrayEmpty(voices)) {\n return;\n }\n for (const cut of cuts) {\n for (const voice of Option.toArray(speakerOf(check)(cut))) {\n if (!voices.includes(voice)) {\n context.report({ node: cut, messageId: \"voice\", data: { series: name, voice } });\n }\n }\n }\n};\n\nconst checkEnds = (check: Check, cuts: readonly ObjectExpression[]): void => {\n const { context, name, series } = check;\n const ends = [\n [\"opener\", series.opener, Arr.head(cuts)],\n [\"closer\", series.closer, Arr.last(cuts)],\n ] as const;\n for (const [messageId, voice, cut] of ends) {\n for (const [expected, end] of Option.toArray(Option.all([Option.fromNullishOr(voice), cut]))) {\n if (!Option.contains(speakerOf(check)(end), expected)) {\n context.report({ node: end, messageId, data: { series: name, voice: expected } });\n }\n }\n }\n};\n\nconst checkVoices = (check: Check): void => {\n const cuts = cutsOf({ context: check.context, script: check.script });\n checkCast(check, cuts);\n checkEnds(check, cuts);\n};\n\nconst checkBanned = (\n context: Context,\n {\n object,\n banned,\n }: Readonly<{ object: ObjectExpression; banned: Readonly<Record<string, string>> }>,\n): void => {\n for (const property of propertiesOf(object)) {\n for (const reason of Option.toArray(\n Option.flatMap(keyOf(property), (key) => Rec.get(banned, key)),\n )) {\n context.report({\n node: property,\n messageId: \"banned\",\n data: { key: textOf(context)(property.key), reason },\n fix: (fixer) => fixer.removeRange(removedRange({ object, property })),\n });\n }\n }\n};\n\nconst seriesNameOf = (script: ObjectExpression): Option.Option<ESTree.StringLiteral> =>\n pipe(\n propertyOf(SERIES)(script),\n Option.map(({ value }) => value),\n Option.filter(isStringLiteral),\n );\n\nconst checkSeries = (check: Check): void => {\n const { context, script, name, series } = check;\n checkValues({\n context,\n object: script,\n values: series.values ?? {},\n name,\n before: propertyOf(CUTS)(script),\n });\n checkAfterIntro({ context, script, name, values: series.afterIntro ?? {} });\n checkVoices(check);\n for (const rule of Option.toArray(Option.fromNullishOr(check.series.intro))) {\n checkIntro({ context: check.context, script: check.script, name: check.name, rule });\n }\n};\n\nconst checkScript = (\n context: Context,\n { script, options }: Readonly<{ script: ObjectExpression; options: Options }>,\n): void => {\n for (const literal of Option.toArray(seriesNameOf(script))) {\n const name = literal.value;\n const series = Rec.get(options.series, name);\n if (Option.isNone(series)) {\n context.report({\n node: literal,\n messageId: \"unknown\",\n data: { series: name, known: Arr.join(Rec.keys(options.series), \", \") },\n });\n return;\n }\n checkSeries({ context, script, name, series: series.value });\n }\n};\n\nexport const videoSeries: Rule = {\n meta: {\n type: \"problem\",\n fixable: \"code\",\n messages: MESSAGES,\n schema: [{ type: \"object\", additionalProperties: true }],\n },\n create: (context) => {\n const options = optionsOf(context.options);\n return {\n ObjectExpression: (object): void => {\n checkBanned(context, { object, banned: options.banned ?? {} });\n if (Option.isSome(propertyOf(CUTS)(object))) {\n checkScript(context, { script: object, options });\n }\n },\n };\n },\n};\n","import type { Rule } from \"vite-plus/lint/plugins\";\n\nimport { videoReadings } from \"./video-readings.ts\";\nimport { videoSay } from \"./video-say.ts\";\nimport { videoSeries } from \"./video-series.ts\";\n\nexport const VIDEO_RULES: Readonly<Record<string, Rule>> = {\n \"video-readings\": videoReadings,\n \"video-say\": videoSay,\n \"video-series\": videoSeries,\n};\n","import type { Rule } from \"vite-plus/lint/plugins\";\n\nimport { arrayFromAsync } from \"./array-from-async.ts\";\nimport { ecosystemReaders } from \"./ecosystem-readers.ts\";\nimport { explicitImportPath } from \"./explicit-import-path.ts\";\nimport { getOrInsert } from \"./get-or-insert.ts\";\nimport { inlineExports } from \"./inline-exports.ts\";\nimport { mcpToolLayer } from \"./mcp-tool-layer.ts\";\nimport { readonlyParameters } from \"./readonly-parameters.ts\";\nimport { separateMinMax } from \"./separate-min-max.ts\";\nimport { VIDEO_RULES } from \"./video-rules.ts\";\n\nexport const CODED_RULES: Readonly<Record<string, Rule>> = {\n \"array-from-async\": arrayFromAsync,\n \"ecosystem-readers\": ecosystemReaders,\n \"explicit-import-path\": explicitImportPath,\n \"get-or-insert\": getOrInsert,\n \"inline-exports\": inlineExports,\n \"mcp-tool-layer\": mcpToolLayer,\n \"readonly-parameters\": readonlyParameters,\n \"separate-min-max\": separateMinMax,\n ...VIDEO_RULES,\n};\n","import { toPosix } from \"@masseater.dev/path-kit\";\nimport { Array as Arr, Option, String as Str, pipe } from \"effect\";\nimport type { Context, ESTree, Rule } from \"vite-plus/lint/plugins\";\n\nconst NAMESPACE = \"*\";\nconst DEFAULT = \"default\";\n\nexport interface ImportBan {\n readonly module: string;\n readonly names: Option.Option<readonly string[]>;\n readonly typesAllowed: boolean;\n}\n\nexport interface MemberBan {\n readonly object: string;\n readonly properties: readonly string[];\n}\n\nexport interface Intent {\n readonly message: string;\n readonly home: Option.Option<string>;\n readonly imports: readonly ImportBan[];\n readonly members: readonly MemberBan[];\n}\n\nconst importedName = (specifier: ESTree.ImportDeclarationSpecifier): string => {\n if (specifier.type === \"ImportDefaultSpecifier\") {\n return DEFAULT;\n }\n if (specifier.type === \"ImportNamespaceSpecifier\") {\n return NAMESPACE;\n }\n if (specifier.imported.type === \"Identifier\") {\n return specifier.imported.name;\n }\n return specifier.imported.value;\n};\n\nconst isTypeOnly = (\n node: ESTree.ImportDeclaration,\n specifier: ESTree.ImportDeclarationSpecifier,\n): boolean =>\n node.importKind === \"type\" ||\n (specifier.type === \"ImportSpecifier\" && specifier.importKind === \"type\");\n\nconst isBannedSpecifier =\n (node: ESTree.ImportDeclaration, ban: ImportBan, names: readonly string[]) =>\n (specifier: ESTree.ImportDeclarationSpecifier): boolean =>\n !(ban.typesAllowed && isTypeOnly(node, specifier)) &&\n Arr.contains([NAMESPACE, ...names], importedName(specifier));\n\nconst wholeImport = (node: ESTree.ImportDeclaration, ban: ImportBan): readonly ESTree.Node[] => {\n if (ban.typesAllowed && node.importKind === \"type\") {\n return [];\n }\n return [node];\n};\n\nconst bannedIn =\n (node: ESTree.ImportDeclaration) =>\n (ban: ImportBan): readonly ESTree.Node[] => {\n if (node.source.value !== ban.module) {\n return [];\n }\n return Option.match(ban.names, {\n onNone: () => wholeImport(node, ban),\n onSome: (names): readonly ESTree.Node[] =>\n pipe(node.specifiers, Arr.filter(isBannedSpecifier(node, ban, names))),\n });\n };\n\nconst propertyOf = (node: ESTree.MemberExpression): Option.Option<string> => {\n if (!node.computed && node.property.type === \"Identifier\") {\n return Option.some(node.property.name);\n }\n if (node.property.type === \"Literal\" && typeof node.property.value === \"string\") {\n return Option.some(node.property.value);\n }\n return Option.none();\n};\n\nconst isBannedMember =\n (node: ESTree.MemberExpression) =>\n (ban: MemberBan): boolean =>\n node.object.type === \"Identifier\" &&\n node.object.name === ban.object &&\n pipe(\n propertyOf(node),\n Option.exists((property) => Arr.contains(ban.properties, property)),\n );\n\nconst reportImports = (context: Context, intent: Intent, node: ESTree.ImportDeclaration): void => {\n const banned = pipe(intent.imports, Arr.flatMap(bannedIn(node)));\n for (const found of banned) {\n context.report({ node: found, message: intent.message });\n }\n};\n\nconst isHome = (intent: Intent, filename: string): boolean =>\n Option.exists(intent.home, (home) => Str.endsWith(home)(toPosix(filename)));\n\nexport const ruleOf = (intent: Intent): Rule => ({\n meta: { type: \"problem\" },\n create: (context) => {\n if (isHome(intent, context.filename)) {\n return {};\n }\n return {\n ImportDeclaration: (node): void => {\n reportImports(context, intent, node);\n },\n MemberExpression: (node): void => {\n if (pipe(intent.members, Arr.some(isBannedMember(node)))) {\n context.report({ node, message: intent.message });\n }\n },\n };\n },\n});\n","import { Option } from \"effect\";\n\nimport type { Intent } from \"./intent-rule.ts\";\n\nconst RUN_MESSAGE =\n \"Run Effects with run or runner from @r_masseater/masseater-utils/workers-tracing/effect, so their spans reach the Workers trace.\";\n\nconst RUN_FUNCTIONS: readonly string[] = [\n \"runPromise\",\n \"runPromiseExit\",\n \"runFork\",\n \"runCallback\",\n \"runSync\",\n \"runSyncExit\",\n \"runPromiseWith\",\n \"runPromiseExitWith\",\n \"runForkWith\",\n \"runCallbackWith\",\n \"runSyncWith\",\n \"runSyncExitWith\",\n];\n\nconst HAND_WRITTEN_SQL =\n \"Build queries with the Drizzle query builder, so that their columns and types come from the schema. Do not write SQL by hand with sql.\";\n\nexport const INTENTS: Readonly<Record<string, Intent>> = {\n \"ui-state-in-atoms\": {\n message:\n \"Keep UI state in effect-atom (Atom.make, useAtom, useAtomValue), so that state has one home outside the component tree. Do not use React state hooks or context.\",\n home: Option.none(),\n imports: [\n {\n module: \"react\",\n names: Option.some([\"useState\", \"useReducer\", \"createContext\", \"useContext\"]),\n typesAllowed: false,\n },\n ],\n members: [],\n },\n \"no-hand-written-sql\": {\n message: HAND_WRITTEN_SQL,\n home: Option.none(),\n imports: [\n { module: \"drizzle-orm\", names: Option.some([\"sql\"]), typesAllowed: false },\n { module: \"drizzle-orm/sql\", names: Option.none(), typesAllowed: false },\n ],\n members: [],\n },\n \"traced-elysia\": {\n message:\n \"Import Elysia from @r_masseater/masseater-utils/workers-tracing/elysia, so every handle call is a span.\",\n home: Option.none(),\n imports: [{ module: \"elysia\", names: Option.some([\"Elysia\", \"default\"]), typesAllowed: true }],\n members: [],\n },\n \"traced-effect-run\": {\n message: RUN_MESSAGE,\n home: Option.none(),\n imports: [\n { module: \"effect/Effect\", names: Option.some(RUN_FUNCTIONS), typesAllowed: false },\n { module: \"effect/ManagedRuntime\", names: Option.some([\"make\"]), typesAllowed: false },\n ],\n members: [\n { object: \"Effect\", properties: RUN_FUNCTIONS },\n { object: \"ManagedRuntime\", properties: [\"make\"] },\n ],\n },\n \"platform-node-by-module\": {\n message:\n 'Import names from a module path, such as import { layer } from \"@effect/platform-node/NodeServices\". The package root loads every module, the Redis client included, and adds about 250 ms to each start.',\n home: Option.none(),\n imports: [{ module: \"@effect/platform-node\", names: Option.none(), typesAllowed: true }],\n members: [],\n },\n \"main-through-node-main\": {\n message:\n 'Start a Node.js program with runMain from \"@r_masseater/masseater-utils/node-main\", so that it is traced and a failure prints one line instead of a stack trace.',\n home: Option.some(\"/src/features/run-main/model/run-main.ts\"),\n imports: [\n {\n module: \"@effect/platform-node/NodeRuntime\",\n names: Option.some([\"runMain\"]),\n typesAllowed: false,\n },\n {\n module: \"@effect/platform-node-shared/NodeRuntime\",\n names: Option.some([\"runMain\"]),\n typesAllowed: false,\n },\n ],\n members: [{ object: \"NodeRuntime\", properties: [\"runMain\"] }],\n },\n \"typed-calls-not-reflect\": {\n message:\n \"Read properties and call functions through typed access, or decode untyped values with Schema at the boundary. Do not go around the types with Reflect.\",\n home: Option.none(),\n imports: [],\n members: [{ object: \"Reflect\", properties: [\"get\", \"apply\"] }],\n },\n \"db-writes-in-writers\": {\n message:\n \"Write tables only from a *-writer.server.ts module, so that a table update and its revision go into the same batch. Call the writer here instead of writing through db.\",\n home: Option.none(),\n imports: [],\n members: [{ object: \"db\", properties: [\"insert\", \"update\", \"delete\", \"batch\", \"run\"] }],\n },\n};\n","import { Record as Rec, pipe } from \"effect\";\nimport type { Plugin } from \"vite-plus/lint/plugins\";\n\nimport { CODED_RULES } from \"./coded-rules.ts\";\nimport { ruleOf } from \"./intent-rule.ts\";\nimport { INTENTS } from \"./intents.ts\";\n\nexport const mschLintPlugin: Plugin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,KAAK;GAAG,cAAc;EAAK,CAAC;EACvF,SAAS,CAAC;CACZ;CACA,0BAA0B;EACxB,SACE;EACF,MAAM,OAAO,KAAK,0CAA0C;EAC5D,SAAS,CACP;GACE,QAAQ;GACR,OAAO,OAAO,KAAK,CAAC,SAAS,CAAC;GAC9B,cAAc;EAChB,GACA;GACE,QAAQ;GACR,OAAO,OAAO,KAAK,CAAC,SAAS,CAAC;GAC9B,cAAc;EAChB,CACF;EACA,SAAS,CAAC;GAAE,QAAQ;GAAe,YAAY,CAAC,SAAS;EAAE,CAAC;CAC9D;CACA,2BAA2B;EACzB,SACE;EACF,MAAM,OAAO,KAAK;EAClB,SAAS,CAAC;EACV,SAAS,CAAC;GAAE,QAAQ;GAAW,YAAY,CAAC,OAAO,OAAO;EAAE,CAAC;CAC/D;CACA,wBAAwB;EACtB,SACE;EACF,MAAM,OAAO,KAAK;EAClB,SAAS,CAAC;EACV,SAAS,CAAC;GAAE,QAAQ;GAAM,YAAY;IAAC;IAAU;IAAU;IAAU;IAAS;GAAK;EAAE,CAAC;CACxF;AACF;;ACnGA,MAAa,iBAAwE;CACnF,MAAM,EAAE,MAAM,YAAY;CAC1B,OAAO;EACL,GAAG;EACH,GAAG,KAAK,SAASE,OAAI,IAAI,MAAM,CAAC;CAClC;AACF"}
|
|
1
|
+
{"version":3,"file":"lint-rules.mjs","names":["START","END","ONE","textOf","Str","Arr","MESSAGE","ONE","Arr","Arr","Rec","MESSAGE_ID","MESSAGE","Str","Arr","isStringLiteral","visitorOf","MESSAGE","Arr","MESSAGE","Arr","MESSAGE","Str","Arr","Arr","Arr","Str","MESSAGE","Arr","unwrapped","Str","Arr","START","NEXT","propertyOf","Arr","Str","MESSAGES","Arr","Str","MESSAGES","OptionsSchema","optionsOf","Str","Arr","Rec","NEXT","Arr","propertyOf","Rec","propertyOf","Arr","Str","propertyOf","Arr","Rec","Arr","Str","Rec"],"sources":["../src/features/define-lint-rules/model/get-or-insert-ast.ts","../src/features/define-lint-rules/model/array-from-async.ts","../src/features/define-lint-rules/model/ecosystem-readers.ts","../src/features/define-lint-rules/model/typed-rule.ts","../src/features/define-lint-rules/model/explicit-import-path.ts","../src/features/define-lint-rules/model/get-or-insert.ts","../src/features/define-lint-rules/model/inline-exports.ts","../src/features/define-lint-rules/model/mcp-tool-layer.ts","../src/features/define-lint-rules/model/declared-outside.ts","../src/features/define-lint-rules/model/writable-part.ts","../src/features/define-lint-rules/model/readonly-parameters.ts","../src/features/define-lint-rules/model/separate-min-max.ts","../src/features/define-lint-rules/model/video-script-ast.ts","../src/features/define-lint-rules/model/video-readings.ts","../src/features/define-lint-rules/model/video-say.ts","../src/features/define-lint-rules/model/video-values.ts","../src/features/define-lint-rules/model/video-intro.ts","../src/features/define-lint-rules/model/video-series.ts","../src/features/define-lint-rules/model/video-rules.ts","../src/features/define-lint-rules/model/coded-rules.ts","../src/features/define-lint-rules/model/intent-rule.ts","../src/features/define-lint-rules/model/intents.ts","../src/features/define-lint-rules/model/plugin.ts"],"sourcesContent":["import { Array as Arr, Option, Predicate, Schema, String as Str, pipe } from \"effect\";\n\nexport type Keys = Readonly<Record<string, readonly string[] | undefined>>;\n\nexport interface Scope {\n readonly text: string;\n readonly keys: Keys;\n}\n\nexport interface Access {\n readonly map: string;\n readonly key: string;\n readonly value: Option.Option<string>;\n}\n\nconst START = 0;\nconst END = 1;\nconst KEY = 0;\nconst VALUE = 1;\nconst ONE = 1;\n\nconst RangeSchema = Schema.Tuple([Schema.Finite, Schema.Finite]);\nconst RangedSchema = Schema.Struct({ range: RangeSchema });\n\ntype Ranged = typeof RangedSchema.Type;\n\nconst decodeRanged = Schema.decodeUnknownOption(RangedSchema);\n\nconst IdentifierSchema = Schema.Struct({ type: Schema.Literal(\"Identifier\"), name: Schema.String });\n\nconst MemberSchema = Schema.Struct({\n type: Schema.Literal(\"MemberExpression\"),\n computed: Schema.Literal(false),\n object: RangedSchema,\n property: IdentifierSchema,\n});\n\nconst MemberCallSchema = Schema.Struct({\n type: Schema.Literal(\"CallExpression\"),\n callee: MemberSchema,\n arguments: Schema.Array(RangedSchema),\n});\n\nconst decodeMemberCall = Schema.decodeUnknownOption(MemberCallSchema);\n\nconst decodeCall = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"CallExpression\"),\n callee: RangedSchema,\n arguments: Schema.Array(Schema.Unknown),\n }),\n);\n\nconst decodeBlock = Schema.decodeUnknownOption(\n Schema.Struct({ type: Schema.Literal(\"BlockStatement\"), body: Schema.Array(Schema.Unknown) }),\n);\n\nconst decodeExpressionStatement = Schema.decodeUnknownOption(\n Schema.Struct({ type: Schema.Literal(\"ExpressionStatement\"), expression: Schema.Unknown }),\n);\n\nconst decodeReturn = Schema.decodeUnknownOption(\n Schema.Struct({ type: Schema.Literal(\"ReturnStatement\"), argument: RangedSchema }),\n);\n\nconst decodeTyped = Schema.decodeUnknownOption(Schema.Struct({ type: Schema.String }));\n\nconst textOf =\n (scope: Scope) =>\n (node: Ranged): string =>\n Str.slice(node.range[START], node.range[END])(scope.text);\n\nexport const textOfNode =\n (scope: Scope) =>\n (node: unknown): Option.Option<string> =>\n pipe(decodeRanged(node), Option.map(textOf(scope)));\n\nexport const accessOf =\n (scope: Scope) =>\n (method: string) =>\n (node: unknown): Option.Option<Access> =>\n pipe(\n decodeMemberCall(node),\n Option.filter((call) => call.callee.property.name === method),\n Option.flatMap((call) =>\n pipe(\n Arr.get(call.arguments, KEY),\n Option.map((key) => ({\n map: textOf(scope)(call.callee.object),\n key: textOf(scope)(key),\n value: pipe(Arr.get(call.arguments, VALUE), Option.map(textOf(scope))),\n })),\n ),\n ),\n );\n\nexport const sameEntry =\n (left: Access) =>\n (right: Access): boolean =>\n left.map === right.map && left.key === right.key;\n\nexport const calleeMatches =\n (scope: Scope) =>\n (pattern: RegExp) =>\n (node: unknown): Option.Option<readonly unknown[]> =>\n pipe(\n decodeCall(node),\n Option.filter((call) => pattern.test(textOf(scope)(call.callee))),\n Option.map((call) => call.arguments),\n );\n\nexport const expressionOf = (statement: unknown): Option.Option<unknown> =>\n pipe(\n decodeExpressionStatement(statement),\n Option.map((found) => found.expression),\n );\n\nexport const returnedText =\n (scope: Scope) =>\n (statement: unknown): Option.Option<string> =>\n pipe(\n decodeReturn(statement),\n Option.map((found) => textOf(scope)(found.argument)),\n );\n\nexport const bodyOf = (node: unknown): Option.Option<readonly unknown[]> =>\n pipe(\n decodeBlock(node),\n Option.map((block) => block.body),\n );\n\nexport const onlyStatement = (statement: unknown): Option.Option<unknown> =>\n Option.match(bodyOf(statement), {\n onNone: () => Option.some(statement),\n onSome: (body) =>\n Option.flatMap(\n Option.liftPredicate(body, (all) => all.length === ONE),\n Arr.head,\n ),\n });\n\nexport const typeOf = (node: unknown): string =>\n pipe(decodeTyped(node), Option.match({ onNone: () => \"\", onSome: (found) => found.type }));\n\nexport const parentOf = (node: unknown): Option.Option<unknown> =>\n pipe(\n Option.liftPredicate(node, Predicate.hasProperty(\"parent\")),\n Option.flatMap((found) => Option.fromNullishOr(found.parent)),\n );\n\nconst childrenOf = (keys: Keys, node: unknown): readonly unknown[] =>\n pipe(\n Option.liftPredicate(node, Predicate.isObject),\n Option.match({\n onNone: (): readonly unknown[] => [],\n onSome: (found) =>\n pipe(\n keys[typeOf(found)] ?? [],\n Arr.flatMap((key): readonly unknown[] =>\n pipe(\n Option.liftPredicate(found, Predicate.hasProperty(key)),\n Option.match({\n onNone: (): readonly unknown[] => [],\n onSome: (owner) => Arr.ensure(owner[key]),\n }),\n ),\n ),\n Arr.filter(Predicate.isObject),\n ),\n }),\n );\n\nexport const descendants =\n (keys: Keys) =>\n (node: unknown): readonly unknown[] => [\n node,\n ...pipe(childrenOf(keys, node), Arr.flatMap(descendants(keys))),\n ];\n\nexport const accessesIn =\n (scope: Scope) =>\n (method: string) =>\n (node: unknown): readonly Access[] =>\n pipe(descendants(scope.keys)(node), Arr.map(accessOf(scope)(method)), Arr.getSomes);\n","import { Array as Arr, Option, Schema, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nimport { expressionOf, onlyStatement } from \"./get-or-insert-ast.ts\";\n\nconst MESSAGE =\n \"Collect an async iterable with Array.fromAsync, passing the mapping as its second argument. Do not push each item from a for await loop.\";\n\nconst ONE = 1;\n\nconst DeclarationSchema = Schema.Struct({\n type: Schema.Literal(\"VariableDeclaration\"),\n declarations: Schema.Array(Schema.Unknown),\n});\n\nconst decodeLoop = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"ForOfStatement\"),\n await: Schema.Literal(true),\n left: DeclarationSchema,\n body: Schema.Unknown,\n }),\n);\n\nconst PushNameSchema = Schema.Struct({\n type: Schema.Literal(\"Identifier\"),\n name: Schema.Literal(\"push\"),\n});\n\nconst PushCalleeSchema = Schema.Struct({\n type: Schema.Literal(\"MemberExpression\"),\n computed: Schema.Literal(false),\n property: PushNameSchema,\n});\n\nconst ArgumentSchema = Schema.Struct({ type: Schema.String });\n\nconst decodePush = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"CallExpression\"),\n callee: PushCalleeSchema,\n arguments: Schema.Array(ArgumentSchema),\n }),\n);\n\nconst pushesOne = (statement: unknown): boolean =>\n pipe(\n expressionOf(statement),\n Option.flatMap(decodePush),\n Option.exists(\n (call) =>\n call.arguments.length === ONE &&\n !pipe(\n call.arguments,\n Arr.some((argument) => argument.type === \"SpreadElement\"),\n ),\n ),\n );\n\nconst collectsByHand = (node: unknown): boolean =>\n pipe(\n decodeLoop(node),\n Option.filter((loop) => loop.left.declarations.length === ONE),\n Option.flatMap((loop) => onlyStatement(loop.body)),\n Option.exists(pushesOne),\n );\n\nexport const arrayFromAsync: Rule = {\n meta: { type: \"suggestion\" },\n create: (context) => ({\n ForOfStatement: (node): void => {\n if (collectsByHand(node)) {\n context.report({ node, message: MESSAGE });\n }\n },\n }),\n};\n","import { baseName } from \"@masseater.dev/path-kit\";\nimport { Array as Arr, Option, Record as Rec, pipe } from \"effect\";\nimport type { Context, ESTree, Rule } from \"vite-plus/lint/plugins\";\n\ntype Format = \"json\" | \"toml\" | \"typescript\" | \"yaml\";\n\ninterface EcosystemFile {\n readonly name: RegExp;\n readonly format: Format;\n readonly reader: string;\n}\n\nconst ECOSYSTEM_FILES: readonly EcosystemFile[] = [\n {\n name: /^pnpm-workspace\\.yaml$/u,\n format: \"yaml\",\n reader:\n \"readWorkspaceManifest, findWorkspaceProjects or updateWorkspaceManifest from @r_masseater/masseater-utils/kestrion/pnpm, which run the @pnpm readers\",\n },\n {\n name: /^pnpm-lock\\.yaml$/u,\n format: \"yaml\",\n reader:\n \"readWantedLockfile, lockedPackageIds or lockedGraph from @r_masseater/masseater-utils/kestrion/pnpm, which run @pnpm/lockfile.fs\",\n },\n { name: /^Cargo\\.(?:toml|lock)$/u, format: \"toml\", reader: \"cargo metadata\" },\n {\n name: /^tsconfig(?:\\.[\\w-]+)?\\.json$/u,\n format: \"json\",\n reader: \"parse from tsconfck or the TypeScript compiler API\",\n },\n {\n name: /^vite\\.config\\.[cm]?[jt]s$/u,\n format: \"typescript\",\n reader:\n \"resolveConfigFromFile from vite-plus, or parse from vite-plus for a read that must not run the file\",\n },\n];\n\nconst PARSER_MODULES: Readonly<Record<Format, readonly string[]>> = {\n json: [\"jsonc-parser\", \"json5\", \"strip-json-comments\"],\n toml: [\"smol-toml\", \"@iarna/toml\", \"toml\", \"toml-eslint-parser\"],\n typescript: [\"typescript\", \"oxc-parser\", \"@babel/parser\", \"@typescript-eslint/parser\", \"acorn\"],\n yaml: [\"yaml\", \"js-yaml\"],\n};\n\nconst PARSER_CALLS: Readonly<Record<Format, Option.Option<RegExp>>> = {\n json: Option.some(/\\b(?:JSON\\.parse|parseJson)\\b/u),\n toml: Option.none(),\n typescript: Option.none(),\n yaml: Option.none(),\n};\n\nconst importedModules = (statements: readonly ESTree.Statement[]): readonly string[] =>\n pipe(\n statements,\n Arr.filter((statement) => statement.type === \"ImportDeclaration\"),\n Arr.map((declaration) => declaration.source.value),\n );\n\nconst parserIn =\n (context: Context) =>\n (format: Format): Option.Option<string> => {\n const imported = importedModules(context.sourceCode.ast.body);\n const fromModule = pipe(\n Rec.get(PARSER_MODULES, format),\n Option.getOrElse((): readonly string[] => []),\n Arr.findFirst((module) => Arr.contains(imported, module)),\n );\n if (Option.isSome(fromModule)) {\n return fromModule;\n }\n return pipe(\n Rec.get(PARSER_CALLS, format),\n Option.flatten,\n Option.flatMap((pattern) => Option.fromNullishOr(pattern.exec(context.sourceCode.text))),\n Option.map(([call]) => call),\n );\n };\n\nconst messageFor =\n (context: Context) =>\n (text: string): Option.Option<string> => {\n const name = baseName(text);\n return pipe(\n ECOSYSTEM_FILES,\n Arr.findFirst((entry) => entry.name.test(name)),\n Option.flatMap(({ format, reader }) =>\n pipe(\n parserIn(context)(format),\n Option.map(\n (parser) =>\n `${name} has an official reader: ${reader}. Read it with that instead of parsing it with ${parser}, so that the file means what its own tool says it means.`,\n ),\n ),\n ),\n );\n };\n\nexport const ecosystemReaders: Rule = {\n meta: { type: \"problem\" },\n create: (context) => ({\n Literal: (node): void => {\n const message = pipe(\n Option.liftPredicate(node.value, (value) => typeof value === \"string\"),\n Option.flatMap(messageFor(context)),\n );\n if (Option.isSome(message)) {\n context.report({ node, message: message.value });\n }\n },\n TemplateElement: (node): void => {\n const message = messageFor(context)(node.value.raw);\n if (Option.isSome(message)) {\n context.report({ node, message: message.value });\n }\n },\n }),\n};\n","import { withTypeInformation } from \"@r_masseater/oxlint-typed-rules\";\nimport type { ParserServices, TypedContext } from \"@r_masseater/oxlint-typed-rules\";\nimport { Option, pipe } from \"effect\";\nimport type { Rule, RuleMeta, Visitor } from \"vite-plus/lint/plugins\";\n\nexport interface TypedRuleParts {\n readonly meta: RuleMeta;\n readonly visitorOf: (context: TypedContext, services: ParserServices) => Visitor;\n}\n\nexport const typedRuleOf = ({ meta, visitorOf }: TypedRuleParts): Rule =>\n withTypeInformation({\n meta,\n create: (context: TypedContext) =>\n pipe(\n Option.fromNullishOr(context.sourceCode.parserServices),\n Option.match({\n onNone: (): Visitor => ({}),\n onSome: (services) => visitorOf(context, services),\n }),\n ),\n });\n","import { baseName, parent } from \"@masseater.dev/path-kit\";\nimport type { ParserServices, TypedContext } from \"@r_masseater/oxlint-typed-rules\";\nimport { Array as Arr, Option, Predicate, String as Str, pipe } from \"effect\";\nimport type { ESTree, Rule, Visitor } from \"vite-plus/lint/plugins\";\n\nimport { typedRuleOf } from \"./typed-rule.ts\";\n\nconst MESSAGE_ID = \"spellOut\";\nconst MESSAGE =\n \"`{{specifier}}` does not name a file. Write `{{fixed}}`: Node ESM and TypeScript nodenext resolve neither a missing extension nor a directory index, so spelling out the file works under every resolver.\";\n\nconst RELATIVE = /^\\.{1,2}(?:\\/|$)/u;\nconst PARTS = /^(?<path>[^?]*)(?<query>.*)$/su;\nconst TRAILING_SEPARATORS = /\\/+$/u;\nconst DIRECTORY_NAMES: readonly string[] = [\".\", \"..\"];\nconst INDEX = \"index.\";\nconst DEFAULT_QUOTE = '\"';\nconst FIRST = 0;\n\ninterface Parts {\n readonly path: string;\n readonly query: string;\n}\n\nconst partsOf = (specifier: string): Option.Option<Parts> =>\n pipe(\n Str.match(PARTS)(specifier),\n Option.flatMap((matched) => Option.fromNullishOr(matched.groups)),\n Option.map((groups) => ({ path: groups[\"path\"] ?? \"\", query: groups[\"query\"] ?? \"\" })),\n );\n\nconst completionOf = (resolved: string, path: string): Option.Option<string> => {\n const file = baseName(resolved);\n const name = baseName(path);\n const index = Str.startsWith(INDEX)(file);\n if (Arr.contains(DIRECTORY_NAMES, name)) {\n return Option.liftPredicate(`/${file}`, () => index);\n }\n if (Str.startsWith(`${name}.`)(file)) {\n return Option.some(Str.slice(name.length)(file));\n }\n return Option.liftPredicate(`/${file}`, () => index && baseName(parent(resolved)) === name);\n};\n\nconst resolvedFileOf = (\n services: ParserServices,\n source: ESTree.StringLiteral,\n): Option.Option<string> =>\n pipe(\n Option.fromNullishOr(services.getSymbolAtLocation(source)),\n Option.flatMap((symbol) => Arr.head(symbol.declarations)),\n Option.map((declaration) => declaration.getSourceFile().fileName),\n );\n\nconst fixedOf = (services: ParserServices, source: ESTree.StringLiteral): Option.Option<string> =>\n pipe(\n partsOf(source.value),\n Option.filter(({ path }) => RELATIVE.test(path)),\n Option.flatMap(({ path, query }) =>\n pipe(\n resolvedFileOf(services, source),\n Option.flatMap((resolved) =>\n completionOf(resolved, Str.replace(TRAILING_SEPARATORS, \"\")(path)),\n ),\n Option.map(\n (completion) => `${Str.replace(TRAILING_SEPARATORS, \"\")(path)}${completion}${query}`,\n ),\n ),\n ),\n );\n\nconst quoteOf = (source: ESTree.StringLiteral): string =>\n pipe(\n Option.fromNullishOr(source.raw),\n Option.flatMap(Str.charAt(FIRST)),\n Option.getOrElse(() => DEFAULT_QUOTE),\n );\n\nconst isStringLiteral = (node: ESTree.Node | null): node is ESTree.StringLiteral =>\n Predicate.isNotNull(node) && node.type === \"Literal\" && Predicate.isString(node.value);\n\nconst visitorOf = (context: TypedContext, services: ParserServices): Visitor => {\n const check = (source: ESTree.Node | null): void => {\n if (!isStringLiteral(source)) {\n return;\n }\n const fixed = fixedOf(services, source);\n if (Option.isSome(fixed)) {\n context.report({\n node: source,\n messageId: MESSAGE_ID,\n data: { specifier: source.value, fixed: fixed.value },\n fix: (fixer) =>\n fixer.replaceText(source, `${quoteOf(source)}${fixed.value}${quoteOf(source)}`),\n });\n }\n };\n return {\n ImportDeclaration: (node): void => {\n check(node.source);\n },\n ExportAllDeclaration: (node): void => {\n check(node.source);\n },\n ExportNamedDeclaration: (node): void => {\n check(node.source);\n },\n ImportExpression: (node): void => {\n check(node.source);\n },\n };\n};\n\nexport const explicitImportPath: Rule = typedRuleOf({\n meta: { type: \"suggestion\", fixable: \"code\", messages: { [MESSAGE_ID]: MESSAGE } },\n visitorOf,\n});\n","import { Array as Arr, Option, Schema, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nimport {\n accessOf,\n accessesIn,\n bodyOf,\n calleeMatches,\n descendants,\n expressionOf,\n onlyStatement,\n parentOf,\n returnedText,\n sameEntry,\n textOfNode,\n typeOf,\n} from \"./get-or-insert-ast.ts\";\nimport type { Access, Scope } from \"./get-or-insert-ast.ts\";\n\nconst MESSAGE =\n \"Use getOrInsert or getOrInsertComputed on the Map or WeakMap, so that reading a key and storing its first value is one call. Do not read the key and then set it by hand.\";\n\nconst ONE = 1;\nconst TWO = 2;\nconst OPTION_FROM = /^(?:Option\\.)?from(?:NullishOr|UndefinedOr|Nullable)$/u;\nconst GET_OR_ELSE = /^(?:Option\\.)?getOrElse$/u;\nconst FUNCTIONS: readonly string[] = [\"ArrowFunctionExpression\", \"FunctionExpression\"];\n\nconst decodeGuard = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"IfStatement\"),\n test: Schema.Unknown,\n consequent: Schema.Unknown,\n alternate: Schema.Null,\n }),\n);\n\nconst decodeNot = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"UnaryExpression\"),\n operator: Schema.Literal(\"!\"),\n argument: Schema.Unknown,\n }),\n);\n\nconst DeclaratorSchema = Schema.Struct({\n id: Schema.Struct({ type: Schema.Literal(\"Identifier\"), name: Schema.String }),\n init: Schema.Unknown,\n});\n\ntype Declarator = typeof DeclaratorSchema.Type;\n\nconst decodeDeclaration = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"VariableDeclaration\"),\n declarations: Schema.Array(DeclaratorSchema),\n }),\n);\n\nconst decodeNullish = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"LogicalExpression\"),\n operator: Schema.Literal(\"??\"),\n left: Schema.Unknown,\n }),\n);\n\nconst storeOf =\n (scope: Scope) =>\n (statement: unknown): Option.Option<Access> =>\n pipe(expressionOf(statement), Option.flatMap(accessOf(scope)(\"set\")));\n\nconst isHasGuard = (scope: Scope, node: unknown): boolean =>\n pipe(\n decodeGuard(node),\n Option.exists((guard) => {\n const guarded = pipe(\n decodeNot(guard.test),\n Option.flatMap((not) => accessOf(scope)(\"has\")(not.argument)),\n );\n const stored = pipe(onlyStatement(guard.consequent), Option.flatMap(storeOf(scope)));\n return Option.isSome(guarded) && Option.exists(stored, sameEntry(guarded.value));\n }),\n );\n\nconst deletes =\n (scope: Scope, read: Access) =>\n (statement: unknown): boolean =>\n pipe(\n expressionOf(statement),\n Option.flatMap(accessOf(scope)(\"delete\")),\n Option.exists(sameEntry(read)),\n );\n\nconst storesBack =\n (scope: Scope, read: Access, name: string) =>\n (statement: unknown): boolean =>\n Option.exists(\n storeOf(scope)(statement),\n (stored) => sameEntry(read)(stored) && Option.exists(stored.value, (value) => value === name),\n );\n\nconst fallsBack =\n (scope: Scope, later: readonly unknown[]) =>\n (declarator: Declarator): boolean =>\n pipe(\n decodeNullish(declarator.init),\n Option.flatMap((nullish) => accessOf(scope)(\"get\")(nullish.left)),\n Option.exists(\n (read) =>\n pipe(later, Arr.some(storesBack(scope, read, declarator.id.name))) &&\n !pipe(later, Arr.some(deletes(scope, read))),\n ),\n );\n\nconst fallbackIndices = (scope: Scope, body: readonly unknown[]): readonly number[] =>\n pipe(\n body,\n Arr.map((statement, index) => {\n const fallsBackLater = fallsBack(scope, Arr.drop(body, index + ONE));\n return pipe(\n decodeDeclaration(statement),\n Option.map((declaration) => declaration.declarations),\n Option.filter(Arr.some(fallsBackLater)),\n Option.as(index),\n );\n }),\n Arr.getSomes,\n );\n\ninterface CachedCheck {\n readonly test: (name: string) => string;\n readonly value: (name: string) => string;\n}\n\nconst itself = (name: string): string => name;\n\nconst CACHED_CHECKS: readonly CachedCheck[] = [\n { test: (name) => `${name} !== undefined`, value: itself },\n { test: (name) => `${name} != null`, value: itself },\n { test: (name) => `${name} !== null`, value: itself },\n { test: (name) => `Predicate.isNotUndefined(${name})`, value: itself },\n { test: (name) => `Predicate.isNotNullish(${name})`, value: itself },\n { test: itself, value: itself },\n { test: (name) => `Option.isSome(${name})`, value: (name) => `${name}.value` },\n];\n\nconst returnsCached =\n (scope: Scope, name: string) =>\n (statement: unknown): boolean =>\n pipe(\n decodeGuard(statement),\n Option.exists((guard) => {\n const tested = textOfNode(scope)(guard.test);\n const returned = pipe(onlyStatement(guard.consequent), Option.flatMap(returnedText(scope)));\n return pipe(\n CACHED_CHECKS,\n Arr.some(\n (check) =>\n Option.exists(tested, (found) => found === check.test(name)) &&\n Option.exists(returned, (found) => found === check.value(name)),\n ),\n );\n }),\n );\n\nconst unwrapOption =\n (scope: Scope) =>\n (node: unknown): unknown =>\n pipe(\n calleeMatches(scope)(OPTION_FROM)(node),\n Option.flatMap(Arr.head),\n Option.getOrElse(() => node),\n );\n\nconst readsCached =\n (scope: Scope, stored: Access) =>\n (declarator: Declarator): boolean =>\n pipe(\n unwrapOption(scope)(declarator.init),\n accessOf(scope)(\"get\"),\n Option.exists(sameEntry(stored)),\n );\n\nconst earlyReturn = (scope: Scope, body: readonly unknown[], stored: Access): boolean =>\n pipe(\n body,\n Arr.some((statement, index) =>\n pipe(\n decodeDeclaration(statement),\n Option.flatMap((declaration) => Arr.head(declaration.declarations)),\n Option.filter(readsCached(scope, stored)),\n Option.exists((declarator) =>\n Option.exists(Arr.get(body, index + ONE), returnsCached(scope, declarator.id.name)),\n ),\n ),\n ),\n );\n\nconst storedAndReturned = (scope: Scope, body: readonly unknown[]): Option.Option<Access> => {\n const returned = pipe(Arr.last(body), Option.flatMap(returnedText(scope)));\n return pipe(\n Arr.get(body, body.length - TWO),\n Option.flatMap(storeOf(scope)),\n Option.filter(\n (stored) => Option.isSome(returned) && Option.contains(stored.value, returned.value),\n ),\n );\n};\n\nconst optionRegion = (scope: Scope, block: unknown): Option.Option<unknown> =>\n pipe(\n parentOf(block),\n Option.filter((fn) => Arr.contains(FUNCTIONS, typeOf(fn))),\n Option.flatMap(parentOf),\n Option.filter((call) => Option.isSome(calleeMatches(scope)(GET_OR_ELSE)(call))),\n Option.flatMap(parentOf),\n );\n\nconst readsThroughOption =\n (scope: Scope, stored: Access) =>\n (node: unknown): boolean =>\n pipe(\n calleeMatches(scope)(OPTION_FROM)(node),\n Option.flatMap(Arr.head),\n Option.flatMap(accessOf(scope)(\"get\")),\n Option.exists(sameEntry(stored)),\n );\n\nconst storesOnce =\n (scope: Scope, stored: Access) =>\n (region: unknown): boolean =>\n pipe(accessesIn(scope)(\"set\")(region), Arr.filter(sameEntry(stored))).length === ONE;\n\nconst returnsOnce = (scope: Scope, block: unknown): boolean =>\n pipe(\n descendants(scope.keys)(block),\n Arr.filter((node) => typeOf(node) === \"ReturnStatement\"),\n ).length === ONE;\n\nconst fallsBackInOption = (scope: Scope, block: unknown, stored: Access): boolean =>\n returnsOnce(scope, block) &&\n Option.exists(\n optionRegion(scope, block),\n (region) =>\n pipe(descendants(scope.keys)(region), Arr.some(readsThroughOption(scope, stored))) &&\n storesOnce(scope, stored)(region),\n );\n\nconst isMemoized = (scope: Scope, block: unknown): boolean =>\n pipe(\n bodyOf(block),\n Option.exists((body) =>\n Option.exists(storedAndReturned(scope, body), (stored) => {\n if (earlyReturn(scope, body, stored)) {\n return storesOnce(scope, stored)(block);\n }\n return fallsBackInOption(scope, block, stored);\n }),\n ),\n );\n\nexport const getOrInsert: Rule = {\n meta: { type: \"suggestion\" },\n create: (context) => {\n const scope: Scope = { text: context.sourceCode.text, keys: context.sourceCode.visitorKeys };\n return {\n IfStatement: (node): void => {\n if (isHasGuard(scope, node)) {\n context.report({ node, message: MESSAGE });\n }\n },\n BlockStatement: (node): void => {\n for (const index of fallbackIndices(scope, node.body)) {\n for (const statement of Option.toArray(Arr.get(node.body, index))) {\n context.report({ node: statement, message: MESSAGE });\n }\n }\n if (isMemoized(scope, node)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n};\n","import { Array as Arr, pipe } from \"effect\";\nimport type { Context, ESTree, Rule } from \"vite-plus/lint/plugins\";\n\nconst MESSAGE =\n \"export は宣言に付ける(export const・export function など)。ファイルの末尾で export { … } にまとめない。\";\nconst TYPE = \"type\";\nconst CLASS_NAME = \"ClassName\";\n\nconst isList = (node: ESTree.ExportNamedDeclaration): boolean =>\n node.declaration === null && node.source === null && !Arr.isReadonlyArrayEmpty(node.specifiers);\n\nconst localName = (specifier: ESTree.ExportSpecifier): string => {\n if (specifier.local.type === \"Literal\") {\n return specifier.local.value;\n }\n return specifier.local.name;\n};\n\nconst isClass = (context: Context, name: string): boolean =>\n pipe(\n context.sourceCode.scopeManager.scopes,\n Arr.flatMap((scope) => scope.variables),\n Arr.filter((variable) => variable.name === name),\n Arr.flatMap((variable) => variable.defs),\n (defs) =>\n Arr.isReadonlyArrayNonEmpty(defs) &&\n pipe(\n defs,\n Arr.every(({ type }) => type === CLASS_NAME),\n ),\n );\n\nconst isTypeOnlyClass =\n (context: Context, node: ESTree.ExportNamedDeclaration) =>\n (specifier: ESTree.ExportSpecifier): boolean =>\n (node.exportKind === TYPE || specifier.exportKind === TYPE) &&\n isClass(context, localName(specifier));\n\nexport const inlineExports: Rule = {\n meta: { type: \"suggestion\" },\n create: (context) => ({\n ExportNamedDeclaration: (node): void => {\n if (isList(node) && !pipe(node.specifiers, Arr.every(isTypeOnlyClass(context, node)))) {\n context.report({ node, message: MESSAGE });\n }\n },\n }),\n};\n","import { segments, toPosix } from \"@masseater.dev/path-kit\";\nimport { Array as Arr, Option, String as Str, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nconst SOURCE = \"/src/\";\nconst TOOL_LAYERS: readonly string[] = [\"features\", \"shared\"];\nconst TEST_FILE = /\\.test(?:\\.support)?\\.[cm]?[jt]sx?$/u;\nconst METHOD = \"registerTool\";\n\nconst MESSAGE =\n \"Register an MCP tool in the features slice of the operation it performs. A tool is one operation, so app/ only composes the slices' register functions and entities/ only holds the data they share.\";\n\nconst layerIn = (path: string): Option.Option<string> =>\n pipe(\n Str.lastIndexOf(SOURCE)(path),\n Option.map((index) => Arr.headNonEmpty(segments(Str.slice(index + SOURCE.length)(path)))),\n );\n\nconst layerOf = (filename: string): Option.Option<string> => layerIn(toPosix(filename));\n\nconst outsideToolLayers = (filename: string): boolean =>\n !TEST_FILE.test(filename) &&\n Option.exists(layerOf(filename), (layer) => !Arr.contains(TOOL_LAYERS, layer));\n\nexport const mcpToolLayer: Rule = {\n meta: { type: \"problem\" },\n create: (context) => {\n if (!outsideToolLayers(context.filename)) {\n return {};\n }\n return {\n CallExpression: (node): void => {\n const { callee } = node;\n if (\n callee.type === \"MemberExpression\" &&\n callee.property.type === \"Identifier\" &&\n callee.property.name === METHOD\n ) {\n context.report({ node: callee.property, message: MESSAGE });\n }\n },\n };\n },\n};\n","import { Array as Arr, Option, pipe } from \"effect\";\nimport { SymbolFlags } from \"tsrs/sync\";\nimport type { NodeHandle, Project, Symbol as TypeSymbol } from \"tsrs/sync\";\n\nexport type Origin = \"own\" | \"package\" | \"builtin\";\n\nconst origins = new WeakMap<TypeSymbol, Origin>();\nconst readonlyForms = new WeakMap<Project, Map<string, Option.Option<string>>>();\n\nconst fileOrigin = (project: Project, handle: NodeHandle): Option.Option<Origin> =>\n pipe(\n Option.fromNullishOr(project.program.getSourceFileMetadataByPath(handle.path)),\n Option.flatMap(({ isDefaultLibrary, isFromExternalLibrary }): Option.Option<Origin> => {\n if (isDefaultLibrary) {\n return Option.some(\"builtin\");\n }\n if (isFromExternalLibrary) {\n return Option.some(\"package\");\n }\n return Option.none();\n }),\n );\n\nconst declarationOrigin =\n (project: Project) =>\n (handle: NodeHandle): Origin =>\n pipe(\n fileOrigin(project, handle),\n Option.orElse(() =>\n pipe(\n Option.fromNullishOr(handle.resolve(project)),\n Option.filter((node) => node.getSourceFile().isDeclarationFile),\n Option.as<Origin>(\"package\"),\n ),\n ),\n Option.getOrElse((): Origin => \"own\"),\n );\n\nexport const originOf =\n (project: Project) =>\n (symbol: TypeSymbol): Origin =>\n origins.getOrInsertComputed(symbol, () => {\n const found = pipe(symbol.declarations, Arr.map(declarationOrigin(project)));\n if (Arr.contains(found, \"builtin\")) {\n return \"builtin\";\n }\n if (Arr.contains(found, \"package\")) {\n return \"package\";\n }\n return \"own\";\n });\n\nconst builtinNamed =\n (project: Project) =>\n (name: string): Option.Option<string> =>\n pipe(\n Option.fromNullishOr(project.checker.resolveName(name, SymbolFlags.Type)),\n Option.filter((symbol) => originOf(project)(symbol) === \"builtin\"),\n Option.as(name),\n );\n\nexport const readonlyFormOf =\n (project: Project) =>\n (name: string): Option.Option<string> =>\n readonlyForms\n .getOrInsertComputed(project, () => new Map<string, Option.Option<string>>())\n .getOrInsertComputed(name, () =>\n pipe([`Readonly${name}`, `${name}ReadOnly`], Arr.findFirst(builtinNamed(project))),\n );\n","import { Array as Arr, Option, String as Str, pipe } from \"effect\";\nimport type { Checker, Project, Symbol as TypeSymbol, Type } from \"tsrs/sync\";\n\nimport { originOf, readonlyFormOf } from \"./declared-outside.ts\";\nimport type { Origin } from \"./declared-outside.ts\";\n\nexport type Mutability =\n | { readonly kind: \"array\" }\n | { readonly kind: \"tuple\" }\n | { readonly kind: \"property\" }\n | { readonly kind: \"index\" }\n | { readonly kind: \"form\"; readonly name: string; readonly readonlyName: string };\n\nexport interface WritablePart {\n readonly path: readonly string[];\n readonly mutability: Mutability;\n}\n\ntype Found = Option.Option<WritablePart>;\n\ninterface Search {\n readonly project: Project;\n readonly partOf: (type: Type) => Found;\n}\n\nexport const ELEMENT = \"[]\";\n\nconst MUTABLE_ARRAY = \"Array\";\nconst PRIVATE_NAME = \"__#\";\nconst SYMBOL_NAME = \"__@\";\n\nconst here = (mutability: Mutability): Found => Option.some({ path: [], mutability });\n\nconst under =\n (segment: string) =>\n (part: WritablePart): WritablePart => ({ ...part, path: [segment, ...part.path] });\n\nconst firstPart = (search: Search, types: readonly Type[]): Found =>\n pipe(types, Arr.findFirst(search.partOf));\n\nconst formOf =\n (project: Project) =>\n (name: string): Found =>\n pipe(\n readonlyFormOf(project)(name),\n Option.flatMap((readonlyName) => here({ kind: \"form\", name, readonlyName })),\n );\n\nconst isOpaqueAlias = (project: Project, type: Type): boolean =>\n pipe(\n Option.fromNullishOr(type.getAliasSymbol()),\n Option.exists((alias) => {\n const origin = originOf(project)(alias);\n return (\n origin === \"package\" ||\n (origin === \"builtin\" && Arr.isReadonlyArrayEmpty(type.getAliasTypeArguments()))\n );\n }),\n );\n\nconst isNamed = (type: Type): boolean =>\n type.isClassOrInterface() || (type.isTypeReference() && type.getTarget().isClassOrInterface());\n\nconst declaredOutside = (project: Project, type: Type): Option.Option<Found> =>\n pipe(\n Option.fromNullishOr(type.getSymbol()),\n Option.flatMap((symbol): Option.Option<Found> => {\n const origin = originOf(project)(symbol);\n if (origin === \"package\") {\n return Option.some(Option.none());\n }\n if (origin === \"own\" || !isNamed(type)) {\n return Option.none();\n }\n return Option.some(formOf(project)(symbol.name));\n }),\n );\n\nconst isOutside = (project: Project, type: Type): boolean =>\n isOpaqueAlias(project, type) ||\n (type.isObjectType() && Option.exists(declaredOutside(project, type), Option.isNone));\n\nconst sourceOf = (type: Type): Option.Option<Type> => {\n if (!type.isMappedType()) {\n return Option.none();\n }\n const template = type.getTemplateType();\n if (!template.isIndexedAccessType()) {\n return Option.none();\n }\n return Option.some(template.getObjectType());\n};\n\nconst takenFromOutside =\n (project: Project) =>\n (type: Type): readonly string[] => {\n if (isOutside(project, type)) {\n return pipe(\n type.getProperties(),\n Arr.map((property) => property.name),\n );\n }\n if (type.isUnionType() || type.isIntersectionType()) {\n return pipe(type.getTypes(), Arr.flatMap(takenFromOutside(project)));\n }\n return pipe(\n sourceOf(type),\n Option.map(takenFromOutside(project)),\n Option.getOrElse((): readonly string[] => []),\n );\n };\n\nconst elementsPart = (search: Search, type: Type): Found => {\n if (!type.isTypeReference()) {\n return Option.none();\n }\n return pipe(\n firstPart(search, search.project.checker.getTypeArguments(type)),\n Option.map(under(ELEMENT)),\n );\n};\n\nconst arrayPart = (search: Search, type: Type): Found => {\n const mutable = pipe(\n Option.fromNullishOr(type.getSymbol()),\n Option.exists((symbol) => symbol.name === MUTABLE_ARRAY),\n );\n if (mutable) {\n return here({ kind: \"array\" });\n }\n return elementsPart(search, type);\n};\n\nconst tuplePart = (search: Search, type: Type): Found => {\n if (type.isTupleType() && !type.getTarget().readonly) {\n return here({ kind: \"tuple\" });\n }\n return elementsPart(search, type);\n};\n\nconst named =\n (prefix: string) =>\n (property: TypeSymbol): boolean =>\n pipe(String(property.escapedName), Str.startsWith(prefix));\n\nconst isWritable =\n (checker: Checker) =>\n (property: TypeSymbol): boolean =>\n !checker.isReadonlySymbol(property) && !named(PRIVATE_NAME)(property);\n\nconst isStringNamed = (property: TypeSymbol): boolean =>\n !named(PRIVATE_NAME)(property) && !named(SYMBOL_NAME)(property);\n\nconst declaredIn =\n (project: Project, origin: Origin) =>\n (property: TypeSymbol): boolean =>\n originOf(project)(property) === origin;\n\nconst inheritedForm =\n (project: Project) =>\n (property: TypeSymbol): Found =>\n pipe(\n Option.fromNullishOr(property.getParent()),\n Option.flatMap((owner) => formOf(project)(owner.name)),\n );\n\nconst propertyTypesPart = (search: Search, properties: readonly TypeSymbol[]): Found => {\n const judged = pipe(properties, Arr.filter(isStringNamed));\n return pipe(\n Arr.zip(judged, search.project.checker.getTypeOfSymbol(judged)),\n Arr.findFirst(([property, type]) =>\n pipe(search.partOf(type), Option.map(under(property.name))),\n ),\n );\n};\n\nconst indexPart = (search: Search, type: Type): Found =>\n pipe(\n type.getIndexInfos(),\n Arr.findFirst((info) => {\n if (!info.isReadonly) {\n return here({ kind: \"index\" });\n }\n return pipe(search.partOf(info.valueType), Option.map(under(ELEMENT)));\n }),\n );\n\nconst membersPart = (search: Search, type: Type): Found => {\n const { project } = search;\n const properties = type.getProperties();\n const taken = pipe(\n sourceOf(type),\n Option.map(takenFromOutside(project)),\n Option.getOrElse((): readonly string[] => []),\n );\n const own = pipe(\n properties,\n Arr.filter(\n (property) => declaredIn(project, \"own\")(property) && !Arr.contains(taken, property.name),\n ),\n );\n return pipe(\n own,\n Arr.findFirst(isWritable(project.checker)),\n Option.map((property): WritablePart => ({\n path: [property.name],\n mutability: { kind: \"property\" },\n })),\n Option.orElse(() =>\n pipe(\n properties,\n Arr.filter(declaredIn(project, \"builtin\")),\n Arr.findFirst(inheritedForm(project)),\n ),\n ),\n Option.orElse(() => propertyTypesPart(search, own)),\n Option.orElse(() => indexPart(search, type)),\n );\n};\n\nconst isFunction = (type: Type): boolean =>\n Arr.isReadonlyArrayNonEmpty(type.getCallSignatures()) &&\n Arr.isReadonlyArrayEmpty(type.getProperties());\n\nconst objectPart = (search: Search, type: Type): Found => {\n if (isFunction(type)) {\n return Option.none();\n }\n if (search.project.checker.isArrayType(type)) {\n return arrayPart(search, type);\n }\n if (type.isTupleType()) {\n return tuplePart(search, type);\n }\n return pipe(\n declaredOutside(search.project, type),\n Option.getOrElse(() => membersPart(search, type)),\n );\n};\n\nconst typePart = (search: Search, type: Type): Found => {\n if (isOpaqueAlias(search.project, type)) {\n return Option.none();\n }\n if (type.isUnionType() || type.isIntersectionType()) {\n return firstPart(search, type.getTypes());\n }\n if (type.isConditionalType()) {\n return firstPart(search, [type.getTrueType(), type.getFalseType()]);\n }\n if (!type.isObjectType()) {\n return Option.none();\n }\n return objectPart(search, type);\n};\n\nexport const writablePartOf =\n (project: Project) =>\n (type: Type): Option.Option<WritablePart> => {\n const seen = new Set<Type>();\n const partOf = (inner: Type): Found => {\n if (seen.has(inner)) {\n return Option.none();\n }\n seen.add(inner);\n return typePart({ project, partOf }, inner);\n };\n return partOf(type);\n };\n","import type { ParserServices, TypedContext } from \"@r_masseater/oxlint-typed-rules\";\nimport { Array as Arr, Match, Option, String as Str, pipe } from \"effect\";\nimport type { Node } from \"tsrs/ast\";\nimport { isTypeNode } from \"tsrs/ast/is\";\nimport type { Type } from \"tsrs/sync\";\nimport type { ESTree, Rule, Visitor } from \"vite-plus/lint/plugins\";\n\nimport { typedRuleOf } from \"./typed-rule.ts\";\nimport { ELEMENT, writablePartOf } from \"./writable-part.ts\";\nimport type { Mutability, WritablePart } from \"./writable-part.ts\";\n\nconst MESSAGE =\n \"A function must not be able to change its arguments, but {{part}}. Declare the parameter with a read-only type. Types declared by a package or by the language are exempt unless the language has a read-only form of them.\";\nconst MESSAGE_ID = \"shouldBeReadonly\";\nconst WHOLE = \"the type\";\nconst SEPARATOR = \".\";\nconst TAGGABLE: readonly string[] = [\"string\", \"number\", \"bigint\"];\n\ntype Annotated = ESTree.FormalParameter | ESTree.FormalParameterRest;\n\ntype FunctionLike =\n | ESTree.ArrowFunctionExpression\n | ESTree.Function\n | ESTree.TSCallSignatureDeclaration\n | ESTree.TSConstructSignatureDeclaration\n | ESTree.TSFunctionType\n | ESTree.TSMethodSignature;\n\nconst isBrandObject = (type: Type): boolean =>\n type.isObjectType() &&\n Arr.isReadonlyArrayEmpty(type.getCallSignatures()) &&\n Arr.isReadonlyArrayEmpty(type.getConstructSignatures());\n\nconst isTaggable = (type: Type): boolean =>\n type.isLiteralType() ||\n type.isTemplateLiteralType() ||\n (type.isIntrinsicType() && Arr.contains(TAGGABLE, type.intrinsicName));\n\nconst isBrandedLiteral = (type: Type): boolean => {\n if (!type.isIntersectionType()) {\n return false;\n }\n const parts = type.getTypes();\n const objects = pipe(parts, Arr.filter(isBrandObject));\n const primitives = pipe(parts, Arr.filter(isTaggable));\n return (\n Arr.isReadonlyArrayNonEmpty(objects) &&\n Arr.isReadonlyArrayNonEmpty(primitives) &&\n objects.length + primitives.length === parts.length\n );\n};\n\nconst isBrandedLiteralLike = (type: Type): boolean => {\n if (type.isUnionType()) {\n return pipe(type.getTypes(), Arr.every(isBrandedLiteral));\n }\n return isBrandedLiteral(type);\n};\n\nconst outermost = (node: Node): Node =>\n pipe(\n Option.fromNullishOr(node.parent),\n Option.filter((parent) => parent.getStart() === node.getStart() && parent.end === node.end),\n Option.match({ onNone: () => node, onSome: outermost }),\n );\n\nconst unwrapped = (parameter: ESTree.ParamPattern): Annotated => {\n if (parameter.type === \"TSParameterProperty\") {\n return parameter.parameter;\n }\n return parameter;\n};\n\nconst annotationOf = (parameter: Annotated): Option.Option<ESTree.TSTypeAnnotation> => {\n if (parameter.type === \"AssignmentPattern\") {\n return Option.fromNullishOr(parameter.left.typeAnnotation);\n }\n return Option.fromNullishOr(parameter.typeAnnotation);\n};\n\nconst annotatedType = (services: ParserServices, parameter: Annotated): Option.Option<Type> =>\n pipe(\n annotationOf(parameter),\n Option.map((annotation) =>\n outermost(services.esTreeNodeToTSNodeMap.get(annotation.typeAnnotation)),\n ),\n Option.filter(isTypeNode),\n Option.map((node) => services.program.native.checker.getTypeFromTypeNode(node)),\n );\n\nconst subjectOf = (path: readonly string[]): string => {\n if (Arr.isReadonlyArrayEmpty(path)) {\n return WHOLE;\n }\n return `\\`${pipe(Arr.join(path, SEPARATOR), Str.replaceAll(`${SEPARATOR}${ELEMENT}`, ELEMENT))}\\``;\n};\n\nconst predicateOf = Match.type<Mutability>().pipe(\n Match.discriminatorsExhaustive(\"kind\")({\n array: () => \"is a mutable array\",\n tuple: () => \"is a mutable tuple\",\n property: () => \"is writable\",\n index: () => \"has a writable index signature\",\n form: ({ name, readonlyName }) =>\n `is a \\`${name}\\`, which has the read-only form \\`${readonlyName}\\``,\n }),\n);\n\nconst describe = ({ path, mutability }: WritablePart): string =>\n `${subjectOf(path)} ${predicateOf(mutability)}`;\n\nconst visitorOf = (context: TypedContext, services: ParserServices): Visitor => {\n const partOf = writablePartOf(services.program.native);\n const check = ({ params }: FunctionLike): void => {\n for (const parameter of pipe(params, Arr.map(unwrapped))) {\n const part = pipe(\n annotatedType(services, parameter),\n Option.filter((type) => !isBrandedLiteralLike(type)),\n Option.flatMap(partOf),\n );\n if (Option.isSome(part)) {\n context.report({\n node: parameter,\n messageId: MESSAGE_ID,\n data: { part: describe(part.value) },\n });\n }\n }\n };\n return {\n ArrowFunctionExpression: check,\n FunctionDeclaration: check,\n FunctionExpression: check,\n TSCallSignatureDeclaration: check,\n TSConstructSignatureDeclaration: check,\n TSDeclareFunction: check,\n TSEmptyBodyFunctionExpression: check,\n TSFunctionType: check,\n TSMethodSignature: check,\n };\n};\n\nexport const readonlyParameters: Rule = typedRuleOf({\n meta: { type: \"suggestion\", messages: { [MESSAGE_ID]: MESSAGE } },\n visitorOf,\n});\n","import { Array as Arr, Option, Schema, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nconst MESSAGE =\n \"Select min and max in separate queries. SQLite uses an index for a lone min or max only, so one select with both reads every row in the range, and D1 bills each row read.\";\n\nconst AGGREGATES = [\"min\", \"max\"] as const;\n\ntype Aggregate = (typeof AGGREGATES)[number];\n\nconst AggregateCallSchema = Schema.Struct({\n type: Schema.Literal(\"CallExpression\"),\n callee: Schema.Struct({\n type: Schema.Literal(\"Identifier\"),\n name: Schema.Literals(AGGREGATES),\n }),\n});\n\nconst PropertySchema = Schema.Struct({\n type: Schema.Literal(\"Property\"),\n value: Schema.Unknown,\n});\n\nconst SelectMemberSchema = Schema.Struct({\n type: Schema.Literal(\"MemberExpression\"),\n computed: Schema.Literal(false),\n property: Schema.Struct({\n type: Schema.Literal(\"Identifier\"),\n name: Schema.Literal(\"select\"),\n }),\n});\n\nconst decodeSelect = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"CallExpression\"),\n callee: SelectMemberSchema,\n arguments: Schema.Array(Schema.Unknown),\n }),\n);\n\nconst decodeFields = Schema.decodeUnknownOption(\n Schema.Struct({\n type: Schema.Literal(\"ObjectExpression\"),\n properties: Schema.Array(Schema.Unknown),\n }),\n);\n\nconst decodeProperty = Schema.decodeUnknownOption(PropertySchema);\nconst decodeAggregate = Schema.decodeUnknownOption(AggregateCallSchema);\n\nconst aggregateNameOf = (field: unknown): Option.Option<Aggregate> =>\n pipe(\n decodeProperty(field),\n Option.flatMap((property) => decodeAggregate(property.value)),\n Option.map((call) => call.callee.name),\n );\n\nconst aggregatesOf = (fields: readonly unknown[]): readonly Aggregate[] =>\n pipe(fields, Arr.map(aggregateNameOf), Arr.getSomes);\n\nconst selectsBoth = (node: unknown): boolean =>\n pipe(\n decodeSelect(node),\n Option.flatMap((call) => Arr.head(call.arguments)),\n Option.flatMap(decodeFields),\n Option.map((fields) => aggregatesOf(fields.properties)),\n Option.exists((found) => Arr.contains(found, \"min\") && Arr.contains(found, \"max\")),\n );\n\nexport const separateMinMax: Rule = {\n meta: { type: \"problem\" },\n create: (context) => ({\n CallExpression: (node): void => {\n if (selectsBoth(node)) {\n context.report({ node, message: MESSAGE });\n }\n },\n }),\n};\n","import { Array as Arr, Option, Predicate, Schema, String as Str, pipe } from \"effect\";\nimport type { Context, ESTree } from \"vite-plus/lint/plugins\";\n\nexport const SAY = \"say\";\nexport const CUTS = \"cuts\";\n\nexport type Property = ESTree.ObjectProperty;\nexport type StringLiteral = ESTree.StringLiteral;\nexport type ObjectExpression = ESTree.ObjectExpression;\nexport type Range = [number, number];\n\nconst START = 0;\nconst END = 1;\nconst NEXT = 1;\n\nexport const keyOf = (property: ObjectExpression[\"properties\"][number]): Option.Option<string> => {\n if (property.type !== \"Property\" || property.computed) {\n return Option.none();\n }\n if (property.key.type === \"Identifier\") {\n return Option.some(property.key.name);\n }\n if (property.key.type === \"Literal\" && Predicate.isString(property.key.value)) {\n return Option.some(property.key.value);\n }\n return Option.none();\n};\n\nexport const propertyOf =\n (key: string) =>\n (object: ObjectExpression): Option.Option<Property> =>\n Arr.findFirst(\n object.properties,\n (property): property is Property =>\n property.type === \"Property\" && Option.contains(keyOf(property), key),\n );\n\nexport const propertiesOf = (object: ObjectExpression): readonly Property[] =>\n pipe(\n object.properties,\n Arr.filter((property): property is Property => property.type === \"Property\"),\n );\n\nexport const isStringLiteral = (node: unknown): node is StringLiteral =>\n Predicate.hasProperty(node, \"type\") &&\n node[\"type\"] === \"Literal\" &&\n Predicate.hasProperty(node, \"value\") &&\n Predicate.isString(node[\"value\"]);\n\nconst unwrapped = (node: ESTree.Node): ESTree.Node => {\n if (\n node.type === \"TSAsExpression\" ||\n node.type === \"TSSatisfiesExpression\" ||\n node.type === \"TSNonNullExpression\"\n ) {\n return unwrapped(node.expression);\n }\n return node;\n};\n\nexport const asObject = (node: ESTree.Node): Option.Option<ObjectExpression> =>\n Option.liftPredicate(\n unwrapped(node),\n (value): value is ObjectExpression => value.type === \"ObjectExpression\",\n );\n\nexport const asArray = (node: ESTree.Node): Option.Option<ESTree.ArrayExpression> =>\n Option.liftPredicate(\n unwrapped(node),\n (value): value is ESTree.ArrayExpression => value.type === \"ArrayExpression\",\n );\n\nexport const stringsOf = (node: ESTree.Node): readonly StringLiteral[] =>\n pipe(\n asArray(node),\n Option.map(({ elements }) => pipe(elements, Arr.filter(isStringLiteral))),\n Option.getOrElse(() => []),\n );\n\nexport const saidOf = (property: Property): readonly StringLiteral[] => {\n if (!Option.contains(keyOf(property), SAY)) {\n return [];\n }\n return stringsOf(property.value);\n};\n\nexport const quotedOf = (text: string): string =>\n pipe(\n text,\n Str.replaceAll(\"\\\\\", String.raw`\\\\`),\n Str.replaceAll('\"', String.raw`\\\"`),\n Str.replaceAll(\"\\n\", String.raw`\\n`),\n (escaped) => `\"${escaped}\"`,\n );\n\nexport const removedRange = ({\n object,\n property,\n}: Readonly<{ object: ObjectExpression; property: Property }>): Range => {\n const index = object.properties.indexOf(property);\n const next = Arr.get(object.properties, index + NEXT);\n if (Option.isSome(next)) {\n return [property.range[START], next.value.range[START]];\n }\n return pipe(\n Arr.get(object.properties, index - NEXT),\n Option.map((previous): Range => [previous.range[END], property.range[END]]),\n Option.getOrElse((): Range => [property.range[START], property.range[END]]),\n );\n};\n\ntype TopLevel = ESTree.Program[\"body\"][number];\n\nconst declaratorsOf = (statement: TopLevel): readonly ESTree.VariableDeclarator[] => {\n if (statement.type === \"VariableDeclaration\") {\n return statement.declarations;\n }\n if (statement.type === \"ExportNamedDeclaration\") {\n return pipe(\n Option.fromNullishOr(statement.declaration),\n Option.filter(\n (declaration): declaration is ESTree.VariableDeclaration =>\n declaration.type === \"VariableDeclaration\",\n ),\n Option.map(({ declarations }) => declarations),\n Option.getOrElse(() => []),\n );\n }\n return [];\n};\n\nconst declaredArray = (context: Context, name: string): Option.Option<ESTree.ArrayExpression> =>\n pipe(\n context.sourceCode.ast.body,\n Arr.flatMap(declaratorsOf),\n Arr.findFirst(({ id }) => id.type === \"Identifier\" && id.name === name),\n Option.flatMap(({ init }) => Option.fromNullishOr(init)),\n Option.flatMap(asArray),\n );\n\nconst objectsOf = ({ elements }: ESTree.ArrayExpression): readonly ObjectExpression[] =>\n pipe(\n elements,\n Arr.filter(Predicate.isNotNull),\n Arr.flatMap((element) => Option.toArray(asObject(element))),\n );\n\nconst cutArrayOf =\n (context: Context) =>\n ({ value }: Property): Option.Option<ESTree.ArrayExpression> => {\n if (value.type === \"Identifier\") {\n return declaredArray(context, value.name);\n }\n return asArray(value);\n };\n\nexport const cutsOf = ({\n context,\n script,\n}: Readonly<{ context: Context; script: ObjectExpression }>): readonly ObjectExpression[] =>\n pipe(\n propertyOf(CUTS)(script),\n Option.flatMap(cutArrayOf(context)),\n Option.map(objectsOf),\n Option.getOrElse(() => []),\n );\n\nexport const Texts = Schema.Record(Schema.String, Schema.String);\n\nexport const optionsWith =\n <Value>({ schema, fallback }: Readonly<{ schema: Schema.Decoder<Value>; fallback: Value }>) =>\n (options: readonly unknown[]): Value =>\n pipe(\n Arr.head(options),\n Option.flatMap(Schema.decodeUnknownOption(schema)),\n Option.getOrElse(() => fallback),\n );\n","import { Array as Arr, Option, String as Str, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nimport type { ObjectExpression, StringLiteral } from \"./video-script-ast.ts\";\nimport { asObject, keyOf, propertiesOf, saidOf } from \"./video-script-ast.ts\";\n\nconst UNREAD = \"unread\";\nconst MESSAGES = {\n [UNREAD]:\n \"英字の語「{{word}}」の読みが readings にない。VOICEVOX は英字を1文字ずつ読むことがある\",\n} as const;\n\nconst READINGS = \"readings\";\nconst RUBY = /\\{[^}]*\\}/gu;\nconst WORD = /[A-Za-z][A-Za-z0-9+#.-]*/gu;\n\nconst isRead =\n (keys: readonly string[]) =>\n (word: string): boolean =>\n pipe(\n keys,\n Arr.some((key) => Str.includes(key)(word) || Str.includes(word)(key)),\n );\n\nconst wordsOf = (say: string): readonly string[] =>\n pipe(\n Str.replaceAll(RUBY, Str.empty)(say),\n Str.matchAll(WORD),\n Arr.fromIterable,\n Arr.map(([word]) => word),\n Arr.dedupe,\n );\n\nconst keysOf = ({ properties }: ObjectExpression): readonly string[] =>\n pipe(\n properties,\n Arr.flatMap((property) => Option.toArray(keyOf(property))),\n );\n\nexport const videoReadings: Rule = {\n meta: { type: \"problem\", messages: MESSAGES },\n create: (context) => {\n const keys: string[] = [];\n const said: StringLiteral[] = [];\n return {\n ObjectExpression: (object): void => {\n for (const node of propertiesOf(object)) {\n said.push(...saidOf(node));\n if (Option.contains(keyOf(node), READINGS)) {\n keys.push(...pipe(asObject(node.value), Option.toArray, Arr.flatMap(keysOf)));\n }\n }\n },\n \"Program:exit\": (): void => {\n for (const literal of said) {\n for (const word of pipe(\n wordsOf(literal.value),\n Arr.filter((candidate) => !isRead(keys)(candidate)),\n )) {\n context.report({ node: literal, messageId: UNREAD, data: { word } });\n }\n }\n },\n };\n },\n};\n","import { Array as Arr, Record as Rec, Schema, String as Str, pipe } from \"effect\";\nimport type { Rule } from \"vite-plus/lint/plugins\";\n\nimport type { StringLiteral } from \"./video-script-ast.ts\";\nimport { Texts, optionsWith, propertiesOf, quotedOf, saidOf } from \"./video-script-ast.ts\";\n\nconst FIX = \"fix\";\nconst BANNED = \"banned\";\nconst EMPHASIS = \"emphasis\";\n\nconst MESSAGES = {\n [FIX]:\n \"「{{say}}」は日本語と英数字の間に空白があるか、決まった言葉を言い換えている。「{{fixed}}」と書く\",\n [BANNED]: \"「{{say}}」に「{{word}}」がある。{{instead}}\",\n [EMPHASIS]: \"「{{say}}」の太字(**)が{{count}}か所ある。{{max}}か所までにする\",\n} as const;\n\nconst JAPANESE = String.raw`[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}ー々、。!?」』)]`;\nconst LATIN = \"[A-Za-z0-9]\";\nconst SPACE = \"[ ]+\";\nconst AFTER_JAPANESE = new RegExp(`(?<head>${JAPANESE}[*}]*)${SPACE}(?<tail>[*{]*${LATIN})`, \"gu\");\nconst BEFORE_JAPANESE = new RegExp(`(?<head>${LATIN}[*}]*)${SPACE}(?<tail>[*{]*${JAPANESE})`, \"gu\");\nconst KEPT = \"$<head>$<tail>\";\nconst OUTSIDE_RUBY = String.raw`(?![^{]*\\})`;\nconst EMPHASIZED = /\\*\\*[^*]+\\*\\*/gu;\nconst SPECIAL = /[.*+?^${}()|[\\]\\\\]/gu;\nconst ESCAPED = String.raw`\\$&`;\nconst DEFAULT_MAX = 1;\n\nconst OptionsSchema = Schema.Struct({\n terms: Schema.optional(Texts),\n banned: Schema.optional(Texts),\n maxEmphasis: Schema.optional(Schema.Finite),\n});\n\nconst optionsOf = optionsWith({ schema: OptionsSchema, fallback: {} });\n\nconst unspacedOf = (say: string): string =>\n pipe(say, Str.replaceAll(AFTER_JAPANESE, KEPT), Str.replaceAll(BEFORE_JAPANESE, KEPT));\n\nconst outsideRuby = (word: string): RegExp =>\n new RegExp(`${Str.replaceAll(SPECIAL, ESCAPED)(word)}${OUTSIDE_RUBY}`, \"gu\");\n\nconst termedOf =\n (terms: Readonly<Record<string, string>>) =>\n (say: string): string =>\n Arr.reduce(Rec.toEntries(terms), say, (text, [vague, precise]) =>\n Str.replaceAll(outsideRuby(vague), precise)(text),\n );\n\nconst emphasisCount = (say: string): number =>\n Arr.fromIterable(Str.matchAll(EMPHASIZED)(say)).length;\n\nexport const videoSay: Rule = {\n meta: {\n type: \"suggestion\",\n fixable: \"code\",\n messages: MESSAGES,\n schema: [{ type: \"object\", additionalProperties: true }],\n },\n create: (context) => {\n const { terms = {}, banned = {}, maxEmphasis = DEFAULT_MAX } = optionsOf(context.options);\n const check = (literal: StringLiteral): void => {\n const say = literal.value;\n const fixed = termedOf(terms)(unspacedOf(say));\n if (fixed !== say) {\n context.report({\n node: literal,\n messageId: FIX,\n data: { say, fixed },\n fix: (fixer) => fixer.replaceText(literal, quotedOf(fixed)),\n });\n }\n for (const [word, instead] of Rec.toEntries(banned)) {\n if (Str.includes(word)(say)) {\n context.report({ node: literal, messageId: BANNED, data: { say, word, instead } });\n }\n }\n const count = emphasisCount(say);\n if (count > maxEmphasis) {\n context.report({\n node: literal,\n messageId: EMPHASIS,\n data: { say, count: String(count), max: String(maxEmphasis) },\n });\n }\n };\n return {\n ObjectExpression: (node): void => {\n for (const literal of pipe(propertiesOf(node), Arr.flatMap(saidOf))) {\n check(literal);\n }\n },\n };\n },\n};\n","import { Array as Arr, Option, Record as Rec, pipe } from \"effect\";\nimport type { Context, ESTree } from \"vite-plus/lint/plugins\";\n\nimport type { ObjectExpression, Property } from \"./video-script-ast.ts\";\nimport { asObject, propertyOf } from \"./video-script-ast.ts\";\n\nconst START = 0;\nconst NEXT = 1;\n\nexport interface ValuesCheck {\n readonly context: Context;\n readonly object: ObjectExpression;\n readonly values: Readonly<Record<string, string>>;\n readonly name: string;\n readonly before: Option.Option<ESTree.Node>;\n}\n\nexport const textOf =\n (context: Context) =>\n (node: ESTree.Node): string =>\n context.sourceCode.getText(node);\n\nconst valueTarget = (property: Property): ESTree.Node =>\n pipe(\n asObject(property.value),\n Option.flatMap(({ properties }) =>\n Arr.findFirst(\n properties,\n (part): part is ESTree.SpreadElement => part.type === \"SpreadElement\",\n ),\n ),\n Option.match({ onNone: () => property.value, onSome: ({ argument }) => argument }),\n );\n\nconst reportMissing = (\n { context, object, before }: ValuesCheck,\n {\n key,\n expected,\n data,\n }: Readonly<{ key: string; expected: string; data: Readonly<Record<string, string>> }>,\n): void => {\n context.report({\n node: object,\n messageId: \"value\",\n data,\n fix: (fixer) =>\n Option.match(before, {\n onNone: () =>\n fixer.insertTextAfterRange(\n [object.range[START], object.range[START] + NEXT],\n ` ${key}: ${expected},`,\n ),\n onSome: (node) => fixer.insertTextBefore(node, `${key}: ${expected},\\n `),\n }),\n });\n};\n\nconst checkValue =\n (check: ValuesCheck) =>\n ([key, expected]: readonly [string, string]): void => {\n const { context, object, name } = check;\n const data = { series: name, key, expected };\n const property = propertyOf(key)(object);\n if (Option.isNone(property)) {\n reportMissing(check, { key, expected, data });\n return;\n }\n const target = valueTarget(property.value);\n if (textOf(context)(target) !== expected) {\n context.report({\n node: target,\n messageId: \"value\",\n data,\n fix: (fixer) => fixer.replaceText(target, expected),\n });\n }\n };\n\nexport const checkValues = (check: ValuesCheck): void => {\n for (const entry of Rec.toEntries(check.values)) {\n checkValue(check)(entry);\n }\n};\n","import { Array as Arr, Option, String as Str, pipe } from \"effect\";\nimport type { Context } from \"vite-plus/lint/plugins\";\n\nimport type { VideoIntro } from \"#/shared/config/index.ts\";\n\nimport type { ObjectExpression, StringLiteral } from \"./video-script-ast.ts\";\nimport {\n SAY,\n cutsOf,\n isStringLiteral,\n propertyOf,\n quotedOf,\n removedRange,\n stringsOf,\n} from \"./video-script-ast.ts\";\nimport { checkValues } from \"./video-values.ts\";\n\nexport type IntroRule = VideoIntro;\n\nexport interface IntroCheck {\n readonly context: Context;\n readonly script: ObjectExpression;\n readonly name: string;\n readonly rule: IntroRule;\n}\n\nconst ID = \"id\";\nconst AT = \"at\";\nconst INTRO = \"intro\";\nconst PART = \"|\";\nconst NEXT = 1;\n\nconst isIntro = (cut: ObjectExpression): boolean =>\n pipe(\n propertyOf(ID)(cut),\n Option.exists(({ value }) => isStringLiteral(value) && value.value === INTRO),\n );\n\nconst partedLines = (cut: ObjectExpression): readonly StringLiteral[] =>\n pipe(\n propertyOf(SAY)(cut),\n Option.map(({ value }) => stringsOf(value)),\n Option.getOrElse((): readonly StringLiteral[] => []),\n Arr.filter(({ value }) => Str.includes(PART)(value)),\n );\n\nconst checkBeats = ({ context, name }: IntroCheck, cut: ObjectExpression): void => {\n if (Option.isNone(propertyOf(AT)(cut)) || Arr.isReadonlyArrayEmpty(partedLines(cut))) {\n context.report({ node: cut, messageId: \"beats\", data: { series: name } });\n }\n};\n\nconst checkPlain = ({ context, name }: IntroCheck, cut: ObjectExpression): void => {\n const data = { series: name };\n for (const property of Option.toArray(propertyOf(AT)(cut))) {\n context.report({\n node: property,\n messageId: \"plainBeats\",\n data,\n fix: (fixer) => fixer.removeRange(removedRange({ object: cut, property })),\n });\n }\n for (const line of partedLines(cut)) {\n context.report({\n node: line,\n messageId: \"plainParts\",\n data,\n fix: (fixer) =>\n fixer.replaceText(line, quotedOf(Str.replaceAll(PART, Str.empty)(line.value))),\n });\n }\n};\n\nexport const checkIntro = (check: IntroCheck): void => {\n const { context, script, name, rule } = check;\n const intro = Arr.findFirst(cutsOf({ context, script }), isIntro);\n if (Option.isNone(intro)) {\n context.report({ node: script, messageId: \"noIntro\", data: { series: name } });\n return;\n }\n if (rule === \"beats\") {\n checkBeats(check, intro.value);\n return;\n }\n checkPlain(check, intro.value);\n};\n\nexport interface AfterIntroCheck {\n readonly context: Context;\n readonly script: ObjectExpression;\n readonly name: string;\n readonly values: Readonly<Record<string, string>>;\n}\n\nexport const checkIntroValues = ({ context, script, name, values }: AfterIntroCheck): void => {\n for (const cut of Option.toArray(Arr.findFirst(cutsOf({ context, script }), isIntro))) {\n checkValues({ context, object: cut, values, name, before: Option.none() });\n }\n};\n\nexport const checkAfterIntro = ({ context, script, name, values }: AfterIntroCheck): void => {\n const cuts = cutsOf({ context, script });\n const next = pipe(\n Arr.findFirstIndex(cuts, isIntro),\n Option.flatMap((index) => Arr.get(cuts, index + NEXT)),\n );\n for (const cut of Option.toArray(next)) {\n checkValues({ context, object: cut, values, name, before: Option.none() });\n }\n};\n","import { Array as Arr, Option, Record as Rec, Schema, pipe } from \"effect\";\nimport type { Context, ESTree, Rule } from \"vite-plus/lint/plugins\";\n\nimport { VIDEO_INTROS } from \"#/shared/config/index.ts\";\n\nimport { checkAfterIntro, checkIntro, checkIntroValues } from \"./video-intro.ts\";\nimport type { ObjectExpression } from \"./video-script-ast.ts\";\nimport {\n CUTS,\n Texts,\n cutsOf,\n isStringLiteral,\n keyOf,\n optionsWith,\n propertiesOf,\n propertyOf,\n removedRange,\n} from \"./video-script-ast.ts\";\nimport { checkValues, textOf } from \"./video-values.ts\";\n\nconst MESSAGES = {\n unknown: \"series「{{series}}」の決まりがない。{{known}} のどれかにする\",\n value: \"{{series}} の {{key}} は {{expected}} にする\",\n banned: \"{{key}} を使わない。{{reason}}\",\n voice: \"{{series}} に出ない話者 {{voice}} が話している\",\n opener: \"{{series}} の最初の台詞は {{voice}} が言う\",\n closer: \"{{series}} の最後の台詞は {{voice}} が言う\",\n noIntro: \"{{series}} は最初のカットを intro にする\",\n plainBeats: \"{{series}} のイントロは音ハメしない。at を外す\",\n plainParts: \"{{series}} のイントロは句に分けず、1つの台詞で読む\",\n beats: \"{{series}} のイントロは「|」で句に分け、at で各句の頭を拍に置く\",\n} as const;\n\nconst SERIES = \"series\";\nconst VOICE = \"voice\";\n\nconst SeriesSchema = Schema.Struct({\n values: Schema.optional(Texts),\n voices: Schema.String.pipe(Schema.Array, Schema.optional),\n opener: Schema.optional(Schema.String),\n closer: Schema.optional(Schema.String),\n intro: Schema.optional(Schema.Literals(VIDEO_INTROS)),\n introValues: Schema.optional(Texts),\n afterIntro: Schema.optional(Texts),\n});\n\ntype Series = typeof SeriesSchema.Type;\n\nconst OptionsSchema = Schema.Struct({\n series: Schema.Record(Schema.String, SeriesSchema),\n banned: Schema.optional(Texts),\n});\n\ntype Options = typeof OptionsSchema.Type;\n\nconst optionsOf = optionsWith({ schema: OptionsSchema, fallback: { series: {} } });\n\ninterface Check {\n readonly context: Context;\n readonly script: ObjectExpression;\n readonly name: string;\n readonly series: Series;\n}\n\nconst voiceOf = (context: Context, object: ObjectExpression): Option.Option<string> =>\n Option.map(propertyOf(VOICE)(object), ({ value }) => textOf(context)(value));\n\nconst speakerOf =\n ({ context, script }: Check) =>\n (cut: ObjectExpression): Option.Option<string> =>\n Option.orElse(voiceOf(context, cut), () => voiceOf(context, script));\n\nconst checkCast = (check: Check, cuts: readonly ObjectExpression[]): void => {\n const { context, name, series } = check;\n const voices = series.voices ?? [];\n if (Arr.isReadonlyArrayEmpty(voices)) {\n return;\n }\n for (const cut of cuts) {\n for (const voice of Option.toArray(speakerOf(check)(cut))) {\n if (!voices.includes(voice)) {\n context.report({ node: cut, messageId: \"voice\", data: { series: name, voice } });\n }\n }\n }\n};\n\nconst checkEnds = (check: Check, cuts: readonly ObjectExpression[]): void => {\n const { context, name, series } = check;\n const ends = [\n [\"opener\", series.opener, Arr.head(cuts)],\n [\"closer\", series.closer, Arr.last(cuts)],\n ] as const;\n for (const [messageId, voice, cut] of ends) {\n for (const [expected, end] of Option.toArray(Option.all([Option.fromNullishOr(voice), cut]))) {\n if (!Option.contains(speakerOf(check)(end), expected)) {\n context.report({ node: end, messageId, data: { series: name, voice: expected } });\n }\n }\n }\n};\n\nconst checkVoices = (check: Check): void => {\n const cuts = cutsOf({ context: check.context, script: check.script });\n checkCast(check, cuts);\n checkEnds(check, cuts);\n};\n\nconst checkBanned = (\n context: Context,\n {\n object,\n banned,\n }: Readonly<{ object: ObjectExpression; banned: Readonly<Record<string, string>> }>,\n): void => {\n for (const property of propertiesOf(object)) {\n for (const reason of Option.toArray(\n Option.flatMap(keyOf(property), (key) => Rec.get(banned, key)),\n )) {\n context.report({\n node: property,\n messageId: \"banned\",\n data: { key: textOf(context)(property.key), reason },\n fix: (fixer) => fixer.removeRange(removedRange({ object, property })),\n });\n }\n }\n};\n\nconst seriesNameOf = (script: ObjectExpression): Option.Option<ESTree.StringLiteral> =>\n pipe(\n propertyOf(SERIES)(script),\n Option.map(({ value }) => value),\n Option.filter(isStringLiteral),\n );\n\nconst checkSeries = (check: Check): void => {\n const { context, script, name, series } = check;\n checkValues({\n context,\n object: script,\n values: series.values ?? {},\n name,\n before: propertyOf(CUTS)(script),\n });\n checkIntroValues({ context, script, name, values: series.introValues ?? {} });\n checkAfterIntro({ context, script, name, values: series.afterIntro ?? {} });\n checkVoices(check);\n for (const rule of Option.toArray(Option.fromNullishOr(check.series.intro))) {\n checkIntro({ context: check.context, script: check.script, name: check.name, rule });\n }\n};\n\nconst checkScript = (\n context: Context,\n { script, options }: Readonly<{ script: ObjectExpression; options: Options }>,\n): void => {\n for (const literal of Option.toArray(seriesNameOf(script))) {\n const name = literal.value;\n const series = Rec.get(options.series, name);\n if (Option.isNone(series)) {\n context.report({\n node: literal,\n messageId: \"unknown\",\n data: { series: name, known: Arr.join(Rec.keys(options.series), \", \") },\n });\n return;\n }\n checkSeries({ context, script, name, series: series.value });\n }\n};\n\nexport const videoSeries: Rule = {\n meta: {\n type: \"problem\",\n fixable: \"code\",\n messages: MESSAGES,\n schema: [{ type: \"object\", additionalProperties: true }],\n },\n create: (context) => {\n const options = optionsOf(context.options);\n return {\n ObjectExpression: (object): void => {\n checkBanned(context, { object, banned: options.banned ?? {} });\n if (Option.isSome(propertyOf(CUTS)(object))) {\n checkScript(context, { script: object, options });\n }\n },\n };\n },\n};\n","import type { Rule } from \"vite-plus/lint/plugins\";\n\nimport { videoReadings } from \"./video-readings.ts\";\nimport { videoSay } from \"./video-say.ts\";\nimport { videoSeries } from \"./video-series.ts\";\n\nexport const VIDEO_RULES: Readonly<Record<string, Rule>> = {\n \"video-readings\": videoReadings,\n \"video-say\": videoSay,\n \"video-series\": videoSeries,\n};\n","import type { Rule } from \"vite-plus/lint/plugins\";\n\nimport { arrayFromAsync } from \"./array-from-async.ts\";\nimport { ecosystemReaders } from \"./ecosystem-readers.ts\";\nimport { explicitImportPath } from \"./explicit-import-path.ts\";\nimport { getOrInsert } from \"./get-or-insert.ts\";\nimport { inlineExports } from \"./inline-exports.ts\";\nimport { mcpToolLayer } from \"./mcp-tool-layer.ts\";\nimport { readonlyParameters } from \"./readonly-parameters.ts\";\nimport { separateMinMax } from \"./separate-min-max.ts\";\nimport { VIDEO_RULES } from \"./video-rules.ts\";\n\nexport const CODED_RULES: Readonly<Record<string, Rule>> = {\n \"array-from-async\": arrayFromAsync,\n \"ecosystem-readers\": ecosystemReaders,\n \"explicit-import-path\": explicitImportPath,\n \"get-or-insert\": getOrInsert,\n \"inline-exports\": inlineExports,\n \"mcp-tool-layer\": mcpToolLayer,\n \"readonly-parameters\": readonlyParameters,\n \"separate-min-max\": separateMinMax,\n ...VIDEO_RULES,\n};\n","import { toPosix } from \"@masseater.dev/path-kit\";\nimport { Array as Arr, Option, String as Str, pipe } from \"effect\";\nimport type { Context, ESTree, Rule } from \"vite-plus/lint/plugins\";\n\nconst NAMESPACE = \"*\";\nconst DEFAULT = \"default\";\n\nexport interface ImportBan {\n readonly module: string;\n readonly names: Option.Option<readonly string[]>;\n readonly typesAllowed: boolean;\n}\n\nexport interface MemberBan {\n readonly object: string;\n readonly properties: readonly string[];\n}\n\nexport interface Intent {\n readonly message: string;\n readonly home: Option.Option<string>;\n readonly imports: readonly ImportBan[];\n readonly members: readonly MemberBan[];\n}\n\nconst importedName = (specifier: ESTree.ImportDeclarationSpecifier): string => {\n if (specifier.type === \"ImportDefaultSpecifier\") {\n return DEFAULT;\n }\n if (specifier.type === \"ImportNamespaceSpecifier\") {\n return NAMESPACE;\n }\n if (specifier.imported.type === \"Identifier\") {\n return specifier.imported.name;\n }\n return specifier.imported.value;\n};\n\nconst isTypeOnly = (\n node: ESTree.ImportDeclaration,\n specifier: ESTree.ImportDeclarationSpecifier,\n): boolean =>\n node.importKind === \"type\" ||\n (specifier.type === \"ImportSpecifier\" && specifier.importKind === \"type\");\n\nconst isBannedSpecifier =\n (node: ESTree.ImportDeclaration, ban: ImportBan, names: readonly string[]) =>\n (specifier: ESTree.ImportDeclarationSpecifier): boolean =>\n !(ban.typesAllowed && isTypeOnly(node, specifier)) &&\n Arr.contains([NAMESPACE, ...names], importedName(specifier));\n\nconst wholeImport = (node: ESTree.ImportDeclaration, ban: ImportBan): readonly ESTree.Node[] => {\n if (ban.typesAllowed && node.importKind === \"type\") {\n return [];\n }\n return [node];\n};\n\nconst bannedIn =\n (node: ESTree.ImportDeclaration) =>\n (ban: ImportBan): readonly ESTree.Node[] => {\n if (node.source.value !== ban.module) {\n return [];\n }\n return Option.match(ban.names, {\n onNone: () => wholeImport(node, ban),\n onSome: (names): readonly ESTree.Node[] =>\n pipe(node.specifiers, Arr.filter(isBannedSpecifier(node, ban, names))),\n });\n };\n\nconst propertyOf = (node: ESTree.MemberExpression): Option.Option<string> => {\n if (!node.computed && node.property.type === \"Identifier\") {\n return Option.some(node.property.name);\n }\n if (node.property.type === \"Literal\" && typeof node.property.value === \"string\") {\n return Option.some(node.property.value);\n }\n return Option.none();\n};\n\nconst isBannedMember =\n (node: ESTree.MemberExpression) =>\n (ban: MemberBan): boolean =>\n node.object.type === \"Identifier\" &&\n node.object.name === ban.object &&\n pipe(\n propertyOf(node),\n Option.exists((property) => Arr.contains(ban.properties, property)),\n );\n\nconst reportImports = (context: Context, intent: Intent, node: ESTree.ImportDeclaration): void => {\n const banned = pipe(intent.imports, Arr.flatMap(bannedIn(node)));\n for (const found of banned) {\n context.report({ node: found, message: intent.message });\n }\n};\n\nconst isHome = (intent: Intent, filename: string): boolean =>\n Option.exists(intent.home, (home) => Str.endsWith(home)(toPosix(filename)));\n\nexport const ruleOf = (intent: Intent): Rule => ({\n meta: { type: \"problem\" },\n create: (context) => {\n if (isHome(intent, context.filename)) {\n return {};\n }\n return {\n ImportDeclaration: (node): void => {\n reportImports(context, intent, node);\n },\n MemberExpression: (node): void => {\n if (pipe(intent.members, Arr.some(isBannedMember(node)))) {\n context.report({ node, message: intent.message });\n }\n },\n };\n },\n});\n","import { Option } from \"effect\";\n\nimport type { Intent } from \"./intent-rule.ts\";\n\nconst RUN_MESSAGE =\n \"Run Effects with run or runner from @r_masseater/masseater-utils/workers-tracing/effect, so their spans reach the Workers trace.\";\n\nconst RUN_FUNCTIONS: readonly string[] = [\n \"runPromise\",\n \"runPromiseExit\",\n \"runFork\",\n \"runCallback\",\n \"runSync\",\n \"runSyncExit\",\n \"runPromiseWith\",\n \"runPromiseExitWith\",\n \"runForkWith\",\n \"runCallbackWith\",\n \"runSyncWith\",\n \"runSyncExitWith\",\n];\n\nconst HAND_WRITTEN_SQL =\n \"Build queries with the Drizzle query builder, so that their columns and types come from the schema. Do not write SQL by hand with sql.\";\n\nexport const INTENTS: Readonly<Record<string, Intent>> = {\n \"ui-state-in-atoms\": {\n message:\n \"Keep UI state in effect-atom (Atom.make, useAtom, useAtomValue), so that state has one home outside the component tree. Do not use React state hooks or context.\",\n home: Option.none(),\n imports: [\n {\n module: \"react\",\n names: Option.some([\"useState\", \"useReducer\", \"createContext\", \"useContext\"]),\n typesAllowed: false,\n },\n ],\n members: [],\n },\n \"no-hand-written-sql\": {\n message: HAND_WRITTEN_SQL,\n home: Option.none(),\n imports: [\n { module: \"drizzle-orm\", names: Option.some([\"sql\"]), typesAllowed: false },\n { module: \"drizzle-orm/sql\", names: Option.none(), typesAllowed: false },\n ],\n members: [],\n },\n \"traced-elysia\": {\n message:\n \"Import Elysia from @r_masseater/masseater-utils/workers-tracing/elysia, so every handle call is a span.\",\n home: Option.none(),\n imports: [{ module: \"elysia\", names: Option.some([\"Elysia\", \"default\"]), typesAllowed: true }],\n members: [],\n },\n \"traced-effect-run\": {\n message: RUN_MESSAGE,\n home: Option.none(),\n imports: [\n { module: \"effect/Effect\", names: Option.some(RUN_FUNCTIONS), typesAllowed: false },\n { module: \"effect/ManagedRuntime\", names: Option.some([\"make\"]), typesAllowed: false },\n ],\n members: [\n { object: \"Effect\", properties: RUN_FUNCTIONS },\n { object: \"ManagedRuntime\", properties: [\"make\"] },\n ],\n },\n \"platform-node-by-module\": {\n message:\n 'Import names from a module path, such as import { layer } from \"@effect/platform-node/NodeServices\". The package root loads every module, the Redis client included, and adds about 250 ms to each start.',\n home: Option.none(),\n imports: [{ module: \"@effect/platform-node\", names: Option.none(), typesAllowed: true }],\n members: [],\n },\n \"main-through-node-main\": {\n message:\n 'Start a Node.js program with runMain from \"@r_masseater/masseater-utils/node-main\", so that it is traced and a failure prints one line instead of a stack trace.',\n home: Option.some(\"/src/features/run-main/model/run-main.ts\"),\n imports: [\n {\n module: \"@effect/platform-node/NodeRuntime\",\n names: Option.some([\"runMain\"]),\n typesAllowed: false,\n },\n {\n module: \"@effect/platform-node-shared/NodeRuntime\",\n names: Option.some([\"runMain\"]),\n typesAllowed: false,\n },\n ],\n members: [{ object: \"NodeRuntime\", properties: [\"runMain\"] }],\n },\n \"typed-calls-not-reflect\": {\n message:\n \"Read properties and call functions through typed access, or decode untyped values with Schema at the boundary. Do not go around the types with Reflect.\",\n home: Option.none(),\n imports: [],\n members: [{ object: \"Reflect\", properties: [\"get\", \"apply\"] }],\n },\n \"db-writes-in-writers\": {\n message:\n \"Write tables only from a *-writer.server.ts module, so that a table update and its revision go into the same batch. Call the writer here instead of writing through db.\",\n home: Option.none(),\n imports: [],\n members: [{ object: \"db\", properties: [\"insert\", \"update\", \"delete\", \"batch\", \"run\"] }],\n },\n};\n","import { Record as Rec, pipe } from \"effect\";\nimport type { Plugin } from \"vite-plus/lint/plugins\";\n\nimport { CODED_RULES } from \"./coded-rules.ts\";\nimport { ruleOf } from \"./intent-rule.ts\";\nimport { INTENTS } from \"./intents.ts\";\n\nexport const mschLintPlugin: Plugin & { readonly meta: { readonly name: string } } = {\n meta: { name: \"msch-lint\" },\n rules: {\n ...CODED_RULES,\n ...pipe(INTENTS, Rec.map(ruleOf)),\n },\n};\n"],"mappings":";;;;;;;AAeA,MAAMA,UAAQ;AACd,MAAMC,QAAM;AACZ,MAAM,MAAM;AACZ,MAAM,QAAQ;AACd,MAAMC,QAAM;AAEZ,MAAM,cAAc,OAAO,MAAM,CAAC,OAAO,QAAQ,OAAO,MAAM,CAAC;AAC/D,MAAM,eAAe,OAAO,OAAO,EAAE,OAAO,YAAY,CAAC;AAIzD,MAAM,eAAe,OAAO,oBAAoB,YAAY;AAE5D,MAAM,mBAAmB,OAAO,OAAO;CAAE,MAAM,OAAO,QAAQ,YAAY;CAAG,MAAM,OAAO;AAAO,CAAC;AAElG,MAAM,eAAe,OAAO,OAAO;CACjC,MAAM,OAAO,QAAQ,kBAAkB;CACvC,UAAU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ACA;GACE,QAAQ;GACR,OAAO,OAAO,KAAK,CAAC,SAAS,CAAC;GAC9B,cAAc;EAChB,CACF;EACA,SAAS,CAAC;GAAE,QAAQ;GAAe,YAAY,CAAC,SAAS;EAAE,CAAC;CAC9D;CACA,2BAA2B;EACzB,SACE;EACF,MAAM,OAAO,KAAK;EAClB,SAAS,CAAC;EACV,SAAS,CAAC;GAAE,QAAQ;GAAW,YAAY,CAAC,OAAO,OAAO;EAAE,CAAC;CAC/D;CACA,wBAAwB;EACtB,SACE;EACF,MAAM,OAAO,KAAK;EAClB,SAAS,CAAC;EACV,SAAS,CAAC;GAAE,QAAQ;GAAM,YAAY;IAAC;IAAU;IAAU;IAAU;IAAS;GAAK;EAAE,CAAC;CACxF;AACF;;ACnGA,MAAa,iBAAwE;CACnF,MAAM,EAAE,MAAM,YAAY;CAC1B,OAAO;EACL,GAAG;EACH,GAAG,KAAK,SAASE,OAAI,IAAI,MAAM,CAAC;CAClC;AACF"}
|
package/dist/lint.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as lint, E as decisionTestRules, S as removalPolicySyntax, T as decisionRules, _ as exempt, a as _default, b as commandsOverride, c as structureOf, d as VideoSeriesOptions, f as videoRules, g as requiredStack, h as INSTRUMENTATION, i as markdownOf, l as VideoRulesOptions, m as tracedRules, n as MARKDOWN_RULES, o as textlintFilters, p as remotionRules, r as MarkdownOptions, s as textlintPresets, t as MARKDOWN_IGNORES, u as VideoSayOptions, v as alchemyOverride, w as allRulesOf, x as removalPolicyOverride, y as cloudflareResourceSyntax } from "./index-
|
|
1
|
+
import { C as lint, E as decisionTestRules, S as removalPolicySyntax, T as decisionRules, _ as exempt, a as _default, b as commandsOverride, c as structureOf, d as VideoSeriesOptions, f as videoRules, g as requiredStack, h as INSTRUMENTATION, i as markdownOf, l as VideoRulesOptions, m as tracedRules, n as MARKDOWN_RULES, o as textlintFilters, p as remotionRules, r as MarkdownOptions, s as textlintPresets, t as MARKDOWN_IGNORES, u as VideoSayOptions, v as alchemyOverride, w as allRulesOf, x as removalPolicyOverride, y as cloudflareResourceSyntax } from "./index-CUrewm-i.mjs";
|
|
2
2
|
export { INSTRUMENTATION, MARKDOWN_IGNORES, MARKDOWN_RULES, type MarkdownOptions, type VideoRulesOptions, type VideoSayOptions, type VideoSeriesOptions, alchemyOverride, allRulesOf, cloudflareResourceSyntax, commandsOverride, _default as decisionPlugin, decisionRules, decisionTestRules, exempt, lint, markdownOf, remotionRules, removalPolicyOverride, removalPolicySyntax, requiredStack, structureOf, textlintFilters, textlintPresets, tracedRules, videoRules };
|
package/dist/lint.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { u as INSTRUMENTATION, t as MARKDOWN_IGNORES, n as MARKDOWN_RULES, _ as alchemyOverride, p as allRulesOf, v as cloudflareResourceSyntax, y as commandsOverride, g as decisionPlugin, m as decisionRules, h as decisionTestRules, S as exempt, f as lint, r as markdownOf, c as remotionRules, b as removalPolicyOverride, x as removalPolicySyntax, d as requiredStack, o as structureOf, i as textlintFilters, a as textlintPresets, l as tracedRules, s as videoRules } from "./define-lint-preset-
|
|
1
|
+
export { u as INSTRUMENTATION, t as MARKDOWN_IGNORES, n as MARKDOWN_RULES, _ as alchemyOverride, p as allRulesOf, v as cloudflareResourceSyntax, y as commandsOverride, g as decisionPlugin, m as decisionRules, h as decisionTestRules, S as exempt, f as lint, r as markdownOf, c as remotionRules, b as removalPolicyOverride, x as removalPolicySyntax, d as requiredStack, o as structureOf, i as textlintFilters, a as textlintPresets, l as tracedRules, s as videoRules } from "./define-lint-preset-YcRo_ZW9.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as exempt, a as textlintPresets, i as textlintFilters } from "./define-lint-preset-
|
|
1
|
+
import { S as exempt, a as textlintPresets, i as textlintFilters } from "./define-lint-preset-YcRo_ZW9.mjs";
|
|
2
2
|
import { Array, Record, pipe } from "effect";
|
|
3
3
|
import { betterleaks } from "@r_masseater/h56m/presets";
|
|
4
4
|
// src/app/repository-tasks.ts
|
|
@@ -175,4 +175,4 @@ const secretsOf = () => ({
|
|
|
175
175
|
});
|
|
176
176
|
export { MSCH_TASK_COMMANDS as a, textlintOf as i, builtTextRuleNames as n, tasksOf as o, secretsOf as r, TEXT_IGNORES as t };
|
|
177
177
|
|
|
178
|
-
//# sourceMappingURL=repository-text-
|
|
178
|
+
//# sourceMappingURL=repository-text-DE4rRWEZ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository-text-
|
|
1
|
+
{"version":3,"file":"repository-text-DE4rRWEZ.mjs","names":["Arr","Rec","Rec","Arr"],"sources":["../src/app/repository-tasks.ts","../src/app/repository-text.ts"],"sourcesContent":["import { Array as Arr, Record as Rec, pipe } 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_ARGS = [\n \"--skip dupes --fail-on-issues --quiet --format compact\",\n \"dead-code --no-production --fail-on-issues --quiet --format compact\",\n \"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 \"dupes --fail-on-issues --quiet --format compact\",\n \"security --fail-on-issues --quiet\",\n];\n\nconst FALLOW = pipe(\n FALLOW_ARGS,\n Arr.map((args) => `FALLOW_TYPE_AWARE_BACKEND=tsrs fallow ${args}`),\n);\n\nconst CHECK_BATCH_SOURCES = 1000;\n\nconst CHECK = `TSRS_LINT_RUN_EXTERNAL_CODE=1 msch-changed --batch-sources ${String(CHECK_BATCH_SOURCES)} vp check --deny-warnings --continue-on-error`;\n\nconst COMPAT = \"msch-changed msch-publish compat-changed\";\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\nconst BROKER_TOKEN = `GH_TOKEN=\"\\${GITHUB_APP_TOKEN:-$GH_TOKEN}\"`;\nconst DAILY = `msch-exits; ${BROKER_TOKEN} msch-upstream; ${BROKER_TOKEN} msch-refs`;\n\nconst TEST = \"msch-changed vp test run --passWithNoTests\";\n\nexport const MSCH_TASK_COMMANDS = {\n fallow: FALLOW,\n check: CHECK,\n test: TEST,\n msch: \"msch\",\n audit: AUDIT,\n published: \"msch-published\",\n compat: COMPAT,\n} as const;\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 ...commands,\n fallow: {\n command: FALLOW,\n cache: {\n input: [...inputs, \"!.fallow/**\", \"!**/dist/**\", \"!**/.fallow-verified\"],\n output: [],\n },\n },\n check: {\n command: CHECK,\n cache: { input: inputs, untrackedEnv: UNTRACKED_ENV },\n },\n test: {\n command: TEST,\n dependsOn: [\"check\", ...workspace.tasks.native],\n cache: { input: [...inputs, \"!**/.cache/**\"] },\n },\n msch: { command: \"msch\", dependsOn: [\"check\", ...workspace.tasks.native], cache: false },\n audit: { command: AUDIT, cache: false },\n published: { command: \"msch-published\", cache: false },\n compat: { command: COMPAT, cache: false },\n };\n return {\n ...checks,\n daily: { command: DAILY, dependsOn: [...workspace.tasks.native], cache: false },\n verify: { command: [], dependsOn: [...workspace.tasks.verify, ...Rec.keys(checks)] },\n };\n};\n","import type { H56mConfig } from \"@r_masseater/h56m\";\nimport { betterleaks } from \"@r_masseater/h56m/presets\";\nimport type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Array as Arr, Record as Rec, pipe } from \"effect\";\n\nimport { textlintFilters, textlintPresets } from \"#/features/define-lint-preset/index.ts\";\nimport { exempt } from \"#/shared/config/index.ts\";\n\ntype Source = NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"sources\"]>[number];\n\nexport interface TextSource {\n readonly files: readonly string[];\n readonly plugins: Readonly<Record<string, boolean | object>>;\n}\n\nexport interface TextOptions {\n readonly properNouns?: readonly string[];\n readonly rules?: Readonly<Record<string, object>>;\n readonly sources?: readonly TextSource[];\n}\n\nexport const TEXT_IGNORES = [\n \"AGENTS.md\",\n \"CLAUDE.md\",\n \".agents/skills/**\",\n \"CHANGELOG.md\",\n ...exempt,\n];\nconst QUOTATION = String.raw`/「[^」]*」/`;\nconst SENTENCE_LENGTH = 120;\nconst KANJI_RUN = 6;\nconst PUBLIC_LINES = [\n String.raw`\\bCF_BEACON_TOKEN = \"[0-9a-f]{32}\"`,\n String.raw`\\b\\w*DISCORD_\\w*ID = \"[0-9]{17,20}\"`,\n String.raw`untrusted comment: minisign public key: [0-9A-F]{16}`,\n];\nconst EXEMPT_PATHS = [String.raw`(?:^|/)(?:fixtures|upstream)/`];\n\nconst builtRules = (\n properNouns: readonly string[],\n): Readonly<Record<string, boolean | object>> => ({\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: [...properNouns] },\n \"no-exclamation-question-mark\": { allow: [QUOTATION, ...properNouns] },\n },\n});\n\nexport const builtTextRuleNames: readonly string[] = Rec.keys(builtRules([]));\n\nexport const textlintOf = ({\n properNouns = [],\n rules = {},\n sources = [],\n}: TextOptions): NonNullable<ToolSections[\"textlint\"]> => {\n const textRules = { ...rules, ...builtRules(properNouns) };\n return {\n ignores: TEXT_IGNORES,\n presets: textlintPresets,\n filterModules: textlintFilters,\n reportUnusedDirectives: true,\n sources: pipe(\n sources,\n Arr.map(({ files, plugins }): Source => ({\n files: [...files],\n plugins: { ...plugins },\n rules: textRules,\n filters: { comments: true },\n })),\n ),\n filters: { comments: true },\n rules: textRules,\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 secretsOf = (): H56mConfig => ({\n extend: { path: betterleaks },\n filter: pipe(\n [...anyOf(\"finding.line\")(PUBLIC_LINES), ...anyOf(`attributes[\"path\"]`)(EXEMPT_PATHS)],\n Arr.join(\" || \"),\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;AAUA,MAAM,SAAS,KACb;CARA;CACA;CACA;CAC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GAAG,GACrCA,MAAI,KAAK,IAAI,CAEyB,EAAE,GAAG;AAC/C;AAEF,MAAa,mBAA+B;CAC1C,QAAQ,EAAE,MAAM,YAAY;CAC5B,QAAQ,KACN,CAAC,GAAG,MAAM,cAAc,CAAC,CAAC,YAAY,GAAG,GAAG,MAAM,oBAAoB,CAAC,CAAC,YAAY,CAAC,GACrFA,MAAI,KAAK,MAAM,CACjB;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@r_masseater/msch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.98.0",
|
|
4
4
|
"description": "A check policy for repositories: points every finite value set and object shape at its one owner, and ships the oxlint preset of plugins and rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lint",
|
|
@@ -135,7 +135,7 @@ It sets each `values` entry to the given source text and removes every property
|
|
|
135
135
|
It checks every cut's `voice` against `voices`, and the first and last speaker against `opener` and `closer`.
|
|
136
136
|
With `intro: "beats"`, the `intro` cut needs `at` and `|` parts. With `intro: "plain"`, both are removed.
|
|
137
137
|
|
|
138
|
-
`
|
|
138
|
+
`introValues` gives the source text that each property of the `intro` cut must have. `afterIntro` does the same for the cut after it. Use them to keep shared beats or a fixed start time in one place. A missing or different value is fixed.
|
|
139
139
|
|
|
140
140
|
Run `vp lint --fix` to apply the fixes.
|
|
141
141
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"define-lint-preset-B-hC9_df.mjs","names":["Rec","Arr","Str","effectPresets","decisionPlugin","shadcn","Str","Arr","Rec"],"sources":["../src/shared/config/exempt.ts","../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/web-guidance.config.ts","../src/features/define-lint-preset/config/lint.config.ts","../src/features/define-lint-preset/config/test-rules.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/video-rules.config.ts","../src/features/define-lint-preset/config/structure.config.ts","../src/features/define-lint-preset/config/kuromojin.config.ts","../src/features/define-lint-preset/config/textlint-presets.config.ts","../src/features/define-lint-preset/config/textlint-filters.config.ts","../src/features/define-lint-preset/config/markdown.config.ts"],"sourcesContent":["export const generated = [\n \"**/routeTree.gen.ts\",\n \"**/generated/**\",\n \"**/drizzle/**/snapshot.json\",\n \".claude/skills/**\",\n \".intent/**\",\n \"AGENTS.md\",\n \"CLAUDE.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 checkerInputs = [\"**/fixtures/**\"];\n\nconst vendored = [\"**/upstream/**\"];\n\nexport const exempt = [...generated, ...checkerInputs, ...vendored];\n","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\nconst UNGATED_MODEL_CALL =\n \"モデルの呼び出しは AI Gateway を通す。通らない呼び出しには日ごとの費用の上限が掛からず、無料枠を超えた分がそのまま請求される\";\n\nconst MODEL_RUN =\n 'CallExpression[callee.property.name=\"run\"]:matches([callee.object.name=\"AI\"], [callee.object.property.name=\"AI\"])';\n\nconst AI_RUN_URL =\n \":matches(Literal[value=/ai.run/], TemplateLiteral:has(TemplateElement[value.raw=/ai.run/]))\";\n\nconst AI_RUN_REQUEST = `CallExpression:has(> ${AI_RUN_URL})`;\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: `${MODEL_RUN}[arguments.length<3]`,\n message: UNATTRIBUTED_MODEL_CALL,\n },\n {\n selector: `${MODEL_RUN} > .arguments:nth-child(3):not(Identifier[name=\"options\"])`,\n message: `${UNGATED_MODEL_CALL}。AI.run の第 3 引数には、runWorkersAi の call が受け取る options をそのまま渡す`,\n },\n {\n selector: `${AI_RUN_REQUEST} > ObjectExpression.arguments:not(:has(Property[key.name=\"headers\"]))`,\n message: `${UNGATED_MODEL_CALL}。REST の /ai/run を呼ぶときは、headers に cf-aig-gateway-id を付ける`,\n },\n {\n selector: `${AI_RUN_REQUEST} > ObjectExpression.arguments > Property[key.name=\"headers\"] > ObjectExpression:not(:has(Property[key.value=\"cf-aig-gateway-id\"]))`,\n message: `${UNGATED_MODEL_CALL}。REST の /ai/run を呼ぶときは、headers に cf-aig-gateway-id を付ける`,\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 type { UserConfig } from \"vite-plus\";\n\ntype LintRules = NonNullable<NonNullable<UserConfig[\"lint\"]>[\"rules\"]>;\n\nexport const webGuidanceRules = {\n \"jsx-a11y/no-redundant-roles\": [\"error\", { ul: [\"list\"], ol: [\"list\"] }],\n \"jsx-a11y/no-noninteractive-tabindex\": [\"error\", { tags: [\"section\"], roles: [\"tabpanel\"] }],\n} satisfies LintRules;\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\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 { webGuidanceRules } from \"./web-guidance.config.ts\";\n","import type { UserConfig } from \"vite-plus\";\n\ntype LintRules = NonNullable<NonNullable<UserConfig[\"lint\"]>[\"rules\"]>;\n\nconst NO_TEST_DOUBLES =\n \"依存の振る舞いを差し替えない。Effect の Layer を差し替えるか、本物の実装を使う\";\n\nexport const testRules = {\n \"vitest/expect-expect\": [\n \"error\",\n { assertFunctionNames: [\"expect\", \"expect*\", \"assert*\", \"waitFor*\", \"run\", \"*.run\"] },\n ],\n \"vitest/valid-expect\": [\"error\", { maxArgs: 2 }],\n \"vitest/valid-title\": [\"error\", { allowArguments: true }],\n \"vitest/prefer-called-times\": \"off\",\n \"vitest/prefer-import-in-mock\": \"off\",\n \"vitest/no-standalone-expect\": \"off\",\n \"vitest/no-conditional-in-test\": \"off\",\n \"vitest/require-test-timeout\": \"off\",\n \"vitest/prefer-expect-assertions\": \"off\",\n \"vitest/require-top-level-describe\": \"off\",\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/require-hook\": \"off\",\n \"vitest/no-hooks\": \"off\",\n \"vitest/consistent-test-it\": \"off\",\n \"vitest/prefer-describe-function-title\": \"off\",\n \"vitest/prefer-lowercase-title\": \"off\",\n \"vitest/prefer-to-be-truthy\": \"off\",\n \"vitest/prefer-to-be-falsy\": \"off\",\n \"vitest/padding-around-after-all-blocks\": \"off\",\n \"vitest/padding-around-test-blocks\": \"off\",\n \"vitest/max-expects\": \"off\",\n} satisfies LintRules;\n\nconst NO_FLAKE_MASKING =\n \"再試行や flakyTest で不安定なテストを隠さない。待つ対象のイベントを await して直す\";\n\nexport const testDoubleSyntax: readonly Readonly<{ selector: string; message: string }>[] = [\n {\n selector: 'CallExpression[callee.object.name=\"vi\"][callee.property.name=/^(mock|doMock)$/]',\n message: NO_TEST_DOUBLES,\n },\n {\n selector: 'CallExpression[callee.object.name=\"vi\"][callee.property.name=\"stubGlobal\"]',\n message: NO_TEST_DOUBLES,\n },\n];\n\nexport const flakeMaskingSyntax: readonly Readonly<{ selector: string; message: string }>[] = [\n { selector: 'Property[key.name=\"retry\"]', message: NO_FLAKE_MASKING },\n { selector: 'MemberExpression[property.name=\"retry\"]', message: NO_FLAKE_MASKING },\n { selector: 'MemberExpression[property.name=\"flakyTest\"]', message: NO_FLAKE_MASKING },\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 { DECISION_MODEL, DECISION_TIMEOUT_MS, generated } from \"#/shared/config/index.ts\";\n\nimport {\n alchemyOverride,\n cloudflareResourceSyntax,\n removalPolicyOverride,\n commandsOverride,\n} from \"./lint-overrides.config.ts\";\nimport {\n allRulesOf,\n decisionPluginName,\n pluginRules,\n shadcnRestyleContracts,\n webGuidanceRules,\n} from \"./lint.config.ts\";\nimport { flakeMaskingSyntax, testDoubleSyntax, testRules } from \"./test-rules.config.ts\";\n\ntype LintConfig = NonNullable<UserConfig[\"lint\"]>;\n\nconst resolved = (specifier: string): string => fileURLToPath(import.meta.resolve(specifier));\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: \"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 ...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 ignoreFeatures: [\"top-level-await\"],\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 ...testRules,\n ...webGuidanceRules,\n \"msch-lint/array-from-async\": \"error\",\n \"msch-lint/ecosystem-readers\": \"error\",\n \"msch-lint/explicit-import-path\": \"error\",\n \"msch-lint/get-or-insert\": \"error\",\n \"msch-lint/mcp-tool-layer\": \"error\",\n \"msch-lint/main-through-node-main\": \"error\",\n \"msch-lint/inline-exports\": \"error\",\n \"msch-lint/ui-state-in-atoms\": \"error\",\n \"msch-lint/no-hand-written-sql\": \"error\",\n \"msch-lint/platform-node-by-module\": \"error\",\n \"msch-lint/readonly-parameters\": \"error\",\n \"msch-lint/separate-min-max\": \"error\",\n \"msch-lint/typed-calls-not-reflect\": \"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\", \"stability\"] }],\n \"jsdoc/require-param\": [\"error\", { exemptedBy: [\"inheritdoc\", \"internal\", \"msch\", \"stability\"] }],\n \"jsdoc/require-returns\": [\n \"error\",\n { exemptedBy: [\"inheritdoc\", \"internal\", \"msch\", \"stability\"] },\n ],\n \"eslint-js/no-restricted-syntax\": [\"error\", ...cloudflareResourceSyntax],\n \"typescript/prefer-readonly-parameter-types\": \"off\",\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 actionScriptsOverride = {\n files: [\".github/**/*.ts\"],\n rules: {\n \"baseline-js/use-baseline\": \"off\",\n \"effecttsgo/async-function\": \"off\",\n \"effecttsgo/global-console\": \"off\",\n \"effecttsgo/global-fetch\": \"off\",\n \"effecttsgo/global-json\": \"off\",\n \"effecttsgo/missing-pipeable-signature\": \"off\",\n \"effecttsgo/node-builtin-import\": \"off\",\n \"effecttsgo/prefer-effect-array\": \"off\",\n \"effecttsgo/prefer-effect-record\": \"off\",\n \"effecttsgo/prefer-effect-string\": \"off\",\n \"effecttsgo/process-env\": \"off\",\n \"eslint/no-console\": \"off\",\n \"eslint/no-undefined\": \"off\",\n \"import/no-relative-parent-imports\": \"off\",\n \"node/no-process-env\": \"off\",\n \"node/no-sync\": \"off\",\n \"oxc/no-async-await\": \"off\",\n \"unicorn/no-process-exit\": \"off\",\n },\n} satisfies NonNullable<LintConfig[\"overrides\"]>[number];\n\nconst overrides = [\n removalPolicyOverride,\n actionScriptsOverride,\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: [\"**/bin/**\"],\n rules: { \"baseline-js/use-baseline\": \"off\" },\n },\n {\n files: [\"**/*.test.ts\", \"**/*.test.tsx\", \"**/*.test.support.ts\", \"**/vite.config.ts\"],\n rules: {\n \"eslint-js/no-restricted-syntax\": [\n \"error\",\n ...cloudflareResourceSyntax,\n ...flakeMaskingSyntax,\n ...testDoubleSyntax,\n ],\n },\n },\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 \"vitest\",\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: DECISION_MODEL,\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 { VideoIntro } from \"#/shared/config/index.ts\";\n\nexport interface VideoSayOptions {\n readonly terms?: Readonly<Record<string, string>>;\n readonly banned?: Readonly<Record<string, string>>;\n readonly maxEmphasis?: number;\n}\n\nexport interface VideoSeriesOptions {\n readonly values?: Readonly<Record<string, string>>;\n readonly voices?: readonly string[];\n readonly opener?: string;\n readonly closer?: string;\n readonly intro?: VideoIntro;\n readonly afterIntro?: Readonly<Record<string, string>>;\n}\n\nexport interface VideoRulesOptions {\n readonly say: VideoSayOptions;\n readonly series: Readonly<Record<string, VideoSeriesOptions>>;\n readonly banned?: Readonly<Record<string, string>>;\n}\n\nexport const videoRules = ({ say, series, banned = {} }: VideoRulesOptions) =>\n ({\n \"msch-lint/video-say\": [\"error\", say],\n \"msch-lint/video-readings\": \"error\",\n \"msch-lint/video-series\": [\"error\", { series, banned }],\n }) as const;\n","import type { WismConfig } from \"@r_masseater/wism\";\nimport { rustCrate, skill, structure, workspace } from \"@r_masseater/wism/presets\";\nimport { Array as Arr, Predicate, String as Str, pipe } from \"effect\";\n\nconst NEGATION = \"!\";\nconst isIgnore = Predicate.not(Str.startsWith(NEGATION));\n\nexport interface StructureOptions {\n readonly members: readonly string[];\n readonly ignorePatterns: readonly string[];\n}\n\nexport const structureOf = ({ members, ignorePatterns }: StructureOptions): WismConfig =>\n structure({\n kinds: [workspace({ paths: members }), rustCrate(), skill()],\n ignores: pipe(ignorePatterns, Arr.filter(isIgnore)),\n });\n","import { createRequire, registerHooks } from \"node:module\";\n\nexport const KUROMOJIN = \"kuromojin\";\nconst ON_Y8 = \"@r_masseater/y8/kuromojin\";\n\nexport const requireWithY8Kuromojin = (parentUrl: string): NodeJS.Require => {\n registerHooks({\n resolve: (specifier, context, nextResolve) => {\n if (specifier === KUROMOJIN) {\n return nextResolve(ON_Y8, { ...context, parentURL: import.meta.url });\n }\n return nextResolve(specifier, context);\n },\n });\n return createRequire(parentUrl);\n};\n","import 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\nimport { requireWithY8Kuromojin } from \"./kuromojin.config.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 = requireWithY8Kuromojin(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 { createRequire } from \"node:module\";\n\nimport type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Option, Predicate, pipe } from \"effect\";\n\ntype Filter = NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"filterModules\"]>[string];\n\nconst isFilter = (value: unknown): value is Filter => Predicate.isFunction(value);\n\nconst filterIn = (specifier: string, loaded: unknown): Filter =>\n pipe(\n Option.liftPredicate(loaded, isFilter),\n Option.getOrThrowWith(() => new TypeError(`${specifier} does not export a textlint filter`)),\n );\n\nexport const textlintFilters: NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"filterModules\"]> =\n {\n comments: filterIn(\n \"textlint-filter-rule-comments\",\n createRequire(import.meta.url)(\"textlint-filter-rule-comments\"),\n ),\n };\n","import type { Y8Config } from \"@r_masseater/y8\";\nimport { recommended } from \"@r_masseater/y8/presets\";\nimport type { RecommendedOptions } from \"@r_masseater/y8/presets\";\nimport { Option } from \"effect\";\n\nimport { exempt } from \"#/shared/config/index.ts\";\n\ntype SkillNames = NonNullable<NonNullable<RecommendedOptions[\"skills\"]>[\"skillNames\"]>;\n\nconst skillNamesOf = (indexSkill: Option.Option<string>): SkillNames =>\n Option.match(indexSkill, {\n onNone: (): SkillNames => ({}),\n onSome: (index): SkillNames => ({ index }),\n });\n\nconst docsOf = (indexSkill: Option.Option<string>): RecommendedOptions => {\n const skillNames = skillNamesOf(indexSkill);\n return {\n agents: {\n sections: [[\"Tech stack\"], [\"Commands\"], [\"Rules\"]],\n commands: [\"Commands\"],\n stack: [\"Tech stack\"],\n skillNames,\n },\n skills: { skillNames },\n };\n};\n\nexport const MARKDOWN_IGNORES = [\".agents/skills/**\", \"CHANGELOG.md\", \"**/CLAUDE.md\", ...exempt];\n\nexport const MARKDOWN_RULES = { \"agnix/XP-001\": \"off\" } as const;\n\nexport interface MarkdownOptions {\n readonly indexSkill: Option.Option<string>;\n readonly docs?: RecommendedOptions;\n}\n\nexport const markdownOf = ({ indexSkill, docs = {} }: MarkdownOptions): Y8Config => {\n const base = docsOf(indexSkill);\n return {\n extends: [\n recommended({\n ...base,\n ...docs,\n agents: { ...base.agents, ...docs.agents },\n skills: { ...base.skills, ...docs.skills },\n }),\n ],\n rules: MARKDOWN_RULES,\n reportUnusedDirectives: true,\n ignores: MARKDOWN_IGNORES,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAa,YAAY;CACvB;CACA;CACA;CACA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O,CAAC,WAAW;GACnB,OAAO,EAAE,4BAA4B,MAAM;EAC7C;EACA;GACE,OAAO;IAAC;IAAgB;IAAiB;IAAwB;GAAmB;GACpF,OAAO,EACL,kCAAkC;IAChC;IACA,GAAG;IACH,GAAG;IACH,GAAG;GACL,EACF;EACF;EACA;GACE,OAAO,CAAC,mBAAmB;GAC3B,OAAO;IACL,oBAAoB;IACpB,iCAAiC;IACjC,4BAA4B;GAC9B;EACF;CA+BA;CACA,UAAU,GACP,qBAAqB;EACpB,OAAO;EACP,WAAW;EACX,IAAI;CACN,EACF;CACA,SAAS;EACP,WAAW;EACX,WAAW;EACX,cAAc;EACd,+BAA+B;CACjC;AACF;;AC9NA,MAAM,WAAW;AAEjB,MAAa,kBAAkB;AAC/B,MAAM,iBAAiB;AAEvB,MAAa,gBAA6D;EACvE,WAAW;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,uCAAuC;EACrC;EACA;EACA;EACA;EACA;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;EAC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