@r_masseater/msch 0.94.0 → 0.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{base-revision-C9RxuIMK.mjs → base-revision-Bl-4nxAd.mjs} +2 -2
- package/dist/{base-revision-C9RxuIMK.mjs.map → base-revision-Bl-4nxAd.mjs.map} +1 -1
- package/dist/cargo-inputs.mjs +2 -2
- package/dist/changed.mjs +5 -5
- package/dist/cli.mjs +747 -444
- package/dist/cli.mjs.map +1 -1
- package/dist/config-BBdsNPSO.mjs.map +1 -1
- package/dist/config.d.mts +19 -16
- package/dist/config.mjs +23 -161
- package/dist/config.mjs.map +1 -1
- package/dist/decision-rules.d.mts +1 -1
- package/dist/decision-rules.mjs +1 -1
- package/dist/{define-lint-preset-GWsBHDRn.mjs → define-lint-preset-B-hC9_df.mjs} +91 -57
- package/dist/define-lint-preset-B-hC9_df.mjs.map +1 -0
- package/dist/exits.mjs +4 -4
- package/dist/{ignored-directories-Ce-45yzO.mjs → ignored-directories-D-7Rm_2X.mjs} +2 -2
- package/dist/{ignored-directories-Ce-45yzO.mjs.map → ignored-directories-D-7Rm_2X.mjs.map} +1 -1
- package/dist/{index-Bw2kfEek.d.mts → index-CEazCJ_w.d.mts} +38 -11
- package/dist/{index-CMyIrsah.d.mts → index-Dm0Gg9wS.d.mts} +2 -2
- package/dist/judge.mjs +4 -4
- package/dist/lint-rules.mjs +23 -11
- package/dist/lint-rules.mjs.map +1 -1
- package/dist/lint.d.mts +2 -2
- package/dist/lint.mjs +1 -1
- package/dist/{lookup-report-DVJg0K4Z.mjs → lookup-report-L5OLXRMf.mjs} +3 -3
- package/dist/{lookup-report-DVJg0K4Z.mjs.map → lookup-report-L5OLXRMf.mjs.map} +1 -1
- package/dist/{manifest-texts-B69vIp7o.mjs → manifest-texts-DPgsV8kj.mjs} +2 -2
- package/dist/{manifest-texts-B69vIp7o.mjs.map → manifest-texts-DPgsV8kj.mjs.map} +1 -1
- package/dist/{output-B_YPmKad.mjs → output-DAvdel9H.mjs} +3 -3
- package/dist/{output-B_YPmKad.mjs.map → output-DAvdel9H.mjs.map} +1 -1
- package/dist/oxlint.mjs +2 -2
- package/dist/package-routes-BQWX5ttU.mjs +73 -0
- package/dist/package-routes-BQWX5ttU.mjs.map +1 -0
- package/dist/{package-versions-PMKDR-bJ.mjs → package-versions-sx15IGwA.mjs} +4 -4
- package/dist/{package-versions-PMKDR-bJ.mjs.map → package-versions-sx15IGwA.mjs.map} +1 -1
- package/dist/{pass-records-CBvMwfN3.mjs → pass-records-BcAAWgiQ.mjs} +4 -4
- package/dist/{pass-records-CBvMwfN3.mjs.map → pass-records-BcAAWgiQ.mjs.map} +1 -1
- package/dist/{problem-CUIz4TEI.mjs → problem-DbuTeNvL.mjs} +2 -2
- package/dist/{problem-CUIz4TEI.mjs.map → problem-DbuTeNvL.mjs.map} +1 -1
- package/dist/publish.mjs +23 -87
- package/dist/publish.mjs.map +1 -1
- package/dist/{published-B5LA4ZlS.mjs → published-3eokcs_D.mjs} +23 -5
- package/dist/published-3eokcs_D.mjs.map +1 -0
- package/dist/published.mjs +15 -18
- package/dist/published.mjs.map +1 -1
- package/dist/refs.mjs +6 -7
- package/dist/refs.mjs.map +1 -1
- package/dist/registries-DePiYd3D.mjs +11 -0
- package/dist/registries-DePiYd3D.mjs.map +1 -0
- package/dist/{registry-releases-Dj6jH8Yt.mjs → registry-releases-BBtz4wGE.mjs} +3 -3
- package/dist/registry-releases-BBtz4wGE.mjs.map +1 -0
- package/dist/{repository-files-B6PEvKWe.mjs → repository-files-DSwKJnrj.mjs} +6 -1
- package/dist/repository-files-DSwKJnrj.mjs.map +1 -0
- package/dist/repository-text-DGfYd5Wq.mjs +178 -0
- package/dist/repository-text-DGfYd5Wq.mjs.map +1 -0
- package/dist/{runtime-C8OGDSk9.mjs → runtime-Djm7zMwu.mjs} +2 -2
- package/dist/{runtime-C8OGDSk9.mjs.map → runtime-Djm7zMwu.mjs.map} +1 -1
- package/dist/unbumped.mjs +5 -5
- package/dist/{upstream-exits-nTTh2qcD.mjs → upstream-exits-4bn4gblF.mjs} +6 -7
- package/dist/{upstream-exits-nTTh2qcD.mjs.map → upstream-exits-4bn4gblF.mjs.map} +1 -1
- package/dist/{upstream-record-DlluH3fY.mjs → upstream-record-DRNGym9S.mjs} +2 -2
- package/dist/{upstream-record-DlluH3fY.mjs.map → upstream-record-DRNGym9S.mjs.map} +1 -1
- package/dist/upstream.mjs +7 -8
- package/dist/upstream.mjs.map +1 -1
- package/dist/{workspace-projects-B-vCr6bx.mjs → workspace-projects-MpL8K7Nz.mjs} +2 -2
- package/dist/{workspace-projects-B-vCr6bx.mjs.map → workspace-projects-MpL8K7Nz.mjs.map} +1 -1
- package/dist/workspace-settings.d.mts +1 -1
- package/dist/workspace-settings.mjs +50 -31
- package/dist/workspace-settings.mjs.map +1 -1
- package/package.json +10 -11
- package/skills/msch-checks/SKILL.md +3 -3
- package/skills/msch-publishing/SKILL.md +4 -4
- package/skills/msch-repository-config/SKILL.md +40 -42
- package/skills/msch-workspace-settings/SKILL.md +8 -9
- package/src/app/vite.d.ts +4 -37
- package/dist/credential-broker-PkIpsaMh.mjs +0 -29
- package/dist/credential-broker-PkIpsaMh.mjs.map +0 -1
- package/dist/define-lint-preset-GWsBHDRn.mjs.map +0 -1
- package/dist/owner-settings-BAh-fFKg.mjs +0 -122
- package/dist/owner-settings-BAh-fFKg.mjs.map +0 -1
- package/dist/package-routes-DQmhjX07.mjs +0 -82
- package/dist/package-routes-DQmhjX07.mjs.map +0 -1
- package/dist/published-B5LA4ZlS.mjs.map +0 -1
- package/dist/registry-releases-Dj6jH8Yt.mjs.map +0 -1
- package/dist/repository-files-B6PEvKWe.mjs.map +0 -1
- package/dist/wake.d.mts +0 -1
- package/dist/wake.mjs +0 -34
- package/dist/wake.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-BBdsNPSO.mjs","names":[],"sources":["../src/shared/config/index.ts"],"sourcesContent":["export const JAPANESE = /[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]/u;\n\n/** @msch video.intro */\nexport const VIDEO_INTROS = [\"beats\", \"plain\"] as const;\n\nexport type VideoIntro = (typeof VIDEO_INTROS)[number];\n\nexport const DECISION_MODEL = \"cloudflare/@cf/cloudflare/clef-flash\";\n\nexport const DECISION_TIMEOUT_MS = 50_000;\n"],"mappings":";AAAA,MAAa,WAAW;;AAGxB,MAAa,eAAe,CAAC,SAAS,OAAO;AAI7C,MAAa,iBAAiB;AAE9B,MAAa,sBAAsB"}
|
|
1
|
+
{"version":3,"file":"config-BBdsNPSO.mjs","names":[],"sources":["../src/shared/config/index.ts"],"sourcesContent":["export const JAPANESE = /[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]/u;\n\n/** @msch video.intro */\nexport const VIDEO_INTROS = [\"beats\", \"plain\"] as const;\n\nexport type VideoIntro = (typeof VIDEO_INTROS)[number];\n\nexport const DECISION_MODEL = \"cloudflare/@cf/cloudflare/clef-flash\";\n\nexport const DECISION_TIMEOUT_MS = 50_000;\n\nexport { RENOVATE_PRESET, SELF_HOMEPAGE, SELF_NAME } from \"./self.ts\";\n\nexport { exempt, generated } from \"./exempt.ts\";\n"],"mappings":";AAAA,MAAa,WAAW;;AAGxB,MAAa,eAAe,CAAC,SAAS,OAAO;AAI7C,MAAa,iBAAiB;AAE9B,MAAa,sBAAsB"}
|
package/dist/config.d.mts
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
import { a as WorkspaceSettings } from "./index-
|
|
2
|
-
import {
|
|
1
|
+
import { a as WorkspaceSettings } from "./index-Dm0Gg9wS.mjs";
|
|
2
|
+
import { r as MarkdownOptions } from "./index-CEazCJ_w.mjs";
|
|
3
3
|
import { ToolSections } from "@r_masseater/vite-plus-adopt";
|
|
4
|
+
import { Schema } from "effect";
|
|
4
5
|
import { UserConfig } from "vite-plus";
|
|
5
|
-
import { OxlintOverride } from "vite-plus/lint";
|
|
6
6
|
import { H56mConfig } from "@r_masseater/h56m";
|
|
7
|
+
declare const AddedRules: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Literals<readonly ["error", "deny"]>, Schema.mutable<Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literals<readonly ["error", "deny"]>]>, readonly [Schema.Unknown]>>]>>;
|
|
8
|
+
type AddedRulesValue = typeof AddedRules.Type;
|
|
9
|
+
interface TextSource {
|
|
10
|
+
readonly files: readonly string[];
|
|
11
|
+
readonly plugins: Readonly<Record<string, boolean | object>>;
|
|
12
|
+
}
|
|
7
13
|
interface TextOptions {
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly rules?: Readonly<Record<string, boolean | object>>;
|
|
12
|
-
readonly filters?: Readonly<Record<string, boolean | object>>;
|
|
13
|
-
readonly sources?: NonNullable<NonNullable<ToolSections["textlint"]>["sources"]>;
|
|
14
|
+
readonly properNouns?: readonly string[];
|
|
15
|
+
readonly rules?: Readonly<Record<string, object>>;
|
|
16
|
+
readonly sources?: readonly TextSource[];
|
|
14
17
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
readonly
|
|
18
|
+
export declare const secretsOf: () => H56mConfig;
|
|
19
|
+
export interface AddedOverride {
|
|
20
|
+
readonly files: readonly string[];
|
|
21
|
+
readonly excludeFiles?: readonly string[];
|
|
22
|
+
readonly rules: AddedRulesValue;
|
|
18
23
|
}
|
|
19
|
-
export declare const secretsOf: ({ lines, paths }: SecretOptions) => H56mConfig;
|
|
20
24
|
export interface RepositoryOptions {
|
|
21
25
|
readonly workspace: WorkspaceSettings;
|
|
22
|
-
readonly overrides?: readonly
|
|
23
|
-
readonly secrets?: SecretOptions;
|
|
26
|
+
readonly overrides?: readonly AddedOverride[];
|
|
24
27
|
readonly textlint?: TextOptions;
|
|
25
|
-
readonly markdown?: MarkdownOptions
|
|
28
|
+
readonly markdown?: Omit<MarkdownOptions, "indexSkill">;
|
|
26
29
|
readonly run?: {
|
|
27
30
|
readonly tasks?: Readonly<Record<string, string>>;
|
|
28
31
|
readonly remoteCache?: string;
|
package/dist/config.mjs
CHANGED
|
@@ -1,160 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as exempt, d as requiredStack, f as lint, h as decisionTestRules, o as structureOf, r as markdownOf } from "./define-lint-preset-B-hC9_df.mjs";
|
|
2
|
+
import { i as textlintOf, o as tasksOf, r as secretsOf } from "./repository-text-DGfYd5Wq.mjs";
|
|
2
3
|
import { Array, Option, Record, pipe } from "effect";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
4
5
|
import { recommended } from "@r_masseater/fu4/presets";
|
|
5
|
-
import { betterleaks } from "@r_masseater/h56m/presets";
|
|
6
|
-
// src/app/repository-tasks.ts
|
|
7
|
-
const NOT_INPUTS = [
|
|
8
|
-
"!node_modules/.pnpm-store",
|
|
9
|
-
"!node_modules/.pnpm-store/**",
|
|
10
|
-
"!node_modules/.tmp",
|
|
11
|
-
"!node_modules/.tmp/**",
|
|
12
|
-
"!target/**",
|
|
13
|
-
"!node_modules/.vitest-cache/**",
|
|
14
|
-
"!node_modules/.cache/**"
|
|
15
|
-
];
|
|
16
|
-
const UNTRACKED_ENV = [
|
|
17
|
-
"CLOUDFLARE_ACCOUNT_ID",
|
|
18
|
-
"CLOUDFLARE_AI_GATEWAY_ID",
|
|
19
|
-
"CLOUDFLARE_API_TOKEN",
|
|
20
|
-
"CLAUDECODE",
|
|
21
|
-
"CLAUDE_CODE_REMOTE",
|
|
22
|
-
"GITHUB_ACTIONS",
|
|
23
|
-
"HTTPS_PROXY",
|
|
24
|
-
"https_proxy",
|
|
25
|
-
"NO_PROXY",
|
|
26
|
-
"no_proxy",
|
|
27
|
-
"SSL_CERT_FILE",
|
|
28
|
-
"NODE_EXTRA_CA_CERTS"
|
|
29
|
-
];
|
|
30
|
-
const FALLOW = pipe([
|
|
31
|
-
"--skip dupes --fail-on-issues --quiet --format compact",
|
|
32
|
-
"dead-code --no-production --fail-on-issues --quiet --format compact",
|
|
33
|
-
"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'",
|
|
34
|
-
"dupes --fail-on-issues --quiet --format compact",
|
|
35
|
-
"security --fail-on-issues --quiet"
|
|
36
|
-
], Array.map((args) => `FALLOW_TYPE_AWARE_BACKEND=tsrs fallow ${args}`));
|
|
37
|
-
const CHECK = `TSRS_LINT_RUN_EXTERNAL_CODE=1 msch-changed --batch-sources ${String(1e3)} vp check --deny-warnings --continue-on-error`;
|
|
38
|
-
const COMPAT = "msch-changed msch-publish compat-changed";
|
|
39
|
-
const AUDIT = "before=\"$(cksum pnpm-workspace.yaml)\"; vp pm audit --fix || exit; if [ \"$before\" != \"$(cksum pnpm-workspace.yaml)\" ]; then echo \"vp pm audit --fix rewrote pnpm-workspace.yaml. Run vp install and commit the diff.\" >&2; exit 1; fi";
|
|
40
|
-
const BROKER_TOKEN = `GH_TOKEN="\${GITHUB_APP_TOKEN:-$GH_TOKEN}"`;
|
|
41
|
-
const DAILY = `msch-exits; ${BROKER_TOKEN} msch-upstream; ${BROKER_TOKEN} msch-refs`;
|
|
42
|
-
const tasksOf = ({ workspace, commands }) => {
|
|
43
|
-
const inputs = [
|
|
44
|
-
{ auto: true },
|
|
45
|
-
...workspace.ignoredDirectories,
|
|
46
|
-
...NOT_INPUTS
|
|
47
|
-
];
|
|
48
|
-
const checks = {
|
|
49
|
-
fallow: {
|
|
50
|
-
command: FALLOW,
|
|
51
|
-
cache: {
|
|
52
|
-
input: [
|
|
53
|
-
...inputs,
|
|
54
|
-
"!.fallow/**",
|
|
55
|
-
"!**/dist/**",
|
|
56
|
-
"!**/.fallow-verified"
|
|
57
|
-
],
|
|
58
|
-
output: []
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
check: {
|
|
62
|
-
command: CHECK,
|
|
63
|
-
cache: {
|
|
64
|
-
input: inputs,
|
|
65
|
-
untrackedEnv: UNTRACKED_ENV
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
test: {
|
|
69
|
-
command: "msch-changed vp test run --passWithNoTests",
|
|
70
|
-
dependsOn: ["check", ...workspace.tasks.native],
|
|
71
|
-
cache: { input: [...inputs, "!**/.cache/**"] }
|
|
72
|
-
},
|
|
73
|
-
msch: {
|
|
74
|
-
command: "msch",
|
|
75
|
-
dependsOn: ["check", ...workspace.tasks.native],
|
|
76
|
-
cache: false
|
|
77
|
-
},
|
|
78
|
-
audit: {
|
|
79
|
-
command: AUDIT,
|
|
80
|
-
cache: false
|
|
81
|
-
},
|
|
82
|
-
published: {
|
|
83
|
-
command: "msch-published",
|
|
84
|
-
cache: false
|
|
85
|
-
},
|
|
86
|
-
compat: {
|
|
87
|
-
command: COMPAT,
|
|
88
|
-
cache: false
|
|
89
|
-
},
|
|
90
|
-
...commands
|
|
91
|
-
};
|
|
92
|
-
return {
|
|
93
|
-
...checks,
|
|
94
|
-
daily: {
|
|
95
|
-
command: DAILY,
|
|
96
|
-
dependsOn: [...workspace.tasks.native],
|
|
97
|
-
cache: false
|
|
98
|
-
},
|
|
99
|
-
verify: {
|
|
100
|
-
command: [],
|
|
101
|
-
dependsOn: [...workspace.tasks.verify, ...Record.keys(checks)]
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
// src/app/repository-text.ts
|
|
106
|
-
const TEXT_IGNORES = [
|
|
107
|
-
"AGENTS.md",
|
|
108
|
-
"CLAUDE.md",
|
|
109
|
-
".agents/skills/**",
|
|
110
|
-
"CHANGELOG.md"
|
|
111
|
-
];
|
|
112
|
-
const SENTENCE_LENGTH = 120;
|
|
113
|
-
const KANJI_RUN = 6;
|
|
114
|
-
const PUBLIC_LINES = [String.raw`\bCF_BEACON_TOKEN = "[0-9a-f]{32}"`];
|
|
115
|
-
const textlintOf = ({ ignores = [], kanji = [], technicalWriting = {}, rules = {}, filters = {}, sources = [] }) => ({
|
|
116
|
-
ignores: [...TEXT_IGNORES, ...ignores],
|
|
117
|
-
presets: textlintPresets,
|
|
118
|
-
filterModules: textlintFilters,
|
|
119
|
-
reportUnusedDirectives: true,
|
|
120
|
-
sources: pipe(sources, Array.map((source) => ({
|
|
121
|
-
...source,
|
|
122
|
-
filters: {
|
|
123
|
-
comments: true,
|
|
124
|
-
...source.filters
|
|
125
|
-
}
|
|
126
|
-
}))),
|
|
127
|
-
filters: {
|
|
128
|
-
comments: true,
|
|
129
|
-
...filters
|
|
130
|
-
},
|
|
131
|
-
rules: {
|
|
132
|
-
"@textlint-ja/preset-ai-writing": true,
|
|
133
|
-
"@r_masseater/preset-ja": true,
|
|
134
|
-
"preset-ja-technical-writing": {
|
|
135
|
-
"sentence-length": { max: SENTENCE_LENGTH },
|
|
136
|
-
"ja-no-mixed-period": { allowPeriodMarks: [":"] },
|
|
137
|
-
"no-mix-dearu-desumasu": {
|
|
138
|
-
preferInBody: "である",
|
|
139
|
-
preferInList: "である"
|
|
140
|
-
},
|
|
141
|
-
"max-kanji-continuous-len": {
|
|
142
|
-
max: KANJI_RUN,
|
|
143
|
-
allow: [...kanji]
|
|
144
|
-
},
|
|
145
|
-
...technicalWriting
|
|
146
|
-
},
|
|
147
|
-
...rules
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
const anyOf = (subject) => (patterns) => {
|
|
151
|
-
if (Array.isReadonlyArrayEmpty(patterns)) return [];
|
|
152
|
-
return [`matchesAny(${subject}, [${pipe(patterns, Array.map((pattern) => `\`${pattern}\``), Array.join(", "))}])`];
|
|
153
|
-
};
|
|
154
|
-
const secretsOf = ({ lines = [], paths = [] }) => ({
|
|
155
|
-
extend: { path: betterleaks },
|
|
156
|
-
filter: pipe([...anyOf("finding.line")([...PUBLIC_LINES, ...lines]), ...anyOf(`attributes["path"]`)(paths)], Array.join(" || "))
|
|
157
|
-
});
|
|
158
6
|
// src/app/repository-config.ts
|
|
159
7
|
const cacheOf = (remoteCache) => pipe(Option.fromNullishOr(remoteCache), Option.match({
|
|
160
8
|
onNone: () => true,
|
|
@@ -170,9 +18,20 @@ const allowedIn = (allowances, field) => pipe(allowances, Record.map(({ workspac
|
|
|
170
18
|
fields: [field]
|
|
171
19
|
})));
|
|
172
20
|
const COMMIT_CONVENTION = fileURLToPath(import.meta.resolve("@commitlint/config-conventional"));
|
|
21
|
+
const added = ({ files, excludeFiles, rules }) => pipe(Option.fromUndefinedOr(excludeFiles), Option.match({
|
|
22
|
+
onNone: () => ({
|
|
23
|
+
files: [...files],
|
|
24
|
+
rules: { ...rules }
|
|
25
|
+
}),
|
|
26
|
+
onSome: (excluded) => ({
|
|
27
|
+
files: [...files],
|
|
28
|
+
excludeFiles: [...excluded],
|
|
29
|
+
rules: { ...rules }
|
|
30
|
+
})
|
|
31
|
+
}));
|
|
173
32
|
const lintOf = ({ workspace, overrides = [] }) => ({
|
|
174
33
|
...lint,
|
|
175
|
-
ignorePatterns:
|
|
34
|
+
ignorePatterns: exempt,
|
|
176
35
|
overrides: [
|
|
177
36
|
...lint.overrides,
|
|
178
37
|
{
|
|
@@ -187,7 +46,7 @@ const lintOf = ({ workspace, overrides = [] }) => ({
|
|
|
187
46
|
],
|
|
188
47
|
rules: { "import/no-default-export": "off" }
|
|
189
48
|
},
|
|
190
|
-
...overrides,
|
|
49
|
+
...pipe(overrides, Array.map(added)),
|
|
191
50
|
...workspace.lint.overrides,
|
|
192
51
|
{
|
|
193
52
|
files: ["**/*.test.ts"],
|
|
@@ -196,7 +55,7 @@ const lintOf = ({ workspace, overrides = [] }) => ({
|
|
|
196
55
|
]
|
|
197
56
|
});
|
|
198
57
|
const repositoryConfig = (options) => {
|
|
199
|
-
const { workspace,
|
|
58
|
+
const { workspace, textlint = {}, markdown = {}, run = {} } = options;
|
|
200
59
|
return {
|
|
201
60
|
commitlint: { extends: [COMMIT_CONVENTION] },
|
|
202
61
|
dependencyRules: {
|
|
@@ -207,13 +66,16 @@ const repositoryConfig = (options) => {
|
|
|
207
66
|
banned: requiredStack,
|
|
208
67
|
peerRanges: "intersect"
|
|
209
68
|
},
|
|
210
|
-
h56m: secretsOf(
|
|
69
|
+
h56m: secretsOf(),
|
|
211
70
|
wism: structureOf({
|
|
212
71
|
members: workspace.members,
|
|
213
|
-
ignorePatterns:
|
|
72
|
+
ignorePatterns: exempt
|
|
214
73
|
}),
|
|
215
74
|
textlint: textlintOf(textlint),
|
|
216
|
-
y8: markdownOf(
|
|
75
|
+
y8: markdownOf({
|
|
76
|
+
...markdown,
|
|
77
|
+
indexSkill: workspace.indexSkill
|
|
78
|
+
}),
|
|
217
79
|
fu4: recommended(),
|
|
218
80
|
test: {
|
|
219
81
|
projects: [...workspace.testProjects],
|
|
@@ -221,7 +83,7 @@ const repositoryConfig = (options) => {
|
|
|
221
83
|
},
|
|
222
84
|
staged: { "*": "vp fmt --no-error-on-unmatched-pattern" },
|
|
223
85
|
fmt: {
|
|
224
|
-
ignorePatterns:
|
|
86
|
+
ignorePatterns: exempt,
|
|
225
87
|
sortImports: true,
|
|
226
88
|
sortTailwindcss: true,
|
|
227
89
|
sortPackageJson: true
|
package/dist/config.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":["Arr","Rec","Arr","Rec","preset"],"sources":["../src/app/repository-tasks.ts","../src/app/repository-text.ts","../src/app/repository-config.ts"],"sourcesContent":["import { Array as Arr, Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\n\ntype Tasks = NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]>;\n\nexport interface TaskOptions {\n readonly workspace: WorkspaceSettings;\n readonly commands: Readonly<Record<string, string>>;\n}\n\nconst NOT_INPUTS = [\n \"!node_modules/.pnpm-store\",\n \"!node_modules/.pnpm-store/**\",\n \"!node_modules/.tmp\",\n \"!node_modules/.tmp/**\",\n \"!target/**\",\n \"!node_modules/.vitest-cache/**\",\n \"!node_modules/.cache/**\",\n];\n\nconst UNTRACKED_ENV = [\n \"CLOUDFLARE_ACCOUNT_ID\",\n \"CLOUDFLARE_AI_GATEWAY_ID\",\n \"CLOUDFLARE_API_TOKEN\",\n \"CLAUDECODE\",\n \"CLAUDE_CODE_REMOTE\",\n \"GITHUB_ACTIONS\",\n \"HTTPS_PROXY\",\n \"https_proxy\",\n \"NO_PROXY\",\n \"no_proxy\",\n \"SSL_CERT_FILE\",\n \"NODE_EXTRA_CA_CERTS\",\n];\n\nconst FALLOW_ARGS = [\n \"--skip dupes --fail-on-issues --quiet --format compact\",\n \"dead-code --no-production --fail-on-issues --quiet --format compact\",\n \"dead-code --no-production --quiet --format json | jq -n 'input | {prop_drilling_chains, thin_wrappers, duplicate_prop_shapes} | with_entries(select(.value | length > 0)) | if length > 0 then halt_error else empty end'\",\n \"dupes --fail-on-issues --quiet --format compact\",\n \"security --fail-on-issues --quiet\",\n];\n\nconst FALLOW = pipe(\n FALLOW_ARGS,\n Arr.map((args) => `FALLOW_TYPE_AWARE_BACKEND=tsrs fallow ${args}`),\n);\n\nconst CHECK_BATCH_SOURCES = 1000;\n\nconst CHECK = `TSRS_LINT_RUN_EXTERNAL_CODE=1 msch-changed --batch-sources ${String(CHECK_BATCH_SOURCES)} vp check --deny-warnings --continue-on-error`;\n\nconst COMPAT = \"msch-changed msch-publish compat-changed\";\n\nconst AUDIT =\n 'before=\"$(cksum pnpm-workspace.yaml)\"; vp pm audit --fix || exit; if [ \"$before\" != \"$(cksum pnpm-workspace.yaml)\" ]; then echo \"vp pm audit --fix rewrote pnpm-workspace.yaml. Run vp install and commit the diff.\" >&2; exit 1; fi';\n\nconst BROKER_TOKEN = `GH_TOKEN=\"\\${GITHUB_APP_TOKEN:-$GH_TOKEN}\"`;\nconst DAILY = `msch-exits; ${BROKER_TOKEN} msch-upstream; ${BROKER_TOKEN} msch-refs`;\n\nexport const tasksOf = ({\n workspace,\n commands,\n}: TaskOptions): NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]> => {\n const inputs = [{ auto: true }, ...workspace.ignoredDirectories, ...NOT_INPUTS];\n const checks: Tasks = {\n fallow: {\n command: FALLOW,\n cache: {\n input: [...inputs, \"!.fallow/**\", \"!**/dist/**\", \"!**/.fallow-verified\"],\n output: [],\n },\n },\n check: {\n command: CHECK,\n cache: { input: inputs, untrackedEnv: UNTRACKED_ENV },\n },\n test: {\n command: \"msch-changed vp test run --passWithNoTests\",\n dependsOn: [\"check\", ...workspace.tasks.native],\n cache: { input: [...inputs, \"!**/.cache/**\"] },\n },\n msch: { command: \"msch\", dependsOn: [\"check\", ...workspace.tasks.native], cache: false },\n audit: { command: AUDIT, cache: false },\n published: { command: \"msch-published\", cache: false },\n compat: { command: COMPAT, cache: false },\n ...commands,\n };\n return {\n ...checks,\n daily: { command: DAILY, dependsOn: [...workspace.tasks.native], cache: false },\n verify: { command: [], dependsOn: [...workspace.tasks.verify, ...Rec.keys(checks)] },\n };\n};\n","import type { H56mConfig } from \"@r_masseater/h56m\";\nimport { betterleaks } from \"@r_masseater/h56m/presets\";\nimport type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Array as Arr, pipe } from \"effect\";\n\nimport { textlintFilters, textlintPresets } from \"#/features/define-lint-preset/index.ts\";\n\nexport interface TextOptions {\n readonly ignores?: readonly string[];\n readonly kanji?: readonly string[];\n readonly technicalWriting?: Readonly<Record<string, boolean | object>>;\n readonly rules?: Readonly<Record<string, boolean | object>>;\n readonly filters?: Readonly<Record<string, boolean | object>>;\n readonly sources?: NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"sources\"]>;\n}\n\nexport interface SecretOptions {\n readonly lines?: readonly string[];\n readonly paths?: readonly string[];\n}\n\nconst TEXT_IGNORES = [\"AGENTS.md\", \"CLAUDE.md\", \".agents/skills/**\", \"CHANGELOG.md\"];\nconst SENTENCE_LENGTH = 120;\nconst KANJI_RUN = 6;\nconst PUBLIC_LINES = [String.raw`\\bCF_BEACON_TOKEN = \"[0-9a-f]{32}\"`];\n\nexport const textlintOf = ({\n ignores = [],\n kanji = [],\n technicalWriting = {},\n rules = {},\n filters = {},\n sources = [],\n}: TextOptions): NonNullable<ToolSections[\"textlint\"]> => ({\n ignores: [...TEXT_IGNORES, ...ignores],\n presets: textlintPresets,\n filterModules: textlintFilters,\n reportUnusedDirectives: true,\n sources: pipe(\n sources,\n Arr.map((source) => ({ ...source, filters: { comments: true, ...source.filters } })),\n ),\n filters: { comments: true, ...filters },\n rules: {\n \"@textlint-ja/preset-ai-writing\": true,\n \"@r_masseater/preset-ja\": true,\n \"preset-ja-technical-writing\": {\n \"sentence-length\": { max: SENTENCE_LENGTH },\n \"ja-no-mixed-period\": { allowPeriodMarks: [\":\"] },\n \"no-mix-dearu-desumasu\": { preferInBody: \"である\", preferInList: \"である\" },\n \"max-kanji-continuous-len\": { max: KANJI_RUN, allow: [...kanji] },\n ...technicalWriting,\n },\n ...rules,\n },\n});\n\nconst anyOf =\n (subject: string) =>\n (patterns: readonly string[]): readonly string[] => {\n if (Arr.isReadonlyArrayEmpty(patterns)) {\n return [];\n }\n const listed = pipe(\n patterns,\n Arr.map((pattern) => `\\`${pattern}\\``),\n Arr.join(\", \"),\n );\n return [`matchesAny(${subject}, [${listed}])`];\n };\n\nexport const secretsOf = ({ lines = [], paths = [] }: SecretOptions): H56mConfig => ({\n extend: { path: betterleaks },\n filter: pipe(\n [...anyOf(\"finding.line\")([...PUBLIC_LINES, ...lines]), ...anyOf(`attributes[\"path\"]`)(paths)],\n Arr.join(\" || \"),\n ),\n});\n","import { fileURLToPath } from \"node:url\";\n\nimport { recommended } from \"@r_masseater/fu4/presets\";\nimport { Option, Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\nimport type { OxlintOverride } from \"vite-plus/lint\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\nimport type { MarkdownOptions } from \"#/features/define-lint-preset/index.ts\";\nimport {\n decisionTestRules,\n generated,\n lint as preset,\n markdownOf,\n requiredStack,\n structureOf,\n} from \"#/features/define-lint-preset/index.ts\";\n\nimport { tasksOf } from \"./repository-tasks.ts\";\nimport { secretsOf, textlintOf } from \"./repository-text.ts\";\nimport type { SecretOptions, TextOptions } from \"./repository-text.ts\";\n\nexport { secretsOf } from \"./repository-text.ts\";\n\nexport interface RepositoryOptions {\n readonly workspace: WorkspaceSettings;\n readonly overrides?: readonly OxlintOverride[];\n readonly secrets?: SecretOptions;\n readonly textlint?: TextOptions;\n readonly markdown?: MarkdownOptions;\n readonly run?: {\n readonly tasks?: Readonly<Record<string, string>>;\n readonly remoteCache?: string;\n };\n}\n\ninterface SharedCache {\n readonly scripts: true;\n readonly tasks: true;\n readonly remote: { readonly url: string };\n}\n\nconst cacheOf = (remoteCache: string | undefined): SharedCache | true =>\n pipe(\n Option.fromNullishOr(remoteCache),\n Option.match({\n onNone: (): SharedCache | true => true,\n onSome: (url) => ({ scripts: true, tasks: true, remote: { url } }),\n }),\n );\n\ntype Allowed = NonNullable<NonNullable<UserConfig[\"dependencyRules\"]>[\"allowed\"]>;\n\nconst allowedIn = (\n allowances: WorkspaceSettings[\"devDependencies\"],\n field: \"dependencies\" | \"devDependencies\",\n): Allowed =>\n pipe(\n allowances,\n Rec.map(({ workspaces, dependencies }) => ({ workspaces, dependencies, fields: [field] })),\n );\n\nconst COMMIT_CONVENTION = fileURLToPath(import.meta.resolve(\"@commitlint/config-conventional\"));\n\nconst lintOf = ({\n workspace,\n overrides = [],\n}: RepositoryOptions): NonNullable<UserConfig[\"lint\"]> => ({\n ...preset,\n ignorePatterns: [...generated, ...workspace.lint.ignorePatterns],\n overrides: [\n ...preset.overrides,\n {\n files: [...workspace.lint.shadcnUi],\n rules: { \"react/jsx-props-no-spreading\": \"off\" },\n },\n {\n files: [\n ...workspace.lint.publicEntries,\n ...workspace.lint.deployEntries,\n ...workspace.lint.siteEntries,\n ],\n rules: { \"import/no-default-export\": \"off\" },\n },\n ...overrides,\n ...workspace.lint.overrides,\n { files: [\"**/*.test.ts\"], rules: decisionTestRules },\n ],\n});\n\nexport const repositoryConfig = (options: RepositoryOptions): UserConfig => {\n const { workspace, secrets = {}, textlint = {}, markdown = {}, run = {} } = options;\n return {\n commitlint: { extends: [COMMIT_CONVENTION] },\n dependencyRules: {\n allowed: {\n ...allowedIn(workspace.devDependencies, \"devDependencies\"),\n ...allowedIn(workspace.dependencies, \"dependencies\"),\n },\n banned: requiredStack,\n peerRanges: \"intersect\",\n },\n h56m: secretsOf(secrets),\n wism: structureOf({\n members: workspace.members,\n ignorePatterns: workspace.lint.ignorePatterns,\n }),\n textlint: textlintOf(textlint),\n y8: markdownOf(markdown),\n fu4: recommended(),\n test: { projects: [...workspace.testProjects], passWithNoTests: true },\n staged: { \"*\": \"vp fmt --no-error-on-unmatched-pattern\" },\n fmt: {\n ignorePatterns: [...generated, ...workspace.lint.ignorePatterns],\n sortImports: true,\n sortTailwindcss: true,\n sortPackageJson: true,\n },\n lint: lintOf(options),\n run: {\n cache: cacheOf(run.remoteCache),\n tasks: tasksOf({ workspace, commands: run.tasks ?? {} }),\n },\n };\n};\n"],"mappings":";;;;;;AAYA,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,gBAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAUA,MAAM,SAAS,KACb;CARA;CACA;CACA;CACA;CACA;AAIU,GACVA,MAAI,KAAK,SAAS,yCAAyC,MAAM,CACnE;AAIA,MAAM,QAAQ,8DAA8D,OAAO,GAAmB,EAAE;AAExG,MAAM,SAAS;AAEf,MAAM,QACJ;AAEF,MAAM,eAAe;AACrB,MAAM,QAAQ,eAAe,aAAa,kBAAkB,aAAa;AAEzE,MAAa,WAAW,EACtB,WACA,eACuE;CACvE,MAAM,SAAS;EAAC,EAAE,MAAM,KAAK;EAAG,GAAG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9B,OAAO,QAAQ;IAAE;IAAW,UAAU,IAAI,SAAS,CAAC;GAAE,CAAC;EACzD;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"config.mjs","names":["Rec","preset","Arr"],"sources":["../src/app/repository-config.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\n\nimport { recommended } from \"@r_masseater/fu4/presets\";\nimport { Array as Arr, Option, Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\nimport type { OxlintOverride } from \"vite-plus/lint\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\nimport type { MarkdownOptions } from \"#/features/define-lint-preset/index.ts\";\nimport {\n decisionTestRules,\n exempt,\n lint as preset,\n markdownOf,\n requiredStack,\n structureOf,\n} from \"#/features/define-lint-preset/index.ts\";\nimport type { AddedRulesValue } from \"#/shared/lib/added-rules.ts\";\n\nimport { tasksOf } from \"./repository-tasks.ts\";\nimport { secretsOf, textlintOf } from \"./repository-text.ts\";\nimport type { TextOptions } from \"./repository-text.ts\";\n\nexport { secretsOf } from \"./repository-text.ts\";\n\nexport interface AddedOverride {\n readonly files: readonly string[];\n readonly excludeFiles?: readonly string[];\n readonly rules: AddedRulesValue;\n}\n\nexport interface RepositoryOptions {\n readonly workspace: WorkspaceSettings;\n readonly overrides?: readonly AddedOverride[];\n readonly textlint?: TextOptions;\n readonly markdown?: Omit<MarkdownOptions, \"indexSkill\">;\n readonly run?: {\n readonly tasks?: Readonly<Record<string, string>>;\n readonly remoteCache?: string;\n };\n}\n\ninterface SharedCache {\n readonly scripts: true;\n readonly tasks: true;\n readonly remote: { readonly url: string };\n}\n\nconst cacheOf = (remoteCache: string | undefined): SharedCache | true =>\n pipe(\n Option.fromNullishOr(remoteCache),\n Option.match({\n onNone: (): SharedCache | true => true,\n onSome: (url) => ({ scripts: true, tasks: true, remote: { url } }),\n }),\n );\n\ntype Allowed = NonNullable<NonNullable<UserConfig[\"dependencyRules\"]>[\"allowed\"]>;\n\nconst allowedIn = (\n allowances: WorkspaceSettings[\"devDependencies\"],\n field: \"dependencies\" | \"devDependencies\",\n): Allowed =>\n pipe(\n allowances,\n Rec.map(({ workspaces, dependencies }) => ({ workspaces, dependencies, fields: [field] })),\n );\n\nconst COMMIT_CONVENTION = fileURLToPath(import.meta.resolve(\"@commitlint/config-conventional\"));\n\nconst added = ({ files, excludeFiles, rules }: AddedOverride): OxlintOverride =>\n pipe(\n Option.fromUndefinedOr(excludeFiles),\n Option.match({\n onNone: (): OxlintOverride => ({ files: [...files], rules: { ...rules } }),\n onSome: (excluded): OxlintOverride => ({\n files: [...files],\n excludeFiles: [...excluded],\n rules: { ...rules },\n }),\n }),\n );\n\nconst lintOf = ({\n workspace,\n overrides = [],\n}: RepositoryOptions): NonNullable<UserConfig[\"lint\"]> => ({\n ...preset,\n ignorePatterns: exempt,\n overrides: [\n ...preset.overrides,\n {\n files: [...workspace.lint.shadcnUi],\n rules: { \"react/jsx-props-no-spreading\": \"off\" },\n },\n {\n files: [\n ...workspace.lint.publicEntries,\n ...workspace.lint.deployEntries,\n ...workspace.lint.siteEntries,\n ],\n rules: { \"import/no-default-export\": \"off\" },\n },\n ...pipe(overrides, Arr.map(added)),\n ...workspace.lint.overrides,\n { files: [\"**/*.test.ts\"], rules: decisionTestRules },\n ],\n});\n\nexport const repositoryConfig = (options: RepositoryOptions): UserConfig => {\n const { workspace, textlint = {}, markdown = {}, run = {} } = options;\n return {\n commitlint: { extends: [COMMIT_CONVENTION] },\n dependencyRules: {\n allowed: {\n ...allowedIn(workspace.devDependencies, \"devDependencies\"),\n ...allowedIn(workspace.dependencies, \"dependencies\"),\n },\n banned: requiredStack,\n peerRanges: \"intersect\",\n },\n h56m: secretsOf(),\n wism: structureOf({\n members: workspace.members,\n ignorePatterns: exempt,\n }),\n textlint: textlintOf(textlint),\n y8: markdownOf({ ...markdown, indexSkill: workspace.indexSkill }),\n fu4: recommended(),\n test: { projects: [...workspace.testProjects], passWithNoTests: true },\n staged: { \"*\": \"vp fmt --no-error-on-unmatched-pattern\" },\n fmt: {\n ignorePatterns: exempt,\n sortImports: true,\n sortTailwindcss: true,\n sortPackageJson: true,\n },\n lint: lintOf(options),\n run: {\n cache: cacheOf(run.remoteCache),\n tasks: tasksOf({ workspace, commands: run.tasks ?? {} }),\n },\n };\n};\n"],"mappings":";;;;;;AAgDA,MAAM,WAAW,gBACf,KACE,OAAO,cAAc,WAAW,GAChC,OAAO,MAAM;CACX,cAAkC;CAClC,SAAS,SAAS;EAAE,SAAS;EAAM,OAAO;EAAM,QAAQ,EAAE,IAAI;CAAE;AAClE,CAAC,CACH;AAIF,MAAM,aACJ,YACA,UAEA,KACE,YACAA,OAAI,KAAK,EAAE,YAAY,oBAAoB;CAAE;CAAY;CAAc,QAAQ,CAAC,KAAK;AAAE,EAAE,CAC3F;AAEF,MAAM,oBAAoB,cAAc,YAAY,QAAQ,iCAAiC,CAAC;AAE9F,MAAM,SAAS,EAAE,OAAO,cAAc,YACpC,KACE,OAAO,gBAAgB,YAAY,GACnC,OAAO,MAAM;CACX,eAA+B;EAAE,OAAO,CAAC,GAAG,KAAK;EAAG,OAAO,EAAE,GAAG,MAAM;CAAE;CACxE,SAAS,cAA8B;EACrC,OAAO,CAAC,GAAG,KAAK;EAChB,cAAc,CAAC,GAAG,QAAQ;EAC1B,OAAO,EAAE,GAAG,MAAM;CACpB;AACF,CAAC,CACH;AAEF,MAAM,UAAU,EACd,WACA,YAAY,CAAC,SAC4C;CACzD,GAAGC;CACH,gBAAgB;CAChB,WAAW;EACT,GAAGA,KAAO;EACV;GACE,OAAO,CAAC,GAAG,UAAU,KAAK,QAAQ;GAClC,OAAO,EAAE,gCAAgC,MAAM;EACjD;EACA;GACE,OAAO;IACL,GAAG,UAAU,KAAK;IAClB,GAAG,UAAU,KAAK;IAClB,GAAG,UAAU,KAAK;GACpB;GACA,OAAO,EAAE,4BAA4B,MAAM;EAC7C;EACA,GAAG,KAAK,WAAWC,MAAI,IAAI,KAAK,CAAC;EACjC,GAAG,UAAU,KAAK;EAClB;GAAE,OAAO,CAAC,cAAc;GAAG,OAAO;EAAkB;CACtD;AACF;AAEA,MAAa,oBAAoB,YAA2C;CAC1E,MAAM,EAAE,WAAW,WAAW,CAAC,GAAG,WAAW,CAAC,GAAG,MAAM,CAAC,MAAM;CAC9D,OAAO;EACL,YAAY,EAAE,SAAS,CAAC,iBAAiB,EAAE;EAC3C,iBAAiB;GACf,SAAS;IACP,GAAG,UAAU,UAAU,iBAAiB,iBAAiB;IACzD,GAAG,UAAU,UAAU,cAAc,cAAc;GACrD;GACA,QAAQ;GACR,YAAY;EACd;EACA,MAAM,UAAU;EAChB,MAAM,YAAY;GAChB,SAAS,UAAU;GACnB,gBAAgB;EAClB,CAAC;EACD,UAAU,WAAW,QAAQ;EAC7B,IAAI,WAAW;GAAE,GAAG;GAAU,YAAY,UAAU;EAAW,CAAC;EAChE,KAAK,YAAY;EACjB,MAAM;GAAE,UAAU,CAAC,GAAG,UAAU,YAAY;GAAG,iBAAiB;EAAK;EACrE,QAAQ,EAAE,KAAK,yCAAyC;EACxD,KAAK;GACH,gBAAgB;GAChB,aAAa;GACb,iBAAiB;GACjB,iBAAiB;EACnB;EACA,MAAM,OAAO,OAAO;EACpB,KAAK;GACH,OAAO,QAAQ,IAAI,WAAW;GAC9B,OAAO,QAAQ;IAAE;IAAW,UAAU,IAAI,SAAS,CAAC;GAAE,CAAC;EACzD;CACF;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _default } from "./index-CEazCJ_w.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/decision-rules.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { g as default } from "./define-lint-preset-B-hC9_df.mjs";
|
|
@@ -2,7 +2,6 @@ import { n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./
|
|
|
2
2
|
import { createRequire, registerHooks } from "node:module";
|
|
3
3
|
import { Array, Option, Predicate, Record, String, Struct, pipe } from "effect";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { createDecisionPlugin, defineDecisionRule } from "@r_masseater/oxlint-plugin-decision";
|
|
6
5
|
import tanstackQuery from "@r_masseater/oxlint-typed-rules/tanstack-query";
|
|
7
6
|
import tanstackRouter from "@r_masseater/oxlint-typed-rules/tanstack-router";
|
|
8
7
|
import { plugin } from "@shadcn/lint";
|
|
@@ -11,10 +10,33 @@ import { presets } from "@effect/tsgo/oxlint-presets";
|
|
|
11
10
|
import htmlReact from "@html-eslint/eslint-plugin-react";
|
|
12
11
|
import eslintReact from "@r_masseater/oxlint-typed-rules/react";
|
|
13
12
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
13
|
+
import { createDecisionPlugin, defineDecisionRule } from "@r_masseater/oxlint-plugin-decision";
|
|
14
14
|
import remotion from "@r_masseater/oxlint-typed-rules/remotion";
|
|
15
15
|
import { rustCrate, skill, structure, workspace } from "@r_masseater/wism/presets";
|
|
16
16
|
import presetJa from "@r_masseater/textlint-rule-preset-ja";
|
|
17
17
|
import { recommended } from "@r_masseater/y8/presets";
|
|
18
|
+
// src/shared/config/exempt.ts
|
|
19
|
+
const generated = [
|
|
20
|
+
"**/routeTree.gen.ts",
|
|
21
|
+
"**/generated/**",
|
|
22
|
+
"**/drizzle/**/snapshot.json",
|
|
23
|
+
".claude/skills/**",
|
|
24
|
+
".intent/**",
|
|
25
|
+
"AGENTS.md",
|
|
26
|
+
"CLAUDE.md",
|
|
27
|
+
"**/CHANGELOG.md",
|
|
28
|
+
".github/release-please/*manifest.json",
|
|
29
|
+
"**/.release-please-manifest.json",
|
|
30
|
+
"**/*.d.*.ts",
|
|
31
|
+
"**/src-tauri/gen/**"
|
|
32
|
+
];
|
|
33
|
+
const checkerInputs = ["**/fixtures/**"];
|
|
34
|
+
const vendored = ["**/upstream/**"];
|
|
35
|
+
const exempt = [
|
|
36
|
+
...generated,
|
|
37
|
+
...checkerInputs,
|
|
38
|
+
...vendored
|
|
39
|
+
];
|
|
18
40
|
// src/features/define-lint-preset/config/lint-overrides.config.ts
|
|
19
41
|
const LOGPUSH = "Property[key.name=\"logpush\"]:not([value.value=false])";
|
|
20
42
|
const LOGPUSH_MESSAGE = "Worker には logpush: true を付ける。付けないと、その Worker のログが Logpush に流れない";
|
|
@@ -166,20 +188,6 @@ const webGuidanceRules = {
|
|
|
166
188
|
}]
|
|
167
189
|
};
|
|
168
190
|
// src/features/define-lint-preset/config/lint.config.ts
|
|
169
|
-
const generated = [
|
|
170
|
-
"**/routeTree.gen.ts",
|
|
171
|
-
"**/generated/**",
|
|
172
|
-
"**/drizzle/**/snapshot.json",
|
|
173
|
-
".claude/skills/**",
|
|
174
|
-
".intent/**",
|
|
175
|
-
"AGENTS.md",
|
|
176
|
-
"CLAUDE.md",
|
|
177
|
-
"**/CHANGELOG.md",
|
|
178
|
-
".github/release-please/*manifest.json",
|
|
179
|
-
"**/.release-please-manifest.json",
|
|
180
|
-
"**/*.d.*.ts",
|
|
181
|
-
"**/src-tauri/gen/**"
|
|
182
|
-
];
|
|
183
191
|
const asErrors = (names) => Record.fromEntries(pipe(names, Array.map((name) => [name, "error"])));
|
|
184
192
|
const allRulesOf = ({ prefix, rules }) => asErrors(pipe(Record.keys(rules), Array.map((rule) => `${prefix}/${rule}`)));
|
|
185
193
|
const reactHooksRules = asErrors(pipe(Struct.keys(reactHooks.configs["recommended-latest"].rules), Array.map(String.replace("react-hooks/", "react-hooks-js/"))));
|
|
@@ -376,6 +384,7 @@ const lint = {
|
|
|
376
384
|
...baselineJs.configs.recommended().rules,
|
|
377
385
|
"baseline-js/use-baseline": ["error", {
|
|
378
386
|
available: "widely",
|
|
387
|
+
ignoreFeatures: ["top-level-await"],
|
|
379
388
|
includeWebApis: { preset: "auto" },
|
|
380
389
|
includeJsBuiltins: { preset: "auto" }
|
|
381
390
|
}],
|
|
@@ -440,6 +449,29 @@ const lint = {
|
|
|
440
449
|
},
|
|
441
450
|
overrides: [
|
|
442
451
|
removalPolicyOverride,
|
|
452
|
+
{
|
|
453
|
+
files: [".github/**/*.ts"],
|
|
454
|
+
rules: {
|
|
455
|
+
"baseline-js/use-baseline": "off",
|
|
456
|
+
"effecttsgo/async-function": "off",
|
|
457
|
+
"effecttsgo/global-console": "off",
|
|
458
|
+
"effecttsgo/global-fetch": "off",
|
|
459
|
+
"effecttsgo/global-json": "off",
|
|
460
|
+
"effecttsgo/missing-pipeable-signature": "off",
|
|
461
|
+
"effecttsgo/node-builtin-import": "off",
|
|
462
|
+
"effecttsgo/prefer-effect-array": "off",
|
|
463
|
+
"effecttsgo/prefer-effect-record": "off",
|
|
464
|
+
"effecttsgo/prefer-effect-string": "off",
|
|
465
|
+
"effecttsgo/process-env": "off",
|
|
466
|
+
"eslint/no-console": "off",
|
|
467
|
+
"eslint/no-undefined": "off",
|
|
468
|
+
"import/no-relative-parent-imports": "off",
|
|
469
|
+
"node/no-process-env": "off",
|
|
470
|
+
"node/no-sync": "off",
|
|
471
|
+
"oxc/no-async-await": "off",
|
|
472
|
+
"unicorn/no-process-exit": "off"
|
|
473
|
+
}
|
|
474
|
+
},
|
|
443
475
|
alchemyOverride,
|
|
444
476
|
{
|
|
445
477
|
files: [
|
|
@@ -454,10 +486,6 @@ const lint = {
|
|
|
454
486
|
files: ["**/bin/**"],
|
|
455
487
|
rules: { "baseline-js/use-baseline": "off" }
|
|
456
488
|
},
|
|
457
|
-
{
|
|
458
|
-
files: ["**/masseater-utils/src/**"],
|
|
459
|
-
rules: { "msch-lint/main-through-node-main": "off" }
|
|
460
|
-
},
|
|
461
489
|
{
|
|
462
490
|
files: [
|
|
463
491
|
"**/*.test.ts",
|
|
@@ -756,47 +784,53 @@ const isFilter = (value) => Predicate.isFunction(value);
|
|
|
756
784
|
const filterIn = (specifier, loaded) => pipe(Option.liftPredicate(loaded, isFilter), Option.getOrThrowWith(() => /* @__PURE__ */ new TypeError(`${specifier} does not export a textlint filter`)));
|
|
757
785
|
const textlintFilters = { comments: filterIn("textlint-filter-rule-comments", createRequire(import.meta.url)("textlint-filter-rule-comments")) };
|
|
758
786
|
// src/features/define-lint-preset/config/markdown.config.ts
|
|
759
|
-
const
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
787
|
+
const skillNamesOf = (indexSkill) => Option.match(indexSkill, {
|
|
788
|
+
onNone: () => ({}),
|
|
789
|
+
onSome: (index) => ({ index })
|
|
790
|
+
});
|
|
791
|
+
const docsOf = (indexSkill) => {
|
|
792
|
+
const skillNames = skillNamesOf(indexSkill);
|
|
793
|
+
return {
|
|
794
|
+
agents: {
|
|
795
|
+
sections: [
|
|
796
|
+
["Tech stack"],
|
|
797
|
+
["Commands"],
|
|
798
|
+
["Rules"]
|
|
799
|
+
],
|
|
800
|
+
commands: ["Commands"],
|
|
801
|
+
stack: ["Tech stack"],
|
|
802
|
+
skillNames
|
|
803
|
+
},
|
|
804
|
+
skills: { skillNames }
|
|
805
|
+
};
|
|
772
806
|
};
|
|
773
807
|
const MARKDOWN_IGNORES = [
|
|
774
808
|
".agents/skills/**",
|
|
775
|
-
"**/fixtures/**",
|
|
776
|
-
"**/upstream/**",
|
|
777
809
|
"CHANGELOG.md",
|
|
778
|
-
"**/CLAUDE.md"
|
|
810
|
+
"**/CLAUDE.md",
|
|
811
|
+
...exempt
|
|
779
812
|
];
|
|
780
|
-
const
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
...
|
|
786
|
-
...docs
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
}
|
|
800
|
-
|
|
813
|
+
const MARKDOWN_RULES = { "agnix/XP-001": "off" };
|
|
814
|
+
const markdownOf = ({ indexSkill, docs = {} }) => {
|
|
815
|
+
const base = docsOf(indexSkill);
|
|
816
|
+
return {
|
|
817
|
+
extends: [recommended({
|
|
818
|
+
...base,
|
|
819
|
+
...docs,
|
|
820
|
+
agents: {
|
|
821
|
+
...base.agents,
|
|
822
|
+
...docs.agents
|
|
823
|
+
},
|
|
824
|
+
skills: {
|
|
825
|
+
...base.skills,
|
|
826
|
+
...docs.skills
|
|
827
|
+
}
|
|
828
|
+
})],
|
|
829
|
+
rules: MARKDOWN_RULES,
|
|
830
|
+
reportUnusedDirectives: true,
|
|
831
|
+
ignores: MARKDOWN_IGNORES
|
|
832
|
+
};
|
|
833
|
+
};
|
|
834
|
+
export { exempt as S, alchemyOverride as _, textlintPresets as a, removalPolicyOverride as b, remotionRules as c, requiredStack as d, lint as f, decision_rules_default as g, decisionTestRules as h, textlintFilters as i, tracedRules as l, decisionRules as m, MARKDOWN_RULES as n, structureOf as o, allRulesOf as p, markdownOf as r, videoRules as s, MARKDOWN_IGNORES as t, INSTRUMENTATION as u, cloudflareResourceSyntax as v, removalPolicySyntax as x, commandsOverride as y };
|
|
801
835
|
|
|
802
|
-
//# sourceMappingURL=define-lint-preset-
|
|
836
|
+
//# sourceMappingURL=define-lint-preset-B-hC9_df.mjs.map
|