@r_masseater/msch 0.1.0 → 0.2.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/README.md +3 -1
- package/dist/{cli-contract-Wo9XK0jk.mjs → cli-contract-BRpk_UKr.mjs} +15 -7
- package/dist/cli-contract-BRpk_UKr.mjs.map +1 -0
- package/dist/cli.mjs +116 -5
- package/dist/cli.mjs.map +1 -1
- package/dist/lint.mjs +19 -1
- package/dist/lint.mjs.map +1 -1
- package/dist/oxlint.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli-contract-Wo9XK0jk.mjs.map +0 -1
package/dist/lint.mjs
CHANGED
|
@@ -364,6 +364,7 @@ const readonlyParameterAllow = [
|
|
|
364
364
|
"RegExpExecArray",
|
|
365
365
|
"RegExpMatchArray",
|
|
366
366
|
"Date",
|
|
367
|
+
"SpeechRecognitionResult",
|
|
367
368
|
...[
|
|
368
369
|
"HTMLCanvasElement",
|
|
369
370
|
"HTMLImageElement",
|
|
@@ -562,6 +563,20 @@ const readonlyParameterAllow = [
|
|
|
562
563
|
package: "clsx",
|
|
563
564
|
name: "ClassValue"
|
|
564
565
|
},
|
|
566
|
+
{
|
|
567
|
+
from: "package",
|
|
568
|
+
package: "@anthropic-ai/claude-agent-sdk",
|
|
569
|
+
name: ["SDKMessage", "SDKResultMessage"]
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
from: "package",
|
|
573
|
+
package: "@types/dom-speech-recognition",
|
|
574
|
+
name: [
|
|
575
|
+
"SpeechRecognition",
|
|
576
|
+
"SpeechRecognitionEvent",
|
|
577
|
+
"SpeechRecognitionResult"
|
|
578
|
+
]
|
|
579
|
+
},
|
|
565
580
|
{
|
|
566
581
|
from: "package",
|
|
567
582
|
package: "@modelcontextprotocol/server",
|
|
@@ -705,6 +720,7 @@ const readonlyParameterAllow = [
|
|
|
705
720
|
from: "package",
|
|
706
721
|
package: "effect",
|
|
707
722
|
name: [
|
|
723
|
+
"Atom",
|
|
708
724
|
"Cause",
|
|
709
725
|
"Context",
|
|
710
726
|
"Duration",
|
|
@@ -713,6 +729,7 @@ const readonlyParameterAllow = [
|
|
|
713
729
|
"Fiber",
|
|
714
730
|
"HashMap",
|
|
715
731
|
"HashSet",
|
|
732
|
+
"HttpClientRequest",
|
|
716
733
|
"HttpServerRequest",
|
|
717
734
|
"HttpServerResponse",
|
|
718
735
|
"Layer",
|
|
@@ -722,7 +739,8 @@ const readonlyParameterAllow = [
|
|
|
722
739
|
"Redacted",
|
|
723
740
|
"Ref",
|
|
724
741
|
"Stream",
|
|
725
|
-
"Utc"
|
|
742
|
+
"Utc",
|
|
743
|
+
"Writable"
|
|
726
744
|
]
|
|
727
745
|
}
|
|
728
746
|
];
|
package/dist/lint.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.mjs","names":["Arr","Rec","Str","effectPresets","decisionPlugin","shadcn","decisionPlugin"],"sources":["../src/lint/lint-overrides.config.ts","../src/lint/lint.config.ts","../src/lint/readonly-lint-tools.config.ts","../src/lint/readonly-types.config.ts","../src/lint/preset.ts"],"sourcesContent":["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 {\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\nconst scriptsOverride: {\n files: string[];\n rules: Readonly<Record<string, \"off\">>;\n} = {\n files: [\"scripts/**\"],\n rules: {\n \"import/no-nodejs-modules\": \"off\",\n \"node/no-process-env\": \"off\",\n \"node/no-sync\": \"off\",\n \"effecttsgo/node-builtin-import\": \"off\",\n },\n};\n\nexport { alchemyOverride, scriptsOverride };\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 REACT_STATE_HOOKS: readonly string[] = [\n \"useState\",\n \"useReducer\",\n \"createContext\",\n \"useContext\",\n];\nconst HAND_WRITTEN_SQL = \"SQL を手書きせず Drizzle のクエリビルダーを使う\";\nconst UI_STATE = \"UI 状態は effect-atom だけで扱う\";\n\nconst INSTRUMENTATION = \"計装は Effect のトレーシングだけで扱う\";\nconst INFRASTRUCTURE = \"インフラは Alchemy の IaC と Cloudflare だけで扱い、wrangler は使わない\";\n\nconst 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 \"フィーチャーフラグは OpenFeature だけで扱う\": [\n \"launchdarkly-*\",\n \"@launchdarkly/*\",\n \"@growthbook/*\",\n \"unleash-client\",\n \"flagsmith\",\n \"@vercel/flags\",\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\nconst requiredStackEntries = Arr.flatMap(Rec.toEntries(requiredStack), ([message, modules]) =>\n pipe(\n modules,\n Arr.map((module) => ({ message, module })),\n ),\n);\n\nconst requiredStackPaths: readonly Readonly<{ name: string; message: string }>[] = Arr.map(\n pipe(\n requiredStackEntries,\n Arr.filter(({ module }) => !Str.includes(\"*\")(module)),\n ),\n ({ message, module }) => ({ name: module, message }),\n);\n\nconst requiredStackPatterns: readonly Readonly<{ group: readonly string[]; message: string }>[] =\n pipe(\n requiredStackEntries,\n Arr.map(({ message, module }) => {\n if (Str.includes(\"*\")(module)) {\n return { group: [module, `${module}/**`], message };\n }\n return { group: [`${module}/**`], message };\n }),\n );\n\nconst restrictedImports = {\n paths: [\n {\n name: \"react\",\n importNames: [...REACT_STATE_HOOKS],\n message: UI_STATE,\n },\n { name: \"drizzle-orm\", importNames: [\"sql\"], message: HAND_WRITTEN_SQL },\n { name: \"drizzle-orm/sql\", message: HAND_WRITTEN_SQL },\n ...requiredStackPaths,\n ],\n patterns: [...requiredStackPatterns],\n};\n\nconst generated = [\n \"**/routeTree.gen.ts\",\n \"**/generated/**\",\n \"**/drizzle/**/snapshot.json\",\n \".claude/skills/**\",\n \".intent/**\",\n \"AGENTS.md\",\n \"skills-lock.json\",\n \".github/release-please/*manifest.json\",\n \"**/*.d.rpp.ts\",\n \"**/src-tauri/gen/**\",\n];\n\nconst asErrors = (names: readonly string[]): Readonly<Record<string, \"error\">> =>\n Rec.fromEntries(\n pipe(\n names,\n Arr.map((name) => [name, \"error\"] as const),\n ),\n );\n\nconst 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\nconst pluginRules: Readonly<Record<string, \"error\">> = {\n ...asErrors(Rec.keys(htmlReact.configs.all.rules ?? {})),\n ...reactHooksRules,\n ...asErrors(eslintReactRuleNames),\n ...asErrors(effectRuleNames),\n};\n\nconst decisionPluginName = decisionPlugin.meta.name;\n\nconst decisionRules = allRulesOf({ prefix: decisionPluginName, rules: decisionPlugin.rules });\n\nconst decisionTestRules = pipe(\n decisionRules,\n Rec.map(() => \"off\" as const),\n);\n\nconst shadcnRestyleContracts = [\n { pattern: \"^Table(Head|Cell)$\", allow: [\"text-alignment\", \"fvn-spacing\"] },\n { pattern: \"^TableCaption$\", allow: [\"caption\", \"text-alignment\", \"mt-*\", \"mb-*\"] },\n];\n\nexport {\n INFRASTRUCTURE,\n INSTRUMENTATION,\n shadcnRestyleContracts,\n allRulesOf,\n decisionPluginName,\n decisionRules,\n decisionTestRules,\n generated,\n pluginRules,\n requiredStack,\n restrictedImports,\n};\n","const lintToolReadonlyAllow = [\n {\n from: \"package\" as const,\n package: \"@oxlint/plugins\",\n name: [\n \"Context\",\n \"Location\",\n \"Node\",\n \"Range\",\n \"Rule\",\n \"RuleMeta\",\n \"SourceCode\",\n \"VisitorWithHooks\",\n ],\n },\n {\n from: \"package\" as const,\n package: \"oxlint\",\n name: [\"InvalidTestCase\", \"Rule\", \"TestCases\", \"ValidTestCase\"],\n },\n { from: \"package\" as const, package: \"@commitlint/types\", name: [\"QualifiedConfig\"] },\n {\n from: \"package\" as const,\n package: \"@textlint/config-loader\",\n name: [\"TextlintLoadPackagesFromRawConfigResult\"],\n },\n { from: \"package\" as const, package: \"markdownlint\", name: [\"LintError\"] },\n {\n from: \"package\" as const,\n package: \"steiger\",\n name: [\"ConfigObject\", \"GlobalIgnore\", \"Plugin\"],\n },\n {\n from: \"file\" as const,\n path: \"upstream/attw-core/lib/checkPackage.d.ts\",\n name: [\"CheckPackageOptions\"],\n },\n {\n from: \"file\" as const,\n path: \"../vite-plus-adopt/dist/attw.d.mts\",\n name: [\"CheckPackageOptions\"],\n },\n {\n from: \"file\" as const,\n path: \"src/types.ts\",\n name: [\"CommitlintConfig\", \"MarkdownlintConfig\", \"TextlintConfig\", \"ToolSections\"],\n },\n {\n from: \"file\" as const,\n name: [\n \"BoundSymbol\",\n \"CompatSymbol\",\n \"CompatType\",\n \"FileBinding\",\n \"SymbolTable\",\n \"TypedContext\",\n ],\n },\n];\n\nexport { lintToolReadonlyAllow };\n","import { lintToolReadonlyAllow } from \"./readonly-lint-tools.config.ts\";\n\nconst WEBGPU_HANDLES: readonly string[] = [\n \"GPUDevice\",\n \"GPUCanvasContext\",\n \"GPUTexture\",\n \"GPUBuffer\",\n \"GPUBindGroup\",\n \"GPUBindGroupLayout\",\n \"GPUPipelineLayout\",\n \"GPURenderPipeline\",\n \"GPUSampler\",\n];\n\nconst BROWSER_HANDLES: readonly string[] = [\n \"HTMLCanvasElement\",\n \"HTMLImageElement\",\n \"HTMLAnchorElement\",\n \"CanvasRenderingContext2D\",\n \"PointerEvent\",\n \"WheelEvent\",\n \"KeyboardEvent\",\n \"MouseEvent\",\n \"AbortSignal\",\n \"ImageBitmap\",\n ...WEBGPU_HANDLES,\n];\n\nconst readonlyParameterAllow = [\n {\n from: \"lib\" as const,\n name: [\n \"HTMLElement\",\n \"HTMLDivElement\",\n \"Worker\",\n \"ReadableStream\",\n \"Request\",\n \"Response\",\n \"Float64Array\",\n \"ArrayBuffer\",\n \"RegExp\",\n \"Uint8Array\",\n \"DataView\",\n \"RegExpExecArray\",\n \"RegExpMatchArray\",\n \"Date\",\n ...BROWSER_HANDLES,\n ],\n },\n { from: \"package\" as const, package: \"@webgpu/types\", name: [...WEBGPU_HANDLES] },\n {\n from: \"package\" as const,\n package: \"@cloudflare/workers-types\",\n name: [\n \"AnalyticsEngineDataset\",\n \"Container\",\n \"DurableObjectState\",\n \"DurableObjectStorage\",\n \"KVNamespace\",\n \"R2Bucket\",\n \"SecretsStoreSecret\",\n \"TailEvent\",\n \"Onset\",\n \"Log\",\n \"Exception\",\n \"Attribute\",\n \"SpanUpdateInfo\",\n \"FetchResponseInfo\",\n \"Span\",\n ],\n },\n { from: \"package\" as const, package: \"@alchemy.run/cloudflare\", name: [\"Store\", \"WorkerProps\"] },\n {\n from: \"package\" as const,\n package: \"@bufbuild/protobuf\",\n name: [\"DescMessage\", \"JsonObject\", \"JsonValue\", \"Message\"],\n },\n { from: \"package\" as const, package: \"lighthouse\", name: [\"FlowResult\", \"Step\"] },\n { from: \"package\" as const, package: \"vitest\", name: \"TestProject\" },\n { from: \"package\" as const, package: \"puppeteer-core\", name: [\"Browser\", \"Page\"] },\n { from: \"package\" as const, package: \"miniflare\", name: \"Miniflare\" },\n { from: \"package\" as const, package: \"elysia\", name: \"ElysiaConfig\" },\n { from: \"package\" as const, package: \"@types/node\", name: [\"Request\", \"Response\"] },\n { from: \"package\" as const, package: \"@better-auth/drizzle-adapter\", name: \"DB\" },\n { from: \"package\" as const, package: \"@tanstack/query-core\", name: \"QueryClient\" },\n { from: \"package\" as const, package: \"@codemirror/view\", name: [\"EditorView\", \"ViewUpdate\"] },\n { from: \"package\" as const, package: \"@codemirror/state\", name: [\"Extension\", \"Text\"] },\n { from: \"package\" as const, package: \"@codemirror/lint\", name: \"Diagnostic\" },\n { from: \"package\" as const, package: \"comlink\", name: \"Remote\" },\n {\n from: \"package\" as const,\n package: \"typescript\",\n name: [\n \"API\",\n \"ArrayLiteralExpression\",\n \"BinaryExpression\",\n \"BindingElement\",\n \"CallExpression\",\n \"Checker\",\n \"ClassDeclaration\",\n \"CompilerHost\",\n \"CompilerOptions\",\n \"CompletionEntry\",\n \"ConfigFileResponse\",\n \"Declaration\",\n \"DeclarationBase\",\n \"DiagnosticResponse\",\n \"ElementAccessExpression\",\n \"EnumDeclaration\",\n \"ExportAssignment\",\n \"ExportDeclaration\",\n \"ExportSpecifier\",\n \"Expression\",\n \"ExpressionBase\",\n \"InterfaceDeclaration\",\n \"JSDocCallbackTag\",\n \"JSDocTagBase\",\n \"JSDocTypedefTag\",\n \"ModuleDeclaration\",\n \"Node\",\n \"NodeHandle\",\n \"NumericLiteral\",\n \"ParameterDeclaration\",\n \"ParseConfigFileHost\",\n \"ParsedCommandLine\",\n \"Program\",\n \"Project\",\n \"PropertyAccessExpression\",\n \"PropertyDeclaration\",\n \"PropertySignature\",\n \"Signature\",\n \"SignatureDeclaration\",\n \"Snapshot\",\n \"SourceFile\",\n \"StringLiteral\",\n \"Symbol\",\n \"Type\",\n \"TypeAliasDeclaration\",\n \"TypeChecker\",\n \"TypeFlags\",\n \"TypeNode\",\n \"TypeNodeBase\",\n \"UnionTypeNode\",\n \"VariableDeclaration\",\n \"VariableDeclarationList\",\n \"WasmTransport\",\n ],\n },\n { from: \"package\" as const, package: \"@codemirror/autocomplete\", name: \"CompletionContext\" },\n ...lintToolReadonlyAllow,\n {\n from: \"package\" as const,\n package: \"react\",\n name: [\n \"ReactNode\",\n \"ButtonHTMLAttributes\",\n \"ChangeEvent\",\n \"ClassAttributes\",\n \"KeyboardEvent\",\n \"SubmitEvent\",\n ],\n },\n { from: \"package\" as const, package: \"clsx\", name: \"ClassValue\" },\n { from: \"package\" as const, package: \"@modelcontextprotocol/server\", name: \"McpServer\" },\n { from: \"package\" as const, package: \"discord.js\", name: [\"Client\", \"Guild\"] },\n {\n from: \"package\" as const,\n package: \"@discordjs/voice\",\n name: [\"AudioPlayer\", \"VoiceConnection\"],\n },\n { from: \"package\" as const, package: \"mdast\", name: [\"Root\", \"RootContent\", \"Yaml\"] },\n { from: \"package\" as const, package: \"@types/mdast\", name: [\"Code\", \"Nodes\"] },\n { from: \"package\" as const, package: \"@types/hast\", name: [\"Element\", \"RootContent\"] },\n { from: \"package\" as const, package: \"ical.js\", name: \"Component\" },\n {\n from: \"package\" as const,\n package: \"@jupyterlab/nbformat\",\n name: [\n \"ICell\",\n \"IDisplayData\",\n \"IExecuteResult\",\n \"INotebookContent\",\n \"IOutput\",\n \"MultilineString\",\n ],\n },\n { from: \"package\" as const, package: \"unpdf\", name: \"PDFDocumentProxy\" },\n { from: \"package\" as const, package: \"@kenjiuno/msgreader\", name: \"FieldsData\" },\n {\n from: \"package\" as const,\n package: \"parse5\",\n name: [\n \"Document\",\n \"DocumentFragment\",\n \"DocumentType\",\n \"Element\",\n \"Template\",\n \"CommentNode\",\n \"TextNode\",\n ],\n },\n { from: \"package\" as const, package: \"postal-mime\", name: [\"Address\", \"Email\"] },\n { from: \"package\" as const, package: \"fflate\", name: [\"Unzipped\"] },\n {\n from: \"package\" as const,\n package: \"@openrouter/sdk\",\n name: [\"DecisionsChoiceAnswer\", \"DecisionsNoulAnswer\", \"DecisionsScoreAnswer\", \"Unknown\"],\n },\n { from: \"package\" as const, package: \"recharts\", name: \"TooltipPayloadEntry\" },\n { from: \"package\" as const, package: \"vfile\", name: \"VFile\" },\n { from: \"package\" as const, package: \"modern-tar\", name: \"ParsedTarEntry\" },\n { from: \"package\" as const, package: \"@zip.js/zip.js\", name: [\"Entry\", \"FileEntry\"] },\n {\n from: \"package\" as const,\n package: \"three\",\n name: [\n \"LoadingManager\",\n \"Object3D\",\n \"WebGLRenderer\",\n \"PerspectiveCamera\",\n \"Scene\",\n \"Sphere\",\n \"BufferAttribute\",\n \"Material\",\n \"Mesh\",\n ],\n },\n {\n from: \"package\" as const,\n package: \"@huggingface/transformers\",\n name: [\"RawImage\", \"PretrainedConfig\", \"PreTrainedModel\", \"Processor\"],\n },\n {\n from: \"package\" as const,\n package: \"effect\",\n name: [\n \"Cause\",\n \"Context\",\n \"Duration\",\n \"Effect\",\n \"Exit\",\n \"Fiber\",\n \"HashMap\",\n \"HashSet\",\n \"HttpServerRequest\",\n \"HttpServerResponse\",\n \"Layer\",\n \"Logger\",\n \"NativeSpan\",\n \"Option\",\n \"Redacted\",\n \"Ref\",\n \"Stream\",\n \"Utc\",\n ],\n },\n];\n\nexport { readonlyParameterAllow };\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 decisionPlugin from \"./decision-rules.ts\";\nimport { alchemyOverride, scriptsOverride } from \"./lint-overrides.config.ts\";\nimport {\n allRulesOf,\n decisionPluginName,\n generated,\n pluginRules,\n restrictedImports,\n shadcnRestyleContracts,\n} from \"./lint.config.ts\";\nimport { readonlyParameterAllow } from \"./readonly-types.config.ts\";\n\ntype LintConfig = NonNullable<UserConfig[\"lint\"]>;\n\nconst resolved = (specifier: string): string => fileURLToPath(import.meta.resolve(specifier));\n\nconst 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: \"shadcn\", specifier: resolved(\"@shadcn/lint\") },\n { name: \"no-comments\", specifier: resolved(\"eslint-plugin-no-comments\") },\n { name: \"baseline-js\", specifier: resolved(\"eslint-plugin-baseline-js\") },\n { name: \"@html-eslint/react\", specifier: resolved(\"@html-eslint/eslint-plugin-react\") },\n { name: \"eslint-js\", specifier: resolved(\"oxlint-plugin-eslint\") },\n { name: decisionPluginName, specifier: resolved(\"@r_masseater/msch/decision-rules\") },\n];\n\nconst rules = {\n \"vite-plus/prefer-vite-plus-imports\": \"error\",\n \"tanstack-start/no-async-client-component\": \"error\",\n \"tanstack-start/no-client-code-in-server-component\": \"error\",\n \"no-comments/disallowComments\": [\n \"error\",\n {\n allow: [\n \"oxlint-disable\",\n \"eslint-disable\",\n String.raw`\\* @internal \\*?$`,\n String.raw`\\* @msch \\S+ \\*?$`,\n \"/usr/bin/env node$\",\n ],\n },\n ],\n ...allRulesOf({ prefix: \"tanstack-query\", rules: tanstackQuery.rules }),\n ...allRulesOf({ prefix: \"tanstack-router\", rules: tanstackRouter.rules }),\n \"drizzle/enforce-delete-with-where\": [\"error\", { drizzleObjectName: [\"db\"] }],\n \"drizzle/enforce-update-with-where\": [\"error\", { drizzleObjectName: [\"db\"] }],\n ...allRulesOf({ prefix: \"shadcn\", rules: shadcn.rules }),\n \"shadcn/no-restyle\": [\"error\", { contracts: shadcnRestyleContracts }],\n ...allRulesOf({ prefix: \"baseline-js\", rules: baselineJs.rules }),\n ...baselineJs.configs.recommended().rules,\n \"baseline-js/use-baseline\": [\n \"error\",\n {\n available: \"widely\",\n includeWebApis: { preset: \"auto\" },\n includeJsBuiltins: { preset: \"auto\" },\n },\n ],\n ...pluginRules,\n \"eslint/sort-imports\": \"off\",\n \"eslint/sort-keys\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/prefer-default-export\": \"off\",\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 \"eslint/one-var\": [\"error\", \"never\"],\n \"eslint/id-length\": [\"error\", { exceptions: [\"x\", \"y\"] }],\n \"jsdoc/check-tag-names\": [\"error\", { definedTags: [\"msch\"] }],\n \"eslint/no-restricted-imports\": [\"error\", restrictedImports],\n \"typescript/prefer-readonly-parameter-types\": [\n \"error\",\n { ignoreInferredTypes: true, allow: readonlyParameterAllow },\n ],\n \"eslint/no-duplicate-imports\": [\"error\", { allowSeparateTypeImports: true }],\n \"react/function-component-definition\": [\n \"error\",\n { namedComponents: \"arrow-function\", unnamedComponents: \"arrow-function\" },\n ],\n \"typescript/no-empty-interface\": [\"error\", { allowSingleExtends: true }],\n \"typescript/no-empty-object-type\": [\"error\", { allowInterfaces: \"with-single-extends\" }],\n \"react/jsx-filename-extension\": [\"error\", { extensions: [\".tsx\"] }],\n \"react/only-export-components\": [\"error\", { allowExportNames: [\"Route\"] }],\n} satisfies LintConfig[\"rules\"];\n\nconst overrides = [\n alchemyOverride,\n {\n files: [\"**/*.config.ts\", \"**/alchemy.*.ts\", \"**/*.worker.ts\", \"**/decision-rules.ts\"],\n rules: { \"import/no-default-export\": \"off\" },\n },\n scriptsOverride,\n] satisfies LintConfig[\"overrides\"];\n\nconst lint = {\n ignorePatterns: generated,\n plugins: [\n \"eslint\",\n \"typescript\",\n \"unicorn\",\n \"oxc\",\n \"import\",\n \"react\",\n \"react-perf\",\n \"jsx-a11y\",\n \"jsdoc\",\n \"promise\",\n \"node\",\n \"effecttsgo\",\n ],\n categories: {\n correctness: \"error\",\n suspicious: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n style: \"error\",\n restriction: \"error\",\n nursery: \"error\",\n },\n jsPlugins,\n rules,\n overrides,\n settings: {\n [decisionPlugin.meta.name]: { model: \"openrouter/typesafe/jev-1.14\" },\n },\n options: {\n typeAware: true,\n typeCheck: true,\n denyWarnings: true,\n reportUnusedDisableDirectives: \"error\",\n },\n} satisfies LintConfig;\n\nexport { lint };\n"],"mappings":";;;;;;;;;;;;AAAA,MAAM,kBAGF;CACF,OAAO,CAAC,mBAAmB;CAC3B,OAAO,EACL,kCAAkC;EAChC;EACA;GACE,UAAU;GACV,SAAS;EACX;EACA;GACE,UACE;GACF,SACE;EACJ;EACA;GACE,UACE;GACF,SACE;EACJ;CACF,EACF;AACF;AAEA,MAAM,kBAGF;CACF,OAAO,CAAC,YAAY;CACpB,OAAO;EACL,4BAA4B;EAC5B,uBAAuB;EACvB,gBAAgB;EAChB,kCAAkC;CACpC;AACF;;AC/BA,MAAM,oBAAuC;CAC3C;CACA;CACA;CACA;AACF;AACA,MAAM,mBAAmB;AACzB,MAAM,WAAW;AAEjB,MAAM,kBAAkB;AACxB,MAAM,iBAAiB;AAEvB,MAAM,gBAA6D;EAChE,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,gCAAgC;EAC9B;EACA;EACA;EACA;EACA;EACA;CACF;EACC,kBAAkB;EAAC;EAAoB;EAAY;CAAU;EAC7D,iBAAiB;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;AAEA,MAAM,uBAAuBA,MAAI,QAAQC,OAAI,UAAU,aAAa,IAAI,CAAC,SAAS,aAChF,KACE,SACAD,MAAI,KAAK,YAAY;CAAE;CAAS;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AAO,+BAA+B,EACtE;CACA,SAAS;EACP,WAAW;EACX,WAAW;EACX,cAAc;EACd,+BAA+B;CACjC;AACF"}
|
|
1
|
+
{"version":3,"file":"lint.mjs","names":["Arr","Rec","Str","effectPresets","decisionPlugin","shadcn","decisionPlugin"],"sources":["../src/lint/lint-overrides.config.ts","../src/lint/lint.config.ts","../src/lint/readonly-lint-tools.config.ts","../src/lint/readonly-types.config.ts","../src/lint/preset.ts"],"sourcesContent":["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 {\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\nconst scriptsOverride: {\n files: string[];\n rules: Readonly<Record<string, \"off\">>;\n} = {\n files: [\"scripts/**\"],\n rules: {\n \"import/no-nodejs-modules\": \"off\",\n \"node/no-process-env\": \"off\",\n \"node/no-sync\": \"off\",\n \"effecttsgo/node-builtin-import\": \"off\",\n },\n};\n\nexport { alchemyOverride, scriptsOverride };\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 REACT_STATE_HOOKS: readonly string[] = [\n \"useState\",\n \"useReducer\",\n \"createContext\",\n \"useContext\",\n];\nconst HAND_WRITTEN_SQL = \"SQL を手書きせず Drizzle のクエリビルダーを使う\";\nconst UI_STATE = \"UI 状態は effect-atom だけで扱う\";\n\nconst INSTRUMENTATION = \"計装は Effect のトレーシングだけで扱う\";\nconst INFRASTRUCTURE = \"インフラは Alchemy の IaC と Cloudflare だけで扱い、wrangler は使わない\";\n\nconst 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 \"フィーチャーフラグは OpenFeature だけで扱う\": [\n \"launchdarkly-*\",\n \"@launchdarkly/*\",\n \"@growthbook/*\",\n \"unleash-client\",\n \"flagsmith\",\n \"@vercel/flags\",\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\nconst requiredStackEntries = Arr.flatMap(Rec.toEntries(requiredStack), ([message, modules]) =>\n pipe(\n modules,\n Arr.map((module) => ({ message, module })),\n ),\n);\n\nconst requiredStackPaths: readonly Readonly<{ name: string; message: string }>[] = Arr.map(\n pipe(\n requiredStackEntries,\n Arr.filter(({ module }) => !Str.includes(\"*\")(module)),\n ),\n ({ message, module }) => ({ name: module, message }),\n);\n\nconst requiredStackPatterns: readonly Readonly<{ group: readonly string[]; message: string }>[] =\n pipe(\n requiredStackEntries,\n Arr.map(({ message, module }) => {\n if (Str.includes(\"*\")(module)) {\n return { group: [module, `${module}/**`], message };\n }\n return { group: [`${module}/**`], message };\n }),\n );\n\nconst restrictedImports = {\n paths: [\n {\n name: \"react\",\n importNames: [...REACT_STATE_HOOKS],\n message: UI_STATE,\n },\n { name: \"drizzle-orm\", importNames: [\"sql\"], message: HAND_WRITTEN_SQL },\n { name: \"drizzle-orm/sql\", message: HAND_WRITTEN_SQL },\n ...requiredStackPaths,\n ],\n patterns: [...requiredStackPatterns],\n};\n\nconst generated = [\n \"**/routeTree.gen.ts\",\n \"**/generated/**\",\n \"**/drizzle/**/snapshot.json\",\n \".claude/skills/**\",\n \".intent/**\",\n \"AGENTS.md\",\n \"skills-lock.json\",\n \".github/release-please/*manifest.json\",\n \"**/*.d.rpp.ts\",\n \"**/src-tauri/gen/**\",\n];\n\nconst asErrors = (names: readonly string[]): Readonly<Record<string, \"error\">> =>\n Rec.fromEntries(\n pipe(\n names,\n Arr.map((name) => [name, \"error\"] as const),\n ),\n );\n\nconst 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\nconst pluginRules: Readonly<Record<string, \"error\">> = {\n ...asErrors(Rec.keys(htmlReact.configs.all.rules ?? {})),\n ...reactHooksRules,\n ...asErrors(eslintReactRuleNames),\n ...asErrors(effectRuleNames),\n};\n\nconst decisionPluginName = decisionPlugin.meta.name;\n\nconst decisionRules = allRulesOf({ prefix: decisionPluginName, rules: decisionPlugin.rules });\n\nconst decisionTestRules = pipe(\n decisionRules,\n Rec.map(() => \"off\" as const),\n);\n\nconst shadcnRestyleContracts = [\n { pattern: \"^Table(Head|Cell)$\", allow: [\"text-alignment\", \"fvn-spacing\"] },\n { pattern: \"^TableCaption$\", allow: [\"caption\", \"text-alignment\", \"mt-*\", \"mb-*\"] },\n];\n\nexport {\n INFRASTRUCTURE,\n INSTRUMENTATION,\n shadcnRestyleContracts,\n allRulesOf,\n decisionPluginName,\n decisionRules,\n decisionTestRules,\n generated,\n pluginRules,\n requiredStack,\n restrictedImports,\n};\n","const lintToolReadonlyAllow = [\n {\n from: \"package\" as const,\n package: \"@oxlint/plugins\",\n name: [\n \"Context\",\n \"Location\",\n \"Node\",\n \"Range\",\n \"Rule\",\n \"RuleMeta\",\n \"SourceCode\",\n \"VisitorWithHooks\",\n ],\n },\n {\n from: \"package\" as const,\n package: \"oxlint\",\n name: [\"InvalidTestCase\", \"Rule\", \"TestCases\", \"ValidTestCase\"],\n },\n { from: \"package\" as const, package: \"@commitlint/types\", name: [\"QualifiedConfig\"] },\n {\n from: \"package\" as const,\n package: \"@textlint/config-loader\",\n name: [\"TextlintLoadPackagesFromRawConfigResult\"],\n },\n { from: \"package\" as const, package: \"markdownlint\", name: [\"LintError\"] },\n {\n from: \"package\" as const,\n package: \"steiger\",\n name: [\"ConfigObject\", \"GlobalIgnore\", \"Plugin\"],\n },\n {\n from: \"file\" as const,\n path: \"upstream/attw-core/lib/checkPackage.d.ts\",\n name: [\"CheckPackageOptions\"],\n },\n {\n from: \"file\" as const,\n path: \"../vite-plus-adopt/dist/attw.d.mts\",\n name: [\"CheckPackageOptions\"],\n },\n {\n from: \"file\" as const,\n path: \"src/types.ts\",\n name: [\"CommitlintConfig\", \"MarkdownlintConfig\", \"TextlintConfig\", \"ToolSections\"],\n },\n {\n from: \"file\" as const,\n name: [\n \"BoundSymbol\",\n \"CompatSymbol\",\n \"CompatType\",\n \"FileBinding\",\n \"SymbolTable\",\n \"TypedContext\",\n ],\n },\n];\n\nexport { lintToolReadonlyAllow };\n","import { lintToolReadonlyAllow } from \"./readonly-lint-tools.config.ts\";\n\nconst WEBGPU_HANDLES: readonly string[] = [\n \"GPUDevice\",\n \"GPUCanvasContext\",\n \"GPUTexture\",\n \"GPUBuffer\",\n \"GPUBindGroup\",\n \"GPUBindGroupLayout\",\n \"GPUPipelineLayout\",\n \"GPURenderPipeline\",\n \"GPUSampler\",\n];\n\nconst BROWSER_HANDLES: readonly string[] = [\n \"HTMLCanvasElement\",\n \"HTMLImageElement\",\n \"HTMLAnchorElement\",\n \"CanvasRenderingContext2D\",\n \"PointerEvent\",\n \"WheelEvent\",\n \"KeyboardEvent\",\n \"MouseEvent\",\n \"AbortSignal\",\n \"ImageBitmap\",\n ...WEBGPU_HANDLES,\n];\n\nconst readonlyParameterAllow = [\n {\n from: \"lib\" as const,\n name: [\n \"HTMLElement\",\n \"HTMLDivElement\",\n \"Worker\",\n \"ReadableStream\",\n \"Request\",\n \"Response\",\n \"Float64Array\",\n \"ArrayBuffer\",\n \"RegExp\",\n \"Uint8Array\",\n \"DataView\",\n \"RegExpExecArray\",\n \"RegExpMatchArray\",\n \"Date\",\n \"SpeechRecognitionResult\",\n ...BROWSER_HANDLES,\n ],\n },\n { from: \"package\" as const, package: \"@webgpu/types\", name: [...WEBGPU_HANDLES] },\n {\n from: \"package\" as const,\n package: \"@cloudflare/workers-types\",\n name: [\n \"AnalyticsEngineDataset\",\n \"Container\",\n \"DurableObjectState\",\n \"DurableObjectStorage\",\n \"KVNamespace\",\n \"R2Bucket\",\n \"SecretsStoreSecret\",\n \"TailEvent\",\n \"Onset\",\n \"Log\",\n \"Exception\",\n \"Attribute\",\n \"SpanUpdateInfo\",\n \"FetchResponseInfo\",\n \"Span\",\n ],\n },\n { from: \"package\" as const, package: \"@alchemy.run/cloudflare\", name: [\"Store\", \"WorkerProps\"] },\n {\n from: \"package\" as const,\n package: \"@bufbuild/protobuf\",\n name: [\"DescMessage\", \"JsonObject\", \"JsonValue\", \"Message\"],\n },\n { from: \"package\" as const, package: \"lighthouse\", name: [\"FlowResult\", \"Step\"] },\n { from: \"package\" as const, package: \"vitest\", name: \"TestProject\" },\n { from: \"package\" as const, package: \"puppeteer-core\", name: [\"Browser\", \"Page\"] },\n { from: \"package\" as const, package: \"miniflare\", name: \"Miniflare\" },\n { from: \"package\" as const, package: \"elysia\", name: \"ElysiaConfig\" },\n { from: \"package\" as const, package: \"@types/node\", name: [\"Request\", \"Response\"] },\n { from: \"package\" as const, package: \"@better-auth/drizzle-adapter\", name: \"DB\" },\n { from: \"package\" as const, package: \"@tanstack/query-core\", name: \"QueryClient\" },\n { from: \"package\" as const, package: \"@codemirror/view\", name: [\"EditorView\", \"ViewUpdate\"] },\n { from: \"package\" as const, package: \"@codemirror/state\", name: [\"Extension\", \"Text\"] },\n { from: \"package\" as const, package: \"@codemirror/lint\", name: \"Diagnostic\" },\n { from: \"package\" as const, package: \"comlink\", name: \"Remote\" },\n {\n from: \"package\" as const,\n package: \"typescript\",\n name: [\n \"API\",\n \"ArrayLiteralExpression\",\n \"BinaryExpression\",\n \"BindingElement\",\n \"CallExpression\",\n \"Checker\",\n \"ClassDeclaration\",\n \"CompilerHost\",\n \"CompilerOptions\",\n \"CompletionEntry\",\n \"ConfigFileResponse\",\n \"Declaration\",\n \"DeclarationBase\",\n \"DiagnosticResponse\",\n \"ElementAccessExpression\",\n \"EnumDeclaration\",\n \"ExportAssignment\",\n \"ExportDeclaration\",\n \"ExportSpecifier\",\n \"Expression\",\n \"ExpressionBase\",\n \"InterfaceDeclaration\",\n \"JSDocCallbackTag\",\n \"JSDocTagBase\",\n \"JSDocTypedefTag\",\n \"ModuleDeclaration\",\n \"Node\",\n \"NodeHandle\",\n \"NumericLiteral\",\n \"ParameterDeclaration\",\n \"ParseConfigFileHost\",\n \"ParsedCommandLine\",\n \"Program\",\n \"Project\",\n \"PropertyAccessExpression\",\n \"PropertyDeclaration\",\n \"PropertySignature\",\n \"Signature\",\n \"SignatureDeclaration\",\n \"Snapshot\",\n \"SourceFile\",\n \"StringLiteral\",\n \"Symbol\",\n \"Type\",\n \"TypeAliasDeclaration\",\n \"TypeChecker\",\n \"TypeFlags\",\n \"TypeNode\",\n \"TypeNodeBase\",\n \"UnionTypeNode\",\n \"VariableDeclaration\",\n \"VariableDeclarationList\",\n \"WasmTransport\",\n ],\n },\n { from: \"package\" as const, package: \"@codemirror/autocomplete\", name: \"CompletionContext\" },\n ...lintToolReadonlyAllow,\n {\n from: \"package\" as const,\n package: \"react\",\n name: [\n \"ReactNode\",\n \"ButtonHTMLAttributes\",\n \"ChangeEvent\",\n \"ClassAttributes\",\n \"KeyboardEvent\",\n \"SubmitEvent\",\n ],\n },\n { from: \"package\" as const, package: \"clsx\", name: \"ClassValue\" },\n {\n from: \"package\" as const,\n package: \"@anthropic-ai/claude-agent-sdk\",\n name: [\"SDKMessage\", \"SDKResultMessage\"],\n },\n {\n from: \"package\" as const,\n package: \"@types/dom-speech-recognition\",\n name: [\"SpeechRecognition\", \"SpeechRecognitionEvent\", \"SpeechRecognitionResult\"],\n },\n { from: \"package\" as const, package: \"@modelcontextprotocol/server\", name: \"McpServer\" },\n { from: \"package\" as const, package: \"discord.js\", name: [\"Client\", \"Guild\"] },\n {\n from: \"package\" as const,\n package: \"@discordjs/voice\",\n name: [\"AudioPlayer\", \"VoiceConnection\"],\n },\n { from: \"package\" as const, package: \"mdast\", name: [\"Root\", \"RootContent\", \"Yaml\"] },\n { from: \"package\" as const, package: \"@types/mdast\", name: [\"Code\", \"Nodes\"] },\n { from: \"package\" as const, package: \"@types/hast\", name: [\"Element\", \"RootContent\"] },\n { from: \"package\" as const, package: \"ical.js\", name: \"Component\" },\n {\n from: \"package\" as const,\n package: \"@jupyterlab/nbformat\",\n name: [\n \"ICell\",\n \"IDisplayData\",\n \"IExecuteResult\",\n \"INotebookContent\",\n \"IOutput\",\n \"MultilineString\",\n ],\n },\n { from: \"package\" as const, package: \"unpdf\", name: \"PDFDocumentProxy\" },\n { from: \"package\" as const, package: \"@kenjiuno/msgreader\", name: \"FieldsData\" },\n {\n from: \"package\" as const,\n package: \"parse5\",\n name: [\n \"Document\",\n \"DocumentFragment\",\n \"DocumentType\",\n \"Element\",\n \"Template\",\n \"CommentNode\",\n \"TextNode\",\n ],\n },\n { from: \"package\" as const, package: \"postal-mime\", name: [\"Address\", \"Email\"] },\n { from: \"package\" as const, package: \"fflate\", name: [\"Unzipped\"] },\n {\n from: \"package\" as const,\n package: \"@openrouter/sdk\",\n name: [\"DecisionsChoiceAnswer\", \"DecisionsNoulAnswer\", \"DecisionsScoreAnswer\", \"Unknown\"],\n },\n { from: \"package\" as const, package: \"recharts\", name: \"TooltipPayloadEntry\" },\n { from: \"package\" as const, package: \"vfile\", name: \"VFile\" },\n { from: \"package\" as const, package: \"modern-tar\", name: \"ParsedTarEntry\" },\n { from: \"package\" as const, package: \"@zip.js/zip.js\", name: [\"Entry\", \"FileEntry\"] },\n {\n from: \"package\" as const,\n package: \"three\",\n name: [\n \"LoadingManager\",\n \"Object3D\",\n \"WebGLRenderer\",\n \"PerspectiveCamera\",\n \"Scene\",\n \"Sphere\",\n \"BufferAttribute\",\n \"Material\",\n \"Mesh\",\n ],\n },\n {\n from: \"package\" as const,\n package: \"@huggingface/transformers\",\n name: [\"RawImage\", \"PretrainedConfig\", \"PreTrainedModel\", \"Processor\"],\n },\n {\n from: \"package\" as const,\n package: \"effect\",\n name: [\n \"Atom\",\n \"Cause\",\n \"Context\",\n \"Duration\",\n \"Effect\",\n \"Exit\",\n \"Fiber\",\n \"HashMap\",\n \"HashSet\",\n \"HttpClientRequest\",\n \"HttpServerRequest\",\n \"HttpServerResponse\",\n \"Layer\",\n \"Logger\",\n \"NativeSpan\",\n \"Option\",\n \"Redacted\",\n \"Ref\",\n \"Stream\",\n \"Utc\",\n \"Writable\",\n ],\n },\n];\n\nexport { readonlyParameterAllow };\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 decisionPlugin from \"./decision-rules.ts\";\nimport { alchemyOverride, scriptsOverride } from \"./lint-overrides.config.ts\";\nimport {\n allRulesOf,\n decisionPluginName,\n generated,\n pluginRules,\n restrictedImports,\n shadcnRestyleContracts,\n} from \"./lint.config.ts\";\nimport { readonlyParameterAllow } from \"./readonly-types.config.ts\";\n\ntype LintConfig = NonNullable<UserConfig[\"lint\"]>;\n\nconst resolved = (specifier: string): string => fileURLToPath(import.meta.resolve(specifier));\n\nconst 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: \"shadcn\", specifier: resolved(\"@shadcn/lint\") },\n { name: \"no-comments\", specifier: resolved(\"eslint-plugin-no-comments\") },\n { name: \"baseline-js\", specifier: resolved(\"eslint-plugin-baseline-js\") },\n { name: \"@html-eslint/react\", specifier: resolved(\"@html-eslint/eslint-plugin-react\") },\n { name: \"eslint-js\", specifier: resolved(\"oxlint-plugin-eslint\") },\n { name: decisionPluginName, specifier: resolved(\"@r_masseater/msch/decision-rules\") },\n];\n\nconst rules = {\n \"vite-plus/prefer-vite-plus-imports\": \"error\",\n \"tanstack-start/no-async-client-component\": \"error\",\n \"tanstack-start/no-client-code-in-server-component\": \"error\",\n \"no-comments/disallowComments\": [\n \"error\",\n {\n allow: [\n \"oxlint-disable\",\n \"eslint-disable\",\n String.raw`\\* @internal \\*?$`,\n String.raw`\\* @msch \\S+ \\*?$`,\n \"/usr/bin/env node$\",\n ],\n },\n ],\n ...allRulesOf({ prefix: \"tanstack-query\", rules: tanstackQuery.rules }),\n ...allRulesOf({ prefix: \"tanstack-router\", rules: tanstackRouter.rules }),\n \"drizzle/enforce-delete-with-where\": [\"error\", { drizzleObjectName: [\"db\"] }],\n \"drizzle/enforce-update-with-where\": [\"error\", { drizzleObjectName: [\"db\"] }],\n ...allRulesOf({ prefix: \"shadcn\", rules: shadcn.rules }),\n \"shadcn/no-restyle\": [\"error\", { contracts: shadcnRestyleContracts }],\n ...allRulesOf({ prefix: \"baseline-js\", rules: baselineJs.rules }),\n ...baselineJs.configs.recommended().rules,\n \"baseline-js/use-baseline\": [\n \"error\",\n {\n available: \"widely\",\n includeWebApis: { preset: \"auto\" },\n includeJsBuiltins: { preset: \"auto\" },\n },\n ],\n ...pluginRules,\n \"eslint/sort-imports\": \"off\",\n \"eslint/sort-keys\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/prefer-default-export\": \"off\",\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 \"eslint/one-var\": [\"error\", \"never\"],\n \"eslint/id-length\": [\"error\", { exceptions: [\"x\", \"y\"] }],\n \"jsdoc/check-tag-names\": [\"error\", { definedTags: [\"msch\"] }],\n \"eslint/no-restricted-imports\": [\"error\", restrictedImports],\n \"typescript/prefer-readonly-parameter-types\": [\n \"error\",\n { ignoreInferredTypes: true, allow: readonlyParameterAllow },\n ],\n \"eslint/no-duplicate-imports\": [\"error\", { allowSeparateTypeImports: true }],\n \"react/function-component-definition\": [\n \"error\",\n { namedComponents: \"arrow-function\", unnamedComponents: \"arrow-function\" },\n ],\n \"typescript/no-empty-interface\": [\"error\", { allowSingleExtends: true }],\n \"typescript/no-empty-object-type\": [\"error\", { allowInterfaces: \"with-single-extends\" }],\n \"react/jsx-filename-extension\": [\"error\", { extensions: [\".tsx\"] }],\n \"react/only-export-components\": [\"error\", { allowExportNames: [\"Route\"] }],\n} satisfies LintConfig[\"rules\"];\n\nconst overrides = [\n alchemyOverride,\n {\n files: [\"**/*.config.ts\", \"**/alchemy.*.ts\", \"**/*.worker.ts\", \"**/decision-rules.ts\"],\n rules: { \"import/no-default-export\": \"off\" },\n },\n scriptsOverride,\n] satisfies LintConfig[\"overrides\"];\n\nconst lint = {\n ignorePatterns: generated,\n plugins: [\n \"eslint\",\n \"typescript\",\n \"unicorn\",\n \"oxc\",\n \"import\",\n \"react\",\n \"react-perf\",\n \"jsx-a11y\",\n \"jsdoc\",\n \"promise\",\n \"node\",\n \"effecttsgo\",\n ],\n categories: {\n correctness: \"error\",\n suspicious: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n style: \"error\",\n restriction: \"error\",\n nursery: \"error\",\n },\n jsPlugins,\n rules,\n overrides,\n settings: {\n [decisionPlugin.meta.name]: { model: \"openrouter/typesafe/jev-1.14\" },\n },\n options: {\n typeAware: true,\n typeCheck: true,\n denyWarnings: true,\n reportUnusedDisableDirectives: \"error\",\n },\n} satisfies LintConfig;\n\nexport { lint };\n"],"mappings":";;;;;;;;;;;;AAAA,MAAM,kBAGF;CACF,OAAO,CAAC,mBAAmB;CAC3B,OAAO,EACL,kCAAkC;EAChC;EACA;GACE,UAAU;GACV,SAAS;EACX;EACA;GACE,UACE;GACF,SACE;EACJ;EACA;GACE,UACE;GACF,SACE;EACJ;CACF,EACF;AACF;AAEA,MAAM,kBAGF;CACF,OAAO,CAAC,YAAY;CACpB,OAAO;EACL,4BAA4B;EAC5B,uBAAuB;EACvB,gBAAgB;EAChB,kCAAkC;CACpC;AACF;;AC/BA,MAAM,oBAAuC;CAC3C;CACA;CACA;CACA;AACF;AACA,MAAM,mBAAmB;AACzB,MAAM,WAAW;AAEjB,MAAM,kBAAkB;AACxB,MAAM,iBAAiB;AAEvB,MAAM,gBAA6D;EAChE,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,gCAAgC;EAC9B;EACA;EACA;EACA;EACA;EACA;CACF;EACC,kBAAkB;EAAC;EAAoB;EAAY;CAAU;EAC7D,iBAAiB;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;AAEA,MAAM,uBAAuBA,MAAI,QAAQC,OAAI,UAAU,aAAa,IAAI,CAAC,SAAS,aAChF,KACE,SACAD,MAAI,KAAK,YAAY;CAAE;CAAS;AAAO,EAAE,CAC3C,CACF;AAEA,MAAM,qBAA6EA,MAAI,IACrF,KACE,sBACAA,MAAI,QAAQ,EAAE,aAAa,CAACE,SAAI,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,CACvD,IACC,EAAE,SAAS,cAAc;C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CACA,SAAS;EACP,WAAW;EACX,WAAW;EACX,cAAc;EACd,+BAA+B;CACjC;AACF"}
|
package/dist/oxlint.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ProblemList, r as describeFinding, t as JSON_FLAG } from "./cli-contract-
|
|
1
|
+
import { n as ProblemList, r as describeFinding, t as JSON_FLAG } from "./cli-contract-BRpk_UKr.mjs";
|
|
2
2
|
import { Array, Option, Schema, pipe } from "effect";
|
|
3
3
|
import { execFileSync } from "node:child_process";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-contract-Wo9XK0jk.mjs","names":["Str","Arr","nodeServicesLayer","Rec","Arr","Str","Arr","Str","Arr"],"sources":["../src/repository-files.ts","../src/dependencies.ts","../src/syntax.ts","../src/problem.ts","../src/cli-contract.ts"],"sourcesContent":["import { layer as nodeServicesLayer } from \"@effect/platform-node/NodeServices\";\nimport {\n Array as Arr,\n Context,\n Effect,\n FileSystem,\n Layer,\n Path,\n Stream,\n String as Str,\n pipe,\n} from \"effect\";\nimport type { Option } from \"effect\";\nimport { ChildProcess, ChildProcessSpawner } from \"effect/process\";\n\nconst GENERATED_PATHSPEC = \":(attr:linguist-generated)\";\n\nclass RepositoryFiles extends Context.Service<\n RepositoryFiles,\n {\n readonly readFile: (file: string) => Effect.Effect<Option.Option<string>>;\n readonly exists: (file: string) => Effect.Effect<boolean>;\n readonly realPath: (file: string) => Effect.Effect<string>;\n readonly readDirectory: (directory: string) => Effect.Effect<readonly string[]>;\n readonly generatedFiles: (root: string) => Effect.Effect<readonly string[]>;\n readonly isDirectory: (file: string) => Effect.Effect<Option.Option<boolean>>;\n readonly join: (...segments: readonly string[]) => string;\n readonly resolve: (...segments: readonly string[]) => string;\n readonly relative: (from: string, to: string) => string;\n readonly dirname: (file: string) => string;\n readonly basename: (file: string) => string;\n }\n>()(\"@r_masseater/msch/repository-files/RepositoryFiles\") {}\n\nconst nodeRepositoryFiles = Layer.effect(\n RepositoryFiles,\n Effect.gen(function* nodeRepositoryFiles() {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;\n const generatedFiles = (root: string): Effect.Effect<readonly string[]> =>\n Effect.gen(function* listGenerated() {\n const handle = yield* ChildProcess.make(\n \"git\",\n [\"ls-files\", \"-z\", \"--\", GENERATED_PATHSPEC],\n {\n cwd: root,\n stdin: \"ignore\",\n },\n );\n const listed = yield* handle.stdout.pipe(Stream.decodeText(), Stream.mkString);\n return pipe(\n Str.split(listed, \"\\0\"),\n Arr.filter(Str.isNonEmpty),\n Arr.map((file) => path.join(root, file)),\n );\n }).pipe(\n Effect.scoped,\n Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),\n Effect.orElseSucceed((): readonly string[] => []),\n );\n return RepositoryFiles.of({\n generatedFiles,\n readFile: (file) => fs.readFileString(file).pipe(Effect.option),\n exists: (file) => fs.exists(file).pipe(Effect.orElseSucceed(() => false)),\n realPath: (file) => fs.realPath(file).pipe(Effect.orElseSucceed(() => file)),\n readDirectory: (directory) =>\n fs.readDirectory(directory).pipe(Effect.orElseSucceed((): readonly string[] => [])),\n isDirectory: (file) =>\n fs.stat(file).pipe(\n Effect.map((info) => info.type === \"Directory\"),\n Effect.option,\n ),\n join: (...segments) => path.join(...segments),\n resolve: (...segments) => path.resolve(...segments),\n relative: (from, to) => path.relative(from, to),\n dirname: (file) => path.dirname(file),\n basename: (file) => path.basename(file),\n });\n }),\n).pipe(Layer.provide(nodeServicesLayer));\n\nexport { RepositoryFiles, nodeRepositoryFiles };\n","import {\n Array as Arr,\n Effect,\n Option,\n Order,\n Predicate,\n Schema,\n String as Str,\n Record as Rec,\n pipe,\n} from \"effect\";\n\nimport { RepositoryFiles } from \"./repository-files.ts\";\n\ninterface DependencyEntry {\n readonly packageName: string;\n readonly specifier: string;\n readonly declarationsPath: string;\n}\n\nconst DependencyMap = Schema.optional(Schema.Record(Schema.String, Schema.String));\n\nconst PackageManifest = Schema.Struct({\n name: Schema.optional(Schema.String),\n dependencies: DependencyMap,\n devDependencies: DependencyMap,\n peerDependencies: DependencyMap,\n exports: Schema.optional(Schema.Unknown),\n types: Schema.optional(Schema.String),\n typings: Schema.optional(Schema.String),\n main: Schema.optional(Schema.String),\n});\n\ntype Manifest = typeof PackageManifest.Type;\n\nconst MANIFEST_FILE = \"package.json\";\nconst NODE_MODULES = \"node_modules\";\nconst WORKSPACE_PROTOCOL = \"workspace:\";\nconst ROOT_SUBPATH = \".\";\nconst SUBPATH_PREFIX = \"./\";\nconst WILDCARD = \"*\";\nconst TYPES_CONDITION = \"types\";\nconst TYPES_SCOPE = \"@types/\";\nconst TYPES_SCOPE_SEPARATOR = \"__\";\nconst CONDITION_DEPTH_LIMIT = 8;\nconst ROOT_DEPTH = 0;\nconst DEPTH_STEP = 1;\nconst DECLARATIONS_SUFFIX = /\\.d\\.[cm]?ts$|\\.[cm]?tsx?$/u;\nconst SCRIPT_SUFFIX = /\\.(?<module>[cm]?)js$/u;\n\nconst readManifest = Effect.fn(\"readManifest\")(function* readManifest(directory: string) {\n const files = yield* RepositoryFiles;\n const manifestText = yield* files.readFile(files.join(directory, MANIFEST_FILE));\n const text = yield* Effect.fromOption(manifestText);\n return yield* Schema.decodeEffect(Schema.fromJsonString(PackageManifest))(text);\n}, Effect.option);\n\nconst conditionsOf = (held: unknown): readonly (readonly [string, unknown])[] => {\n if (!Predicate.isObject(held)) {\n return [];\n }\n return Rec.toEntries(held);\n};\n\nconst typesConditionIn = (held: unknown, depth: number): Option.Option<string> => {\n if (depth > CONDITION_DEPTH_LIMIT) {\n return Option.none();\n }\n const entries = conditionsOf(held);\n const declared = Arr.findFirst(entries, ([condition, target]) =>\n Option.liftPredicate(\n target,\n (candidate) => condition === TYPES_CONDITION && Predicate.isString(candidate),\n ),\n ).pipe(Option.filter(Predicate.isString));\n return Option.orElse(declared, () =>\n Arr.findFirst(entries, ([, nested]) => typesConditionIn(nested, depth + DEPTH_STEP)),\n );\n};\n\nconst anyConditionIn = (held: unknown, depth: number): Option.Option<string> => {\n if (Predicate.isString(held)) {\n return Option.some(held);\n }\n if (depth > CONDITION_DEPTH_LIMIT) {\n return Option.none();\n }\n return Arr.findFirst(conditionsOf(held), ([, nested]) =>\n anyConditionIn(nested, depth + DEPTH_STEP),\n );\n};\n\nconst targetPathsOf = (target: unknown): readonly string[] =>\n Arr.getSomes([typesConditionIn(target, ROOT_DEPTH), anyConditionIn(target, ROOT_DEPTH)]);\n\ninterface SubpathTarget {\n readonly subpath: string;\n readonly target: unknown;\n}\n\nconst subpathTargetsOf = (exportsField: unknown): readonly SubpathTarget[] => {\n if (Predicate.isString(exportsField)) {\n return [{ subpath: ROOT_SUBPATH, target: exportsField }];\n }\n const entries = conditionsOf(exportsField);\n if (\n !pipe(\n entries,\n Arr.some(([subpath]) => Str.startsWith(ROOT_SUBPATH)(subpath)),\n )\n ) {\n return Arr.match(entries, {\n onEmpty: () => [],\n onNonEmpty: () => [{ subpath: ROOT_SUBPATH, target: exportsField }],\n });\n }\n return pipe(\n entries,\n Arr.filter(([subpath]) => subpath === ROOT_SUBPATH || Str.startsWith(SUBPATH_PREFIX)(subpath)),\n Arr.filter(([subpath]) => !Str.includes(WILDCARD)(subpath)),\n Arr.map(([subpath, target]) => ({ subpath, target })),\n );\n};\n\nconst declarationsCandidateFor = (entryPath: string): Option.Option<string> => {\n if (DECLARATIONS_SUFFIX.test(entryPath)) {\n return Option.some(entryPath);\n }\n if (!SCRIPT_SUFFIX.test(entryPath)) {\n return Option.none();\n }\n return Option.some(Str.replace(SCRIPT_SUFFIX, \".d.$<module>ts\")(entryPath));\n};\n\nconst firstDeclarationsAmong = Effect.fn(\"firstDeclarationsAmong\")(function* firstDeclarations(\n directory: string,\n entryPaths: readonly string[],\n) {\n const files = yield* RepositoryFiles;\n const candidates = Arr.getSomes(\n pipe(\n entryPaths,\n Arr.map((entryPath) => declarationsCandidateFor(entryPath)),\n ),\n );\n const existing = yield* Effect.filter(\n pipe(\n candidates,\n Arr.map((candidate) => files.join(directory, candidate)),\n ),\n (candidate) => files.exists(candidate),\n );\n return yield* Option.match(Arr.head(existing), {\n onNone: (): Effect.Effect<Option.Option<string>> => Effect.succeedNone,\n onSome: (candidate) => files.realPath(candidate).pipe(Effect.asSome),\n });\n});\n\nconst importNameOf = (packageName: string): string => {\n if (!Str.startsWith(TYPES_SCOPE)(packageName)) {\n return packageName;\n }\n const unscoped = Str.slice(TYPES_SCOPE.length)(packageName);\n if (!Str.includes(TYPES_SCOPE_SEPARATOR)(unscoped)) {\n return unscoped;\n }\n return `@${Str.replace(TYPES_SCOPE_SEPARATOR, \"/\")(unscoped)}`;\n};\n\nconst specifierFor = (packageName: string, subpath: string): string => {\n const importName = importNameOf(packageName);\n if (subpath === ROOT_SUBPATH) {\n return importName;\n }\n return `${importName}/${Str.slice(SUBPATH_PREFIX.length)(subpath)}`;\n};\n\nconst rootEntryPaths = (manifest: Manifest): readonly string[] =>\n Arr.getSomes([\n Option.fromUndefinedOr(manifest.types),\n Option.fromUndefinedOr(manifest.typings),\n Option.fromUndefinedOr(manifest.main),\n ]);\n\nconst subpathEntriesOf = Effect.fn(\"subpathEntriesOf\")(function* subpathEntriesOf(\n packageName: string,\n directory: string,\n manifest: Manifest,\n) {\n const found = yield* Effect.forEach(subpathTargetsOf(manifest.exports), ({ subpath, target }) =>\n firstDeclarationsAmong(directory, targetPathsOf(target)).pipe(\n Effect.map(\n Option.map((declarationsPath) => ({\n packageName,\n specifier: specifierFor(packageName, subpath),\n declarationsPath,\n })),\n ),\n ),\n );\n return Arr.getSomes(found);\n});\n\nconst entriesOfDependency = Effect.fn(\"entriesOfDependency\")(function* entriesOfDependency(\n packageName: string,\n directory: string,\n) {\n const manifest = yield* readManifest(directory);\n if (Option.isNone(manifest)) {\n return [];\n }\n const subpathEntries = yield* subpathEntriesOf(packageName, directory, manifest.value);\n const rootSpecifier = specifierFor(packageName, ROOT_SUBPATH);\n if (\n pipe(\n subpathEntries,\n Arr.some((entry) => entry.specifier === rootSpecifier),\n )\n ) {\n return subpathEntries;\n }\n const rootDeclarations = yield* firstDeclarationsAmong(directory, rootEntryPaths(manifest.value));\n const rootEntries = rootDeclarations.pipe(\n Option.map((declarationsPath) => ({ packageName, specifier: rootSpecifier, declarationsPath })),\n Option.toArray,\n );\n return [...rootEntries, ...subpathEntries];\n});\n\nconst declaredDependencies = (manifest: Manifest): readonly string[] =>\n pipe(\n Rec.toEntries({\n ...manifest.dependencies,\n ...manifest.devDependencies,\n ...manifest.peerDependencies,\n }),\n Arr.filter(([, range]) => !Str.startsWith(WORKSPACE_PROTOCOL)(range)),\n Arr.map(([packageName]) => packageName),\n );\n\nconst workspaceDependencies = (manifest: Manifest): readonly string[] =>\n pipe(\n Rec.toEntries({ ...manifest.dependencies, ...manifest.devDependencies }),\n Arr.filter(([, range]) => Str.startsWith(WORKSPACE_PROTOCOL)(range)),\n Arr.map(([packageName]) => packageName),\n );\n\nconst entryOrder = Order.mapInput(Order.String, (entry: DependencyEntry) => entry.specifier);\n\nconst dependencyEntries = Effect.fn(\"dependencyEntries\")(function* dependencyEntries(\n packageDirectory: string,\n) {\n const files = yield* RepositoryFiles;\n const manifest = yield* readManifest(packageDirectory);\n if (Option.isNone(manifest)) {\n return [];\n }\n const entries = yield* Effect.forEach(declaredDependencies(manifest.value), (packageName) =>\n entriesOfDependency(packageName, files.join(packageDirectory, NODE_MODULES, packageName)),\n );\n return Arr.sort(\n Arr.dedupeWith(entries.flat(), (left, right) => left.specifier === right.specifier),\n entryOrder,\n );\n});\n\nexport { MANIFEST_FILE, NODE_MODULES, dependencyEntries, readManifest, workspaceDependencies };\nexport type { DependencyEntry, Manifest };\n","import { Array as Arr, Option, String as Str, pipe } from \"effect\";\n\nimport {\n isEnumDeclaration,\n isExportDeclaration,\n isIdentifier,\n isImportDeclaration,\n isInterfaceDeclaration,\n isStringLiteral,\n isTypeAliasDeclaration,\n SyntaxKind,\n} from \"./compiler.ts\";\nimport type {\n Checker,\n Declaration,\n EnumDeclaration,\n InterfaceDeclaration,\n Node,\n Program,\n SourceFile,\n TypeSymbol,\n Type,\n TypeAliasDeclaration,\n} from \"./compiler.ts\";\nimport { NODE_MODULES } from \"./dependencies.ts\";\n\nconst NODE_MODULES_SEGMENT = `/${NODE_MODULES}/`;\n\nconst POSITION_BASE = 1;\n\nconst uniqueByReference = <Item>(items: readonly Item[]): readonly Item[] =>\n Arr.dedupeWith(items, (left, right) => left === right);\n\nconst childrenOf = (node: Node): readonly Node[] => {\n const children: Node[] = [];\n node.forEachChild((child) => {\n children.push(child);\n });\n return children;\n};\n\nconst descendantsOf = (node: Node): readonly Node[] =>\n pipe(\n childrenOf(node),\n Arr.flatMap((child) => Arr.prepend(descendantsOf(child), child)),\n );\n\nconst isExternalFile =\n (program: Program) =>\n (sourceFile: SourceFile): boolean =>\n Str.includes(NODE_MODULES_SEGMENT)(sourceFile.fileName) ||\n program.isSourceFileFromExternalLibrary(sourceFile);\n\nconst isExternalDeclaration =\n (program: Program) =>\n (declaration: Node): boolean =>\n isExternalFile(program)(declaration.getSourceFile());\n\nconst ALIAS_KINDS: ReadonlySet<SyntaxKind> = new Set([\n SyntaxKind.ImportSpecifier,\n SyntaxKind.ImportClause,\n SyntaxKind.NamespaceImport,\n SyntaxKind.ExportSpecifier,\n SyntaxKind.ImportEqualsDeclaration,\n SyntaxKind.ExportAssignment,\n]);\n\nconst declarationsOf = (symbol: TypeSymbol): readonly Declaration[] =>\n pipe(\n symbol.declarations,\n Arr.flatMap((handle) => Option.toArray(Option.fromUndefinedOr(handle.resolve()))),\n );\n\nconst isAliasDeclaration = (declaration: Node): boolean => ALIAS_KINDS.has(declaration.kind);\n\nconst resolvedSymbol =\n (checker: Checker) =>\n (symbol: TypeSymbol): TypeSymbol => {\n if (\n !pipe(\n declarationsOf(symbol),\n Arr.some((declaration) => isAliasDeclaration(declaration)),\n )\n ) {\n return symbol;\n }\n return checker.getAliasedSymbol(symbol);\n };\n\nconst symbolAt =\n (checker: Checker) =>\n (node: Node): Option.Option<TypeSymbol> =>\n Option.fromUndefinedOr(checker.getSymbolAtLocation(node)).pipe(\n Option.map(resolvedSymbol(checker)),\n );\n\nconst referencedSymbols =\n (checker: Checker) =>\n (node: Node): readonly TypeSymbol[] => {\n const identifiers = pipe(\n Arr.prepend(descendantsOf(node), node),\n Arr.filter((candidate) => isIdentifier(candidate)),\n );\n const symbols = pipe(\n checker.getSymbolAtLocation(identifiers),\n Arr.flatMap((symbol) => Option.toArray(Option.fromUndefinedOr(symbol))),\n Arr.map(resolvedSymbol(checker)),\n );\n return uniqueByReference(symbols);\n };\n\nconst lineOf = (node: Node): number => {\n const sourceFile = node.getSourceFile();\n return sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line + POSITION_BASE;\n};\n\nconst columnOf = (node: Node): number => {\n const sourceFile = node.getSourceFile();\n return (\n sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).character + POSITION_BASE\n );\n};\n\nconst contains =\n (outer: Node) =>\n (inner: Node): boolean =>\n outer.getSourceFile().fileName === inner.getSourceFile().fileName &&\n outer.getStart() <= inner.getStart() &&\n inner.getEnd() <= outer.getEnd();\n\nconst isTypeDeclaration = (\n declaration: Node,\n): declaration is TypeAliasDeclaration | InterfaceDeclaration | EnumDeclaration =>\n isTypeAliasDeclaration(declaration) ||\n isInterfaceDeclaration(declaration) ||\n isEnumDeclaration(declaration);\n\nconst isGenericDeclaration = (declaration: Node): boolean =>\n (isTypeAliasDeclaration(declaration) || isInterfaceDeclaration(declaration)) &&\n Arr.isReadonlyArrayNonEmpty(declaration.typeParameters ?? []);\n\nconst propertyNamesOf =\n (checker: Checker) =>\n (type: Type): readonly string[] =>\n pipe(\n checker.getPropertiesOfType(type),\n Arr.map((property) => property.name),\n );\n\nconst moduleSpecifierOf = (statement: Node): Option.Option<string> => {\n if (!isImportDeclaration(statement) && !isExportDeclaration(statement)) {\n return Option.none();\n }\n return Option.fromUndefinedOr(statement.moduleSpecifier).pipe(\n Option.filter((specifier) => isStringLiteral(specifier)),\n Option.map((specifier) => specifier.text),\n );\n};\n\nconst importedModulesOf = (sourceFile: SourceFile): readonly string[] =>\n pipe(\n sourceFile.statements,\n Arr.map((statement) => moduleSpecifierOf(statement)),\n Arr.getSomes,\n );\n\nexport {\n NODE_MODULES_SEGMENT,\n POSITION_BASE,\n childrenOf,\n columnOf,\n contains,\n declarationsOf,\n descendantsOf,\n importedModulesOf,\n isExternalDeclaration,\n isGenericDeclaration,\n isTypeDeclaration,\n lineOf,\n propertyNamesOf,\n referencedSymbols,\n resolvedSymbol,\n symbolAt,\n uniqueByReference,\n};\n","import { Array as Arr, Order, Schema, pipe } from \"effect\";\n\nimport type { Node } from \"./compiler.ts\";\nimport { columnOf, lineOf } from \"./syntax.ts\";\n\nconst RuleNameSchema = Schema.Literals([\n \"owner-annotation\",\n \"duplicate-value-set\",\n \"owner-value-set\",\n \"owner-extension\",\n \"owned-literal\",\n \"library-value-set\",\n \"library-shape\",\n \"unused-override\",\n \"removable-override\",\n]);\n\ntype RuleName = typeof RuleNameSchema.Type;\n\nconst ProblemSchema = Schema.Struct({\n file: Schema.String,\n line: Schema.Int,\n column: Schema.Int,\n rule: RuleNameSchema,\n message: Schema.String,\n});\n\ntype Problem = typeof ProblemSchema.Type;\n\nconst ProblemList = Schema.Array(ProblemSchema);\n\nconst CANDIDATE_LIMIT = 3;\n\ninterface Finding {\n readonly rule: RuleName;\n readonly message: string;\n}\n\nconst problemAt =\n ({ rule, message }: Finding) =>\n (node: Node): Problem => ({\n file: node.getSourceFile().fileName,\n line: lineOf(node),\n column: columnOf(node),\n rule,\n message,\n });\n\nconst problemOrder: Order.Order<Problem> = Order.combineAll([\n Order.mapInput(Order.String, (problem: Problem) => problem.file),\n Order.mapInput(Order.Number, (problem: Problem) => problem.line),\n Order.mapInput(Order.Number, (problem: Problem) => problem.column),\n Order.mapInput(Order.String, (problem: Problem) => problem.rule),\n Order.mapInput(Order.String, (problem: Problem) => problem.message),\n]);\n\nconst problemKey = (problem: Problem): string =>\n pipe(\n [problem.file, String(problem.line), String(problem.column), problem.rule, problem.message],\n Arr.join(\"\\0\"),\n );\n\nconst sortProblems = (problems: readonly Problem[]): readonly Problem[] =>\n Arr.sort(\n Arr.dedupeWith(problems, (left, right) => problemKey(left) === problemKey(right)),\n problemOrder,\n );\n\nconst describeFinding = (problem: Problem): string => `[${problem.rule}] ${problem.message}`;\n\nconst formatProblem =\n (relative: (file: string) => string) =>\n (problem: Problem): string =>\n `${relative(problem.file)}:${String(problem.line)}:${String(problem.column)} ${describeFinding(problem)}`;\n\nexport { CANDIDATE_LIMIT, ProblemList, describeFinding, formatProblem, problemAt, sortProblems };\nexport type { Finding, Problem, RuleName };\n","const JSON_FLAG = \"--json\";\n\nexport { JSON_FLAG };\n"],"mappings":";;;;;;;AAeA,MAAM,qBAAqB;AAE3B,IAAM,kBAAN,cAA8B,QAAQ,QAepC,CAAC,CAAC,oDAAoD,CAAC,CAAC,CAAC;AAE3D,MAAM,sBAAsB,MAAM,OAChC,iBACA,OAAO,IAAI,UAAU,sBAAsB;CACzC,MAAM,KAAK,OAAO,WAAW;CAC7B,MAAM,OAAO,OAAO,KAAK;CACzB,MAAM,UAAU,OAAO,oBAAoB;CAC3C,MAAM,kBAAkB,SACtB,OAAO,IAAI,UAAU,gBAAgB;EASnC,MAAM,SAAS,QAAO,OARA,aAAa,KACjC,OACA;GAAC;GAAY;GAAM;GAAM;EAAkB,GAC3C;GACE,KAAK;GACL,OAAO;EACT,CACF,EAAA,CAC6B,OAAO,KAAK,OAAO,WAAW,GAAG,OAAO,QAAQ;EAC7E,OAAO,KACLA,SAAI,MAAM,QAAQ,IAAI,GACtBC,MAAI,OAAOD,SAAI,UAAU,GACzBC,MAAI,KAAK,SAAS,KAAK,KAAK,MAAM,IAAI,CAAC,CACzC;CACF,CAAC,CAAC,CAAC,KACD,OAAO,QACP,O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