@r_masseater/msch 0.117.1 → 0.117.3
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 +31 -7
- package/dist/cli.mjs.map +1 -1
- package/dist/config.mjs +2 -2
- package/dist/decision-rules.mjs +1 -1
- package/dist/{define-lint-preset-un6ctQig.mjs → define-lint-preset-D_gAe4V_.mjs} +5 -2
- package/dist/{define-lint-preset-un6ctQig.mjs.map → define-lint-preset-D_gAe4V_.mjs.map} +1 -1
- package/dist/lint.mjs +1 -1
- package/dist/{repository-text-Cl6JiEYE.mjs → repository-text-DluK673j.mjs} +12 -6
- package/dist/{repository-text-Cl6JiEYE.mjs.map → repository-text-DluK673j.mjs.map} +1 -1
- package/package.json +3 -2
package/dist/config.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as requiredStack, g as decisionTestRules, p as lint$1, r as markdownOf, s as structureOf, x as exempt } from "./define-lint-preset-
|
|
1
|
+
import { f as requiredStack, g as decisionTestRules, p as lint$1, r as markdownOf, s as structureOf, x as exempt } from "./define-lint-preset-D_gAe4V_.mjs";
|
|
2
2
|
import { a as nodeServicesLayer, i as nodeRepositoryFiles, r as RepositoryFiles, s as groupOf } from "./repository-files-BU_wY36C.mjs";
|
|
3
|
-
import { d as isDirectoryAt, f as isIgnored, h as patternOf, i as textlintOf, l as tasksOf, m as namedWorkspaces, p as staticPrefix, r as secretsOf, u as existsAt } from "./repository-text-
|
|
3
|
+
import { d as isDirectoryAt, f as isIgnored, h as patternOf, i as textlintOf, l as tasksOf, m as namedWorkspaces, p as staticPrefix, r as secretsOf, u as existsAt } from "./repository-text-DluK673j.mjs";
|
|
4
4
|
import { Array, Effect, Layer, ManagedRuntime, Option, Record, String, pipe } from "effect";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { definePlugin, defineRule } from "@r_masseater/fu4";
|
package/dist/decision-rules.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { _ as default } from "./define-lint-preset-
|
|
1
|
+
export { _ as default } from "./define-lint-preset-D_gAe4V_.mjs";
|
|
@@ -704,7 +704,10 @@ const textlintPresets = {
|
|
|
704
704
|
// src/features/define-lint-preset/config/textlint-filters.config.ts
|
|
705
705
|
const isFilter = (value) => Predicate.isFunction(value);
|
|
706
706
|
const filterIn = (specifier, loaded) => pipe(Option.liftPredicate(loaded, isFilter), Option.getOrThrowWith(() => /* @__PURE__ */ new TypeError(`${specifier} does not export a textlint filter`)));
|
|
707
|
-
const textlintFilters = {
|
|
707
|
+
const textlintFilters = {
|
|
708
|
+
comments: filterIn("textlint-filter-rule-comments", createRequire(import.meta.url)("textlint-filter-rule-comments")),
|
|
709
|
+
"node-types": filterIn("textlint-filter-rule-node-types", createRequire(import.meta.url)("textlint-filter-rule-node-types"))
|
|
710
|
+
};
|
|
708
711
|
// src/features/define-lint-preset/config/zenn-markdown.config.ts
|
|
709
712
|
const CONTAINER_FENCE = ":::";
|
|
710
713
|
const LINE_BREAK = "\n";
|
|
@@ -792,4 +795,4 @@ const markdownOf = ({ indexSkill, docs = {} }) => {
|
|
|
792
795
|
};
|
|
793
796
|
export { decision_rules_default as _, textlintFilters as a, removalPolicyOverride as b, videoRules as c, INSTRUMENTATION as d, requiredStack as f, decisionTestRules as g, decisionRules as h, zennMarkdown as i, remotionRules as l, allRulesOf as m, MARKDOWN_RULES as n, textlintPresets as o, lint as p, markdownOf as r, structureOf as s, MARKDOWN_IGNORES as t, tracedRules as u, alchemyOverride as v, exempt as x, commandsOverride as y };
|
|
794
797
|
|
|
795
|
-
//# sourceMappingURL=define-lint-preset-
|
|
798
|
+
//# sourceMappingURL=define-lint-preset-D_gAe4V_.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-lint-preset-un6ctQig.mjs","names":["Rec","Arr","Str","effectPresets","decisionPlugin","shadcn","Str","Arr","Rec","Str","Arr"],"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/zenn-markdown.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","export const resourceRules = {\n \"msch-lint/worker-logpush\": \"error\",\n \"msch-lint/worker-cpu-limit\": \"error\",\n \"msch-lint/attributed-model-call\": \"error\",\n \"msch-lint/gated-model-call\": \"error\",\n \"msch-lint/gated-model-request\": \"error\",\n \"msch-lint/workers-ai-through-runner\": \"error\",\n \"msch-lint/ai-gateway-logs\": \"error\",\n \"msch-lint/ai-gateway-spend-limit\": \"error\",\n \"msch-lint/ai-gateway-cache\": \"error\",\n} as const;\n\nexport const removalPolicyOverride: {\n files: string[];\n excludeFiles: string[];\n rules: Readonly<Record<string, \"error\">>;\n} = {\n files: [\"**/*.ts\"],\n excludeFiles: [\"**/*.test.ts\"],\n rules: { \"msch-lint/protected-storage\": \"error\" },\n};\n\nexport const alchemyOverride: {\n files: string[];\n rules: Readonly<Record<string, \"error\">>;\n} = {\n files: [\"**/alchemy.run.ts\"],\n rules: {\n \"msch-lint/stack-named-by-app\": \"error\",\n \"msch-lint/stack-checks-app-prefix\": \"error\",\n },\n};\n\nexport const commandsOverride: {\n files: string[];\n rules: Readonly<Record<string, \"error\">>;\n} = {\n files: [\"**/bin/**\"],\n rules: {\n \"msch-lint/wiring-only-commands\": \"error\",\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\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\nexport const testHonestyRules = {\n \"msch-lint/no-test-doubles\": \"error\",\n \"msch-lint/no-flake-masking\": \"error\",\n} satisfies LintRules;\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 commandsOverride,\n removalPolicyOverride,\n resourceRules,\n} from \"./lint-overrides.config.ts\";\nimport {\n allRulesOf,\n decisionPluginName,\n pluginRules,\n shadcnRestyleContracts,\n webGuidanceRules,\n} from \"./lint.config.ts\";\nimport { testHonestyRules, 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(\"@r_masseater/msch/baseline-rules\") },\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 \"import/no-namespace\": \"off\",\n ...testRules,\n ...webGuidanceRules,\n \"msch-lint/array-from-async\": \"error\",\n \"msch-lint/declared-arguments\": \"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/namespace-as-value\": \"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 \"import/no-unassigned-import\": [\"error\", { allow: [\"**/*.css\", \"reflect-metadata\"] }],\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 ...resourceRules,\n \"effecttsgo/missing-pipeable-signature\": \"off\",\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/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: [\"**/*.test.ts\", \"**/*.test.tsx\", \"**/*.test.support.ts\", \"**/vite.config.ts\"],\n rules: { \"msch-lint/declared-arguments\": \"off\", ...testHonestyRules },\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 = {};\nconst CONTEXT = 0;\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\ntype Context = Parameters<Reporter>[typeof CONTEXT];\n\nconst reportingJapanese = (context: Context): Context => ({\n get id() {\n return context.id;\n },\n get Syntax() {\n return context.Syntax;\n },\n get severity() {\n return context.severity;\n },\n get RuleError() {\n return context.RuleError;\n },\n get fixer() {\n return context.fixer;\n },\n get locator() {\n return context.locator;\n },\n getFilePath: () => context.getFilePath(),\n getSource: (node, beforeCount, afterCount) => context.getSource(node, beforeCount, afterCount),\n getConfigBaseDir: () => context.getConfigBaseDir(),\n report: (node, error) => {\n if (JAPANESE.test(context.getSource(node))) {\n context.report(node, error);\n }\n },\n});\n\nconst japaneseOnly =\n (reporter: Reporter): Reporter =>\n (context, options) => {\n if (JAPANESE.test(context.getSource())) {\n return reporter(reportingJapanese(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 markdown from \"@textlint/textlint-plugin-markdown\";\nimport type { TextlintPluginOptions } from \"@textlint/types\";\nimport { Array as Arr, Option, String as Str, pipe } from \"effect\";\n\nconst CONTAINER_FENCE = \":::\";\nconst LINE_BREAK = \"\\n\";\nconst BLANK = \" \";\nconst IMAGE_SIZE = /(?<=!\\[[^\\]]*\\]\\(\\S+) =\\d*x\\d*(?=\\))/gu;\nconst NEXT = 1;\n\ntype MarkdownProcessor = InstanceType<typeof markdown.Processor>;\ntype Processing = ReturnType<MarkdownProcessor[\"processor\"]>;\n\nconst spaces = (text: string): string => Str.repeat(text.length)(BLANK);\n\nconst sizeIndices = (line: string): readonly number[] =>\n pipe(\n Arr.fromIterable(Str.matchAll(IMAGE_SIZE)(line)),\n Arr.flatMap((found) =>\n pipe(\n Option.fromUndefinedOr(found.index),\n Option.map((start) =>\n pipe(\n Arr.head(found),\n Option.map((size) => Arr.range(start, start + size.length - NEXT)),\n Option.getOrElse((): readonly number[] => []),\n ),\n ),\n Option.getOrElse((): readonly number[] => []),\n ),\n ),\n );\n\nconst withoutImageSizes = (line: string): string => {\n const blankAt = sizeIndices(line);\n return pipe(\n Str.split(\"\")(line),\n Arr.map((character, index) => {\n if (Arr.contains(blankAt, index)) {\n return BLANK;\n }\n return character;\n }),\n Arr.join(\"\"),\n );\n};\n\nconst blankedLine = (line: string): string => {\n if (Str.startsWith(CONTAINER_FENCE)(line)) {\n return spaces(line);\n }\n return withoutImageSizes(line);\n};\n\nconst blanked = (text: string): string =>\n pipe(text, Str.split(LINE_BREAK), Arr.map(blankedLine), Arr.join(LINE_BREAK));\n\nclass ZennMarkdownProcessor {\n private readonly markdown: MarkdownProcessor;\n\n public constructor(options?: TextlintPluginOptions) {\n this.markdown = new markdown.Processor(options);\n }\n\n public availableExtensions(): string[] {\n return this.markdown.availableExtensions();\n }\n\n public processor(extension: string): Processing {\n const { preProcess, postProcess } = this.markdown.processor(extension);\n return {\n preProcess: (text, filePath) => preProcess(blanked(text), filePath),\n postProcess,\n };\n }\n}\n\nexport const zennMarkdown = { Processor: ZennMarkdownProcessor };\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,MAAa,gBAAgB;CAC3B,4BAA4B;CAC5B,8BAA8B;CAC9B,mCAAmC;CACnC,8BAA8B;CAC9B,iCAAiC;CACjC,uCAAuC;CACvC,6BAA6B;CAC7B,oCAAoC;CACpC,8BAA8B;AAChC;AAEA,MAAa,wBAIT;CACF,OAAO,CAAC,SAAS;CACjB,cAAc,CAAC,cAAc;CAC7B,OAAO,EAAE,+BAA+B,QAAQ;AAClD;AAEA,MAAa,kBAGT;CACF,OAAO,CAAC,mBAAmB;CAC3B,OAAO;EACL,gCAAgC;EAChC,qCAAqC;CACvC;AACF;AAEA,MAAa,mBAGT;CACF,OAAO,CAAC,WAAW;CACnB,OAAO,EACL,kCAAkC,QACpC;AACF;;ACvCA,IAAA,yBAAe,qBAAqB;CAClC,MAAM;CACN,OAAO;EACL,mBAAmB;GACjB,IAAI;GACJ,QAAQ;GACR,UACE;GACF,SAAS;GACT,QAAQ;EACV,CAAC;EACD,mBAAmB;GACjB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;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;EACA;CACF;CACA,kCAAkC;EAChC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,oBAAoB;EAClB;EACA;EACA;EACA;EACA;EACA;CACF;CACA,4BAA4B;EAC1B;EACA;EACA;EACA;EACA;CACF;CACA,sEAAsE;EACpE;EACA;EACA;EACA;EACA;EACA;CACF;EACC,kBAAkB;EAAC;EAAoB;EAAY;CAAU;EAC7D,iBAAiB;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;;ACrLA,MAAa,cAAc;CACzB,2BAA2B;CAC3B,+BAA+B;AACjC;;ACCA,MAAa,gBAAgB,WAAW;CAAE,QAAQ;CAAa,OAAO,SAAS;AAAM,CAAC;;ACoBtF,MAAa,cAAc,EAAE,KAAK,QAAQ,SAAS,CAAC,SACjD;CACC,uBAAuB,CAAC,SAAS,GAAG;CACpC,4BAA4B;CAC5B,0BAA0B,CAAC,SAAS;EAAE;EAAQ;CAAO,CAAC;AACxD;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,GAAG,QAAQ;GAClE;EACF;CACF;AACF;AAEA,MAAa,eAAe,EAAE,WAAW,sBAAsB;;ACpE/D,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"}
|
|
1
|
+
{"version":3,"file":"define-lint-preset-D_gAe4V_.mjs","names":["Rec","Arr","Str","effectPresets","decisionPlugin","shadcn","Str","Arr","Rec","Str","Arr"],"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/zenn-markdown.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","export const resourceRules = {\n \"msch-lint/worker-logpush\": \"error\",\n \"msch-lint/worker-cpu-limit\": \"error\",\n \"msch-lint/attributed-model-call\": \"error\",\n \"msch-lint/gated-model-call\": \"error\",\n \"msch-lint/gated-model-request\": \"error\",\n \"msch-lint/workers-ai-through-runner\": \"error\",\n \"msch-lint/ai-gateway-logs\": \"error\",\n \"msch-lint/ai-gateway-spend-limit\": \"error\",\n \"msch-lint/ai-gateway-cache\": \"error\",\n} as const;\n\nexport const removalPolicyOverride: {\n files: string[];\n excludeFiles: string[];\n rules: Readonly<Record<string, \"error\">>;\n} = {\n files: [\"**/*.ts\"],\n excludeFiles: [\"**/*.test.ts\"],\n rules: { \"msch-lint/protected-storage\": \"error\" },\n};\n\nexport const alchemyOverride: {\n files: string[];\n rules: Readonly<Record<string, \"error\">>;\n} = {\n files: [\"**/alchemy.run.ts\"],\n rules: {\n \"msch-lint/stack-named-by-app\": \"error\",\n \"msch-lint/stack-checks-app-prefix\": \"error\",\n },\n};\n\nexport const commandsOverride: {\n files: string[];\n rules: Readonly<Record<string, \"error\">>;\n} = {\n files: [\"**/bin/**\"],\n rules: {\n \"msch-lint/wiring-only-commands\": \"error\",\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\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\nexport const testHonestyRules = {\n \"msch-lint/no-test-doubles\": \"error\",\n \"msch-lint/no-flake-masking\": \"error\",\n} satisfies LintRules;\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 commandsOverride,\n removalPolicyOverride,\n resourceRules,\n} from \"./lint-overrides.config.ts\";\nimport {\n allRulesOf,\n decisionPluginName,\n pluginRules,\n shadcnRestyleContracts,\n webGuidanceRules,\n} from \"./lint.config.ts\";\nimport { testHonestyRules, 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(\"@r_masseater/msch/baseline-rules\") },\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 \"import/no-namespace\": \"off\",\n ...testRules,\n ...webGuidanceRules,\n \"msch-lint/array-from-async\": \"error\",\n \"msch-lint/declared-arguments\": \"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/namespace-as-value\": \"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 \"import/no-unassigned-import\": [\"error\", { allow: [\"**/*.css\", \"reflect-metadata\"] }],\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 ...resourceRules,\n \"effecttsgo/missing-pipeable-signature\": \"off\",\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/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: [\"**/*.test.ts\", \"**/*.test.tsx\", \"**/*.test.support.ts\", \"**/vite.config.ts\"],\n rules: { \"msch-lint/declared-arguments\": \"off\", ...testHonestyRules },\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 = {};\nconst CONTEXT = 0;\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\ntype Context = Parameters<Reporter>[typeof CONTEXT];\n\nconst reportingJapanese = (context: Context): Context => ({\n get id() {\n return context.id;\n },\n get Syntax() {\n return context.Syntax;\n },\n get severity() {\n return context.severity;\n },\n get RuleError() {\n return context.RuleError;\n },\n get fixer() {\n return context.fixer;\n },\n get locator() {\n return context.locator;\n },\n getFilePath: () => context.getFilePath(),\n getSource: (node, beforeCount, afterCount) => context.getSource(node, beforeCount, afterCount),\n getConfigBaseDir: () => context.getConfigBaseDir(),\n report: (node, error) => {\n if (JAPANESE.test(context.getSource(node))) {\n context.report(node, error);\n }\n },\n});\n\nconst japaneseOnly =\n (reporter: Reporter): Reporter =>\n (context, options) => {\n if (JAPANESE.test(context.getSource())) {\n return reporter(reportingJapanese(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 \"node-types\": filterIn(\n \"textlint-filter-rule-node-types\",\n createRequire(import.meta.url)(\"textlint-filter-rule-node-types\"),\n ),\n };\n","import markdown from \"@textlint/textlint-plugin-markdown\";\nimport type { TextlintPluginOptions } from \"@textlint/types\";\nimport { Array as Arr, Option, String as Str, pipe } from \"effect\";\n\nconst CONTAINER_FENCE = \":::\";\nconst LINE_BREAK = \"\\n\";\nconst BLANK = \" \";\nconst IMAGE_SIZE = /(?<=!\\[[^\\]]*\\]\\(\\S+) =\\d*x\\d*(?=\\))/gu;\nconst NEXT = 1;\n\ntype MarkdownProcessor = InstanceType<typeof markdown.Processor>;\ntype Processing = ReturnType<MarkdownProcessor[\"processor\"]>;\n\nconst spaces = (text: string): string => Str.repeat(text.length)(BLANK);\n\nconst sizeIndices = (line: string): readonly number[] =>\n pipe(\n Arr.fromIterable(Str.matchAll(IMAGE_SIZE)(line)),\n Arr.flatMap((found) =>\n pipe(\n Option.fromUndefinedOr(found.index),\n Option.map((start) =>\n pipe(\n Arr.head(found),\n Option.map((size) => Arr.range(start, start + size.length - NEXT)),\n Option.getOrElse((): readonly number[] => []),\n ),\n ),\n Option.getOrElse((): readonly number[] => []),\n ),\n ),\n );\n\nconst withoutImageSizes = (line: string): string => {\n const blankAt = sizeIndices(line);\n return pipe(\n Str.split(\"\")(line),\n Arr.map((character, index) => {\n if (Arr.contains(blankAt, index)) {\n return BLANK;\n }\n return character;\n }),\n Arr.join(\"\"),\n );\n};\n\nconst blankedLine = (line: string): string => {\n if (Str.startsWith(CONTAINER_FENCE)(line)) {\n return spaces(line);\n }\n return withoutImageSizes(line);\n};\n\nconst blanked = (text: string): string =>\n pipe(text, Str.split(LINE_BREAK), Arr.map(blankedLine), Arr.join(LINE_BREAK));\n\nclass ZennMarkdownProcessor {\n private readonly markdown: MarkdownProcessor;\n\n public constructor(options?: TextlintPluginOptions) {\n this.markdown = new markdown.Processor(options);\n }\n\n public availableExtensions(): string[] {\n return this.markdown.availableExtensions();\n }\n\n public processor(extension: string): Processing {\n const { preProcess, postProcess } = this.markdown.processor(extension);\n return {\n preProcess: (text, filePath) => preProcess(blanked(text), filePath),\n postProcess,\n };\n }\n}\n\nexport const zennMarkdown = { Processor: ZennMarkdownProcessor };\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,MAAa,gBAAgB;CAC3B,4BAA4B;CAC5B,8BAA8B;CAC9B,mCAAmC;CACnC,8BAA8B;CAC9B,iCAAiC;CACjC,uCAAuC;CACvC,6BAA6B;CAC7B,oCAAoC;CACpC,8BAA8B;AAChC;AAEA,MAAa,wBAIT;CACF,OAAO,CAAC,SAAS;CACjB,cAAc,CAAC,cAAc;CAC7B,OAAO,EAAE,+BAA+B,QAAQ;AAClD;AAEA,MAAa,kBAGT;CACF,OAAO,CAAC,mBAAmB;CAC3B,OAAO;EACL,gCAAgC;EAChC,qCAAqC;CACvC;AACF;AAEA,MAAa,mBAGT;CACF,OAAO,CAAC,WAAW;CACnB,OAAO,EACL,kCAAkC,QACpC;AACF;;ACvCA,IAAA,yBAAe,qBAAqB;CAClC,MAAM;CACN,OAAO;EACL,mBAAmB;GACjB,IAAI;GACJ,QAAQ;GACR,UACE;GACF,SAAS;GACT,QAAQ;EACV,CAAC;EACD,mBAAmB;GACjB,IAAI;GACJ,QAAQ;GACR,UACE;GACF,SAAS;GACT,QAAQ;EACV,CAAC;EACD,mBAAmB;GACjB,IAAI;GACJ,QAAQ;GACR,UACE;GACF,SAAS;GACT,QAAQ;EACV,CAAC;CACH;AACF,CAAC;;AC1B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EACA;EACA;EACA;CACF;CACA,yBAAyB;EACvB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,uCAAuC;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,qCAAqC;EACnC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yCAAyC;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yCAAyC;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,8DAA8D,CAAC,QAAQ;CACvE,gCAAgC;EAC9B;EACA;EACA;EACA;EACA;EACA;CACF;CACA,kCAAkC;EAChC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,oBAAoB;EAClB;EACA;EACA;EACA;EACA;EACA;CACF;CACA,4BAA4B;EAC1B;EACA;EACA;EACA;EACA;CACF;CACA,sEAAsE;EACpE;EACA;EACA;EACA;EACA;EACA;CACF;EACC,kBAAkB;EAAC;EAAoB;EAAY;CAAU;EAC7D,iBAAiB;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;;ACrLA,MAAa,cAAc;CACzB,2BAA2B;CAC3B,+BAA+B;AACjC;;ACCA,MAAa,gBAAgB,WAAW;CAAE,QAAQ;CAAa,OAAO,SAAS;AAAM,CAAC;;ACoBtF,MAAa,cAAc,EAAE,KAAK,QAAQ,SAAS,CAAC,SACjD;CACC,uBAAuB,CAAC,SAAS,GAAG;CACpC,4BAA4B;CAC5B,0BAA0B,CAAC,SAAS;EAAE;EAAQ;CAAO,CAAC;AACxD;;ACxBF,MAAM,WAAW,UAAU,IAAIC,OAAI,WAAW,GAAQ,CAAC;AAOvD,MAAa,eAAe,EAAE,SAAS,qBACrC,UAAU;CACR,OAAO;EAAC,UAAU,EAAE,OAAO,QAAQ,CAAC;EAAG,UAAU;EAA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pB,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"}
|
package/dist/lint.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { d as INSTRUMENTATION, t as MARKDOWN_IGNORES, n as MARKDOWN_RULES, v as alchemyOverride, m as allRulesOf, y as commandsOverride, _ as decisionPlugin, h as decisionRules, g as decisionTestRules, x as exempt, p as lint, r as markdownOf, l as remotionRules, b as removalPolicyOverride, f as requiredStack, s as structureOf, a as textlintFilters, o as textlintPresets, u as tracedRules, c as videoRules, i as zennMarkdown } from "./define-lint-preset-
|
|
1
|
+
export { d as INSTRUMENTATION, t as MARKDOWN_IGNORES, n as MARKDOWN_RULES, v as alchemyOverride, m as allRulesOf, y as commandsOverride, _ as decisionPlugin, h as decisionRules, g as decisionTestRules, x as exempt, p as lint, r as markdownOf, l as remotionRules, b as removalPolicyOverride, f as requiredStack, s as structureOf, a as textlintFilters, o as textlintPresets, u as tracedRules, c as videoRules, i as zennMarkdown } from "./define-lint-preset-D_gAe4V_.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as RepositoryFiles } from "./repository-files-BU_wY36C.mjs";
|
|
2
2
|
import { c as TASK_NAMES, i as workspaceProjects } from "./workspace-projects-DYfp6Tpn.mjs";
|
|
3
|
-
import { a as textlintFilters, i as zennMarkdown, o as textlintPresets, x as exempt } from "./define-lint-preset-
|
|
3
|
+
import { a as textlintFilters, i as zennMarkdown, o as textlintPresets, x as exempt } from "./define-lint-preset-D_gAe4V_.mjs";
|
|
4
4
|
import { i as USAGE_SPOOL } from "./config-W6Uy7bV8.mjs";
|
|
5
5
|
import { Array, Effect, Option, Record, String as String$1, pipe } from "effect";
|
|
6
6
|
import { betterleaks } from "@r_masseater/h56m/presets";
|
|
@@ -223,6 +223,11 @@ const TEXT_IGNORES = [
|
|
|
223
223
|
];
|
|
224
224
|
const ZENN_MARKDOWN = "zenn-markdown";
|
|
225
225
|
const QUOTATION = String.raw`/「[^」]*」/`;
|
|
226
|
+
const ELLIPSIS = "…";
|
|
227
|
+
const TEXT_FILTERS = {
|
|
228
|
+
comments: true,
|
|
229
|
+
"node-types": { nodeTypes: ["BlockQuote"] }
|
|
230
|
+
};
|
|
226
231
|
const SENTENCE_LENGTH = 120;
|
|
227
232
|
const KANJI_RUN = 6;
|
|
228
233
|
const PUBLIC_LINES = [
|
|
@@ -245,7 +250,8 @@ const builtRules = (properNouns, style) => ({
|
|
|
245
250
|
max: KANJI_RUN,
|
|
246
251
|
allow: [...properNouns]
|
|
247
252
|
},
|
|
248
|
-
"no-exclamation-question-mark": { allow: [QUOTATION, ...properNouns] }
|
|
253
|
+
"no-exclamation-question-mark": { allow: [QUOTATION, ...properNouns] },
|
|
254
|
+
"ja-no-successive-word": { allow: [ELLIPSIS] }
|
|
249
255
|
}
|
|
250
256
|
});
|
|
251
257
|
const builtTextRuleNames = Record.keys(builtRules([], "である"));
|
|
@@ -261,7 +267,7 @@ const textlintOf = ({ properNouns = [], rules = {}, sources = [], articles }) =>
|
|
|
261
267
|
...rules,
|
|
262
268
|
...builtRules(properNouns, "ですます")
|
|
263
269
|
},
|
|
264
|
-
filters:
|
|
270
|
+
filters: TEXT_FILTERS
|
|
265
271
|
}], () => Array.isReadonlyArrayNonEmpty(articles));
|
|
266
272
|
return {
|
|
267
273
|
ignores: [...TEXT_IGNORES, ...articles],
|
|
@@ -273,9 +279,9 @@ const textlintOf = ({ properNouns = [], rules = {}, sources = [], articles }) =>
|
|
|
273
279
|
files: [...files],
|
|
274
280
|
plugins: { ...plugins },
|
|
275
281
|
rules: textRules,
|
|
276
|
-
filters:
|
|
282
|
+
filters: TEXT_FILTERS
|
|
277
283
|
})), Array.appendAll(articleSources)),
|
|
278
|
-
filters:
|
|
284
|
+
filters: TEXT_FILTERS,
|
|
279
285
|
rules: textRules
|
|
280
286
|
};
|
|
281
287
|
};
|
|
@@ -289,4 +295,4 @@ const secretsOf = () => ({
|
|
|
289
295
|
});
|
|
290
296
|
export { CI_TASKS as a, meteredCommand as c, isDirectoryAt as d, isIgnored as f, patternOf as h, textlintOf as i, tasksOf as l, namedWorkspaces as m, builtTextRuleNames as n, MSCH_TASK_COMMANDS as o, staticPrefix as p, secretsOf as r, MSCH_VERIFY_COMMANDS as s, TEXT_IGNORES as t, existsAt as u };
|
|
291
297
|
|
|
292
|
-
//# sourceMappingURL=repository-text-
|
|
298
|
+
//# sourceMappingURL=repository-text-DluK673j.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository-text-Cl6JiEYE.mjs","names":["Arr","Str","Arr","Str","Arr","Rec","Rec","Arr"],"sources":["../src/entities/workspace/model/workspace-names.ts","../src/shared/lib/path-existence.ts","../src/app/repository-tasks.ts","../src/app/repository-text.ts"],"sourcesContent":["import { Array as Arr, Effect, Option, String as Str, pipe } from \"effect\";\n\nimport { RepositoryFiles } from \"#/shared/lib/repository-files.ts\";\n\nimport { workspaceProjects } from \"./workspace-projects.ts\";\nimport type { WorkspaceProject } from \"./workspace-projects.ts\";\n\nconst ALTERNATIVE = \"|\";\nconst SCOPE = /^@[^/]+\\//u;\nconst SPECIAL = /[$()*+.?[\\\\\\]^{|}]/gu;\n\nexport interface NamedWorkspace {\n readonly directory: string;\n readonly names: readonly string[];\n readonly packageName: Option.Option<string>;\n}\n\n/** @internal */\nexport const patternOf = (names: readonly string[]): RegExp => {\n const alternatives = pipe(names, Arr.map(Str.replaceAll(SPECIAL, String.raw`\\$&`)));\n return new RegExp(\n `(?<![\\\\p{L}\\\\p{N}_-])(?:${Arr.join(alternatives, ALTERNATIVE)})(?![\\\\p{L}\\\\p{N}_-])`,\n \"gu\",\n );\n};\n\nconst namedIn =\n (basename: (directory: string) => string) =>\n ({ directory, packageName }: WorkspaceProject): NamedWorkspace => {\n const unscoped = pipe(packageName, Option.map(Str.replace(SCOPE, \"\")));\n const names = pipe(\n [Option.some(directory), Option.some(basename(directory)), packageName, unscoped],\n Arr.getSomes,\n Arr.dedupe,\n );\n return { directory, names, packageName };\n };\n\n/** @internal */\nexport const namedWorkspaces = Effect.fn(\"namedWorkspaces\")(function* namedWorkspaces(\n root: string,\n) {\n const files = yield* RepositoryFiles;\n const projects = yield* workspaceProjects(root);\n return pipe(projects, Arr.map(namedIn((directory) => files.basename(directory))));\n});\n","import { Array as Arr, Effect, Option, String as Str } from \"effect\";\n\nimport { RepositoryFiles } from \"#/shared/lib/repository-files.ts\";\n\nconst WILDCARD = /[*?[]/u;\nconst SEPARATOR = \"/\";\nconst FIRST = 0;\n\n/** @internal */\nexport const existsAt = Effect.fn(\"existsAt\")(function* existsAt(root: string, path: string) {\n const files = yield* RepositoryFiles;\n return yield* files.exists(files.join(root, path));\n});\n\n/** @internal */\nexport const isDirectoryAt = Effect.fn(\"isDirectoryAt\")(function* isDirectoryAt(\n root: string,\n path: string,\n) {\n const files = yield* RepositoryFiles;\n const directory = yield* files.isDirectory(files.join(root, path));\n return Option.getOrElse(directory, () => false);\n});\n\n/** @internal */\nexport const staticPrefix = (path: string): string => {\n const prefix = Arr.headNonEmpty(Str.split(path, WILDCARD));\n if (Str.endsWith(SEPARATOR)(prefix)) {\n return Str.slice(FIRST, -SEPARATOR.length)(prefix);\n }\n return prefix;\n};\n\n/** @internal */\nexport const isIgnored = Effect.fn(\"isIgnored\")(function* isIgnored(root: string, path: string) {\n const prefix = staticPrefix(path);\n if (Str.isEmpty(prefix)) {\n return false;\n }\n const files = yield* RepositoryFiles;\n const ignored = yield* files.ignoredPaths(root, [prefix, `${prefix}${SEPARATOR}`]);\n return Arr.isReadonlyArrayNonEmpty(ignored);\n});\n","import { Array as Arr, Option, Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport { TASK_NAMES } from \"#/entities/workspace/index.ts\";\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\nimport { USAGE_SPOOL } from \"#/shared/config/index.ts\";\n\ntype Tasks = NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]>;\n\nexport interface UsageOptions {\n readonly endpoint: string;\n readonly apiKeyEnv?: string;\n}\n\nexport interface TaskOptions {\n readonly workspace: WorkspaceSettings;\n readonly commands: Readonly<Record<string, string>>;\n readonly usage: Option.Option<UsageOptions>;\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_FILES = [\"package.json\", \"pnpm-workspace.yaml\", \"pnpm-lock.yaml\", \".npmrc\"];\n\nconst AUDIT = Arr.join(\n [\n 'copy=\"$(mktemp -d)\"',\n `trap 'rm -rf \"$copy\"' EXIT`,\n `for file in ${Arr.join(AUDIT_FILES, \" \")}; do if [ -f \"$file\" ]; then cp \"$file\" \"$copy/\"; fi; done`,\n '(cd \"$copy\" && vp pm audit --fix >/dev/null) || exit',\n `added=\"$(diff pnpm-workspace.yaml \"$copy/pnpm-workspace.yaml\" | sed -n 's/^> \\\\(.*\\\\)$/\\\\1 # exit: unused/p')\"`,\n 'if [ -z \"$added\" ]; then exit 0; fi',\n `printf '%s\\\\n' \"vp pm audit --fix found vulnerable versions. First update them within their ranges with vp update -r --no-save <package>... -- --depth Infinity. For each one still reported by vp pm audit, add its line to overrides in pnpm-workspace.yaml and run vp install:\" \"$added\" >&2`,\n \"exit 1\",\n ],\n \"; \",\n);\n\nconst BROKER_TOKEN = `GH_TOKEN=\"\\${GITHUB_APP_TOKEN:-$GH_TOKEN}\"`;\nconst AGENT_STATE = `\"\\${RUNNER_TEMP:-\\${TMPDIR:-/tmp}}/msch-agents\"`;\n\nconst DAILY = `msch exits; ${BROKER_TOKEN} msch upstream; ${BROKER_TOKEN} msch callers; ${BROKER_TOKEN} msch refs; refs=$?; msch agents ${AGENT_STATE} && exit \"$refs\"`;\n\nconst TEST = \"msch changed -- vp test run --passWithNoTests\";\n\nexport const MSCH_VERIFY_COMMANDS = {\n fallow: FALLOW,\n check: CHECK,\n msch: \"msch\",\n audit: AUDIT,\n published: \"msch published\",\n compat: COMPAT,\n} as const;\n\nexport const MSCH_TASK_COMMANDS = { ...MSCH_VERIFY_COMMANDS, test: TEST } as const;\n\nexport const CI_TASKS = [TASK_NAMES.verify, TASK_NAMES.test] as const;\n\nconst USAGE_TASK = \"usage\";\n\nconst METERED_TASKS = [\"check\", \"msch\"] as const;\n\nexport const meteredCommand = (command: string): string =>\n `USAGE_METER_SPOOL=\"$PWD/${USAGE_SPOOL}\" ${command}`;\n\nconst usageCommandOf = ({ endpoint, apiKeyEnv }: UsageOptions): string =>\n pipe(\n Option.fromUndefinedOr(apiKeyEnv),\n Option.match({\n onNone: () => `msch usage --endpoint ${endpoint}`,\n onSome: (name) => `msch usage --endpoint ${endpoint} --api-key-env ${name}`,\n }),\n );\n\nconst commandOf =\n (usage: Option.Option<UsageOptions>) =>\n (command: string): string =>\n Option.match(usage, { onNone: () => command, onSome: () => meteredCommand(command) });\n\nconst usageTasks = (usage: Option.Option<UsageOptions>): Tasks =>\n Option.match(usage, {\n onNone: (): Tasks => ({}),\n onSome: (options): Tasks => ({\n [USAGE_TASK]: {\n command: usageCommandOf(options),\n dependsOn: [...METERED_TASKS],\n cache: false,\n },\n }),\n });\n\nexport const tasksOf = ({\n workspace,\n commands,\n usage,\n}: TaskOptions): NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]> => {\n const inputs = [{ auto: true }, ...workspace.ignoredDirectories, ...NOT_INPUTS];\n const run = commandOf(usage);\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: run(CHECK),\n cache: { input: inputs, untrackedEnv: UNTRACKED_ENV },\n },\n msch: {\n command: run(MSCH_VERIFY_COMMANDS.msch),\n dependsOn: [\"check\", ...workspace.tasks.native],\n cache: false,\n },\n audit: { command: AUDIT, cache: false },\n published: { command: MSCH_TASK_COMMANDS.published, cache: false },\n compat: { command: COMPAT, dependsOn: [\"msch\", \"fallow\"], cache: false },\n ...usageTasks(usage),\n };\n return {\n ...checks,\n test: {\n command: TEST,\n dependsOn: [\"check\", ...workspace.tasks.native],\n cache: { input: [...inputs, \"!**/.cache/**\"] },\n },\n daily: { command: DAILY, dependsOn: [...workspace.tasks.native], cache: false },\n verify: { command: [], dependsOn: [...workspace.tasks.verify, ...Rec.keys(checks)] },\n ci: { command: [], dependsOn: [...CI_TASKS, ...workspace.tasks.test] },\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 {\n textlintFilters,\n textlintPresets,\n zennMarkdown,\n} 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 interface BuiltTextOptions extends TextOptions {\n readonly articles: readonly string[];\n}\n\nexport const TEXT_IGNORES = [\n \"AGENTS.md\",\n \"CLAUDE.md\",\n \".agents/skills/**\",\n \"CHANGELOG.md\",\n ...exempt,\n];\nconst ZENN_MARKDOWN = \"zenn-markdown\";\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\ntype Style = \"である\" | \"ですます\";\n\nconst builtRules = (\n properNouns: readonly string[],\n style: Style,\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: style, preferInList: style },\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 articles,\n}: BuiltTextOptions): NonNullable<ToolSections[\"textlint\"]> => {\n const textRules = { ...rules, ...builtRules(properNouns, \"である\") };\n const articleSources = Arr.filter(\n [\n {\n files: [...articles],\n plugins: { [ZENN_MARKDOWN]: true },\n rules: { ...rules, ...builtRules(properNouns, \"ですます\") },\n filters: { comments: true },\n } satisfies Source,\n ],\n () => Arr.isReadonlyArrayNonEmpty(articles),\n );\n return {\n ignores: [...TEXT_IGNORES, ...articles],\n presets: textlintPresets,\n filterModules: textlintFilters,\n pluginModules: { [ZENN_MARKDOWN]: zennMarkdown },\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 Arr.appendAll(articleSources),\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":";;;;;;;AAOA,MAAM,cAAc;AACpB,MAAM,QAAQ;AACd,MAAM,UAAU;;AAShB,MAAa,aAAa,UAAqC;CAC7D,MAAM,eAAe,KAAK,OAAOA,MAAI,IAAIC,SAAI,WAAW,SAAS,OAAO,GAAG,KAAK,CAAC,CAAC;CAClF,OAAO,IAAI,OACT,2BAA2BD,MAAI,KAAK,cAAc,WAAW,EAAE,wBAC/D,IACF;AACF;AAEA,MAAM,WACH,cACA,EAAE,WAAW,kBAAoD;CAChE,MAAM,WAAW,KAAK,aAAa,OAAO,IAAIC,SAAI,QAAQ,OAAO,EAAE,CAAC,CAAC;CAMrE,OAAO;EAAE;EAAW,OALN,KACZ;GAAC,OAAO,KAAK,SAAS;GAAG,OAAO,KAAK,SAAS,SAAS,CAAC;GAAG;GAAa;EAAQ,GAChFD,MAAI,UACJA,MAAI,MAEkB;EAAG;CAAY;AACzC;;AAGF,MAAa,kBAAkB,OAAO,GAAG,iBAAiB,CAAC,CAAC,UAAU,gBACpE,MACA;CACA,MAAM,QAAQ,OAAO;CACrB,MAAM,WAAW,OAAO,kBAAkB,IAAI;CAC9C,OAAO,KAA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AClD,IAAIA,MAAI,qBAAqB,QAAQ,GACnC,OAAO,CAAC;CAOV,OAAO,CAAC,cAAc,QAAQ,KALf,KACb,UACAA,MAAI,KAAK,YAAY,KAAK,QAAQ,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"}
|
|
1
|
+
{"version":3,"file":"repository-text-DluK673j.mjs","names":["Arr","Str","Arr","Str","Arr","Rec","Rec","Arr"],"sources":["../src/entities/workspace/model/workspace-names.ts","../src/shared/lib/path-existence.ts","../src/app/repository-tasks.ts","../src/app/repository-text.ts"],"sourcesContent":["import { Array as Arr, Effect, Option, String as Str, pipe } from \"effect\";\n\nimport { RepositoryFiles } from \"#/shared/lib/repository-files.ts\";\n\nimport { workspaceProjects } from \"./workspace-projects.ts\";\nimport type { WorkspaceProject } from \"./workspace-projects.ts\";\n\nconst ALTERNATIVE = \"|\";\nconst SCOPE = /^@[^/]+\\//u;\nconst SPECIAL = /[$()*+.?[\\\\\\]^{|}]/gu;\n\nexport interface NamedWorkspace {\n readonly directory: string;\n readonly names: readonly string[];\n readonly packageName: Option.Option<string>;\n}\n\n/** @internal */\nexport const patternOf = (names: readonly string[]): RegExp => {\n const alternatives = pipe(names, Arr.map(Str.replaceAll(SPECIAL, String.raw`\\$&`)));\n return new RegExp(\n `(?<![\\\\p{L}\\\\p{N}_-])(?:${Arr.join(alternatives, ALTERNATIVE)})(?![\\\\p{L}\\\\p{N}_-])`,\n \"gu\",\n );\n};\n\nconst namedIn =\n (basename: (directory: string) => string) =>\n ({ directory, packageName }: WorkspaceProject): NamedWorkspace => {\n const unscoped = pipe(packageName, Option.map(Str.replace(SCOPE, \"\")));\n const names = pipe(\n [Option.some(directory), Option.some(basename(directory)), packageName, unscoped],\n Arr.getSomes,\n Arr.dedupe,\n );\n return { directory, names, packageName };\n };\n\n/** @internal */\nexport const namedWorkspaces = Effect.fn(\"namedWorkspaces\")(function* namedWorkspaces(\n root: string,\n) {\n const files = yield* RepositoryFiles;\n const projects = yield* workspaceProjects(root);\n return pipe(projects, Arr.map(namedIn((directory) => files.basename(directory))));\n});\n","import { Array as Arr, Effect, Option, String as Str } from \"effect\";\n\nimport { RepositoryFiles } from \"#/shared/lib/repository-files.ts\";\n\nconst WILDCARD = /[*?[]/u;\nconst SEPARATOR = \"/\";\nconst FIRST = 0;\n\n/** @internal */\nexport const existsAt = Effect.fn(\"existsAt\")(function* existsAt(root: string, path: string) {\n const files = yield* RepositoryFiles;\n return yield* files.exists(files.join(root, path));\n});\n\n/** @internal */\nexport const isDirectoryAt = Effect.fn(\"isDirectoryAt\")(function* isDirectoryAt(\n root: string,\n path: string,\n) {\n const files = yield* RepositoryFiles;\n const directory = yield* files.isDirectory(files.join(root, path));\n return Option.getOrElse(directory, () => false);\n});\n\n/** @internal */\nexport const staticPrefix = (path: string): string => {\n const prefix = Arr.headNonEmpty(Str.split(path, WILDCARD));\n if (Str.endsWith(SEPARATOR)(prefix)) {\n return Str.slice(FIRST, -SEPARATOR.length)(prefix);\n }\n return prefix;\n};\n\n/** @internal */\nexport const isIgnored = Effect.fn(\"isIgnored\")(function* isIgnored(root: string, path: string) {\n const prefix = staticPrefix(path);\n if (Str.isEmpty(prefix)) {\n return false;\n }\n const files = yield* RepositoryFiles;\n const ignored = yield* files.ignoredPaths(root, [prefix, `${prefix}${SEPARATOR}`]);\n return Arr.isReadonlyArrayNonEmpty(ignored);\n});\n","import { Array as Arr, Option, Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport { TASK_NAMES } from \"#/entities/workspace/index.ts\";\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\nimport { USAGE_SPOOL } from \"#/shared/config/index.ts\";\n\ntype Tasks = NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]>;\n\nexport interface UsageOptions {\n readonly endpoint: string;\n readonly apiKeyEnv?: string;\n}\n\nexport interface TaskOptions {\n readonly workspace: WorkspaceSettings;\n readonly commands: Readonly<Record<string, string>>;\n readonly usage: Option.Option<UsageOptions>;\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_FILES = [\"package.json\", \"pnpm-workspace.yaml\", \"pnpm-lock.yaml\", \".npmrc\"];\n\nconst AUDIT = Arr.join(\n [\n 'copy=\"$(mktemp -d)\"',\n `trap 'rm -rf \"$copy\"' EXIT`,\n `for file in ${Arr.join(AUDIT_FILES, \" \")}; do if [ -f \"$file\" ]; then cp \"$file\" \"$copy/\"; fi; done`,\n '(cd \"$copy\" && vp pm audit --fix >/dev/null) || exit',\n `added=\"$(diff pnpm-workspace.yaml \"$copy/pnpm-workspace.yaml\" | sed -n 's/^> \\\\(.*\\\\)$/\\\\1 # exit: unused/p')\"`,\n 'if [ -z \"$added\" ]; then exit 0; fi',\n `printf '%s\\\\n' \"vp pm audit --fix found vulnerable versions. First update them within their ranges with vp update -r --no-save <package>... -- --depth Infinity. For each one still reported by vp pm audit, add its line to overrides in pnpm-workspace.yaml and run vp install:\" \"$added\" >&2`,\n \"exit 1\",\n ],\n \"; \",\n);\n\nconst BROKER_TOKEN = `GH_TOKEN=\"\\${GITHUB_APP_TOKEN:-$GH_TOKEN}\"`;\nconst AGENT_STATE = `\"\\${RUNNER_TEMP:-\\${TMPDIR:-/tmp}}/msch-agents\"`;\n\nconst DAILY = `msch exits; ${BROKER_TOKEN} msch upstream; ${BROKER_TOKEN} msch callers; ${BROKER_TOKEN} msch refs; refs=$?; msch agents ${AGENT_STATE} && exit \"$refs\"`;\n\nconst TEST = \"msch changed -- vp test run --passWithNoTests\";\n\nexport const MSCH_VERIFY_COMMANDS = {\n fallow: FALLOW,\n check: CHECK,\n msch: \"msch\",\n audit: AUDIT,\n published: \"msch published\",\n compat: COMPAT,\n} as const;\n\nexport const MSCH_TASK_COMMANDS = { ...MSCH_VERIFY_COMMANDS, test: TEST } as const;\n\nexport const CI_TASKS = [TASK_NAMES.verify, TASK_NAMES.test] as const;\n\nconst USAGE_TASK = \"usage\";\n\nconst METERED_TASKS = [\"check\", \"msch\"] as const;\n\nexport const meteredCommand = (command: string): string =>\n `USAGE_METER_SPOOL=\"$PWD/${USAGE_SPOOL}\" ${command}`;\n\nconst usageCommandOf = ({ endpoint, apiKeyEnv }: UsageOptions): string =>\n pipe(\n Option.fromUndefinedOr(apiKeyEnv),\n Option.match({\n onNone: () => `msch usage --endpoint ${endpoint}`,\n onSome: (name) => `msch usage --endpoint ${endpoint} --api-key-env ${name}`,\n }),\n );\n\nconst commandOf =\n (usage: Option.Option<UsageOptions>) =>\n (command: string): string =>\n Option.match(usage, { onNone: () => command, onSome: () => meteredCommand(command) });\n\nconst usageTasks = (usage: Option.Option<UsageOptions>): Tasks =>\n Option.match(usage, {\n onNone: (): Tasks => ({}),\n onSome: (options): Tasks => ({\n [USAGE_TASK]: {\n command: usageCommandOf(options),\n dependsOn: [...METERED_TASKS],\n cache: false,\n },\n }),\n });\n\nexport const tasksOf = ({\n workspace,\n commands,\n usage,\n}: TaskOptions): NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]> => {\n const inputs = [{ auto: true }, ...workspace.ignoredDirectories, ...NOT_INPUTS];\n const run = commandOf(usage);\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: run(CHECK),\n cache: { input: inputs, untrackedEnv: UNTRACKED_ENV },\n },\n msch: {\n command: run(MSCH_VERIFY_COMMANDS.msch),\n dependsOn: [\"check\", ...workspace.tasks.native],\n cache: false,\n },\n audit: { command: AUDIT, cache: false },\n published: { command: MSCH_TASK_COMMANDS.published, cache: false },\n compat: { command: COMPAT, dependsOn: [\"msch\", \"fallow\"], cache: false },\n ...usageTasks(usage),\n };\n return {\n ...checks,\n test: {\n command: TEST,\n dependsOn: [\"check\", ...workspace.tasks.native],\n cache: { input: [...inputs, \"!**/.cache/**\"] },\n },\n daily: { command: DAILY, dependsOn: [...workspace.tasks.native], cache: false },\n verify: { command: [], dependsOn: [...workspace.tasks.verify, ...Rec.keys(checks)] },\n ci: { command: [], dependsOn: [...CI_TASKS, ...workspace.tasks.test] },\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 {\n textlintFilters,\n textlintPresets,\n zennMarkdown,\n} 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 interface BuiltTextOptions extends TextOptions {\n readonly articles: readonly string[];\n}\n\nexport const TEXT_IGNORES = [\n \"AGENTS.md\",\n \"CLAUDE.md\",\n \".agents/skills/**\",\n \"CHANGELOG.md\",\n ...exempt,\n];\nconst ZENN_MARKDOWN = \"zenn-markdown\";\nconst QUOTATION = String.raw`/「[^」]*」/`;\nconst ELLIPSIS = \"…\";\nconst TEXT_FILTERS = { comments: true, \"node-types\": { nodeTypes: [\"BlockQuote\"] } };\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\ntype Style = \"である\" | \"ですます\";\n\nconst builtRules = (\n properNouns: readonly string[],\n style: Style,\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: style, preferInList: style },\n \"max-kanji-continuous-len\": { max: KANJI_RUN, allow: [...properNouns] },\n \"no-exclamation-question-mark\": { allow: [QUOTATION, ...properNouns] },\n \"ja-no-successive-word\": { allow: [ELLIPSIS] },\n },\n});\n\nexport const builtTextRuleNames: readonly string[] = Rec.keys(builtRules([], \"である\"));\n\nexport const textlintOf = ({\n properNouns = [],\n rules = {},\n sources = [],\n articles,\n}: BuiltTextOptions): NonNullable<ToolSections[\"textlint\"]> => {\n const textRules = { ...rules, ...builtRules(properNouns, \"である\") };\n const articleSources = Arr.filter(\n [\n {\n files: [...articles],\n plugins: { [ZENN_MARKDOWN]: true },\n rules: { ...rules, ...builtRules(properNouns, \"ですます\") },\n filters: TEXT_FILTERS,\n } satisfies Source,\n ],\n () => Arr.isReadonlyArrayNonEmpty(articles),\n );\n return {\n ignores: [...TEXT_IGNORES, ...articles],\n presets: textlintPresets,\n filterModules: textlintFilters,\n pluginModules: { [ZENN_MARKDOWN]: zennMarkdown },\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: TEXT_FILTERS,\n })),\n Arr.appendAll(articleSources),\n ),\n filters: TEXT_FILTERS,\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\"]`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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@r_masseater/msch",
|
|
3
|
-
"version": "0.117.
|
|
3
|
+
"version": "0.117.3",
|
|
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",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@r_masseater/masseater-utils": "^0.3.0",
|
|
74
74
|
"@r_masseater/oxlint-plugin-decision": "^0.10.1",
|
|
75
75
|
"@r_masseater/oxlint-typed-rules": "^0.7.1",
|
|
76
|
-
"@r_masseater/textlint-rule-preset-ja": "^0.4.
|
|
76
|
+
"@r_masseater/textlint-rule-preset-ja": "^0.4.4",
|
|
77
77
|
"@r_masseater/wism": "^0.5.2",
|
|
78
78
|
"@r_masseater/y8": "^0.9.2",
|
|
79
79
|
"@shadcn/lint": "^0.2.5",
|
|
@@ -93,6 +93,7 @@
|
|
|
93
93
|
"semver": "^7.8.6",
|
|
94
94
|
"sql-parser-cst": "^0.46.0",
|
|
95
95
|
"textlint-filter-rule-comments": "^1.3.0",
|
|
96
|
+
"textlint-filter-rule-node-types": "^1.1.0",
|
|
96
97
|
"textlint-rule-preset-ja-technical-writing": "^12.1.0",
|
|
97
98
|
"toml-eslint-parser": "^1.0.3",
|
|
98
99
|
"yaml": "^2.9.1"
|