@r_masseater/msch 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cli-contract-BeVYJPZW.mjs → cli-contract-C0YCHq4g.mjs} +13 -2
- package/dist/{cli-contract-BeVYJPZW.mjs.map → cli-contract-C0YCHq4g.mjs.map} +1 -1
- package/dist/cli.mjs +1008 -373
- package/dist/cli.mjs.map +1 -1
- package/dist/decision-rules.d.mts +3 -2
- package/dist/lint.d.mts +18 -9
- package/dist/lint.mjs +244 -184
- package/dist/lint.mjs.map +1 -1
- package/dist/oxlint.mjs +1 -1
- package/dist/{repository-files-BiKs7S7N.mjs → repository-files-B11FFAIk.mjs} +10 -3
- package/dist/repository-files-B11FFAIk.mjs.map +1 -0
- package/dist/{workspace-BJk4TcI8.mjs → workspace-CMPDXFWk.mjs} +44 -21
- package/dist/workspace-CMPDXFWk.mjs.map +1 -0
- package/dist/workspace-settings.mjs +2 -2
- package/package.json +3 -1
- package/skills/msch-checks/SKILL.md +22 -0
- package/dist/decision-rules-BFywSPLT.d.mts +0 -3
- package/dist/repository-files-BiKs7S7N.mjs.map +0 -1
- package/dist/workspace-BJk4TcI8.mjs.map +0 -1
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export { _default as default };
|
|
1
|
+
declare const _default: import("@r_masseater/oxlint-plugin-decision").DecisionPlugin;
|
|
2
|
+
export { _default as default };
|
|
3
|
+
//# sourceMappingURL=decision-rules.d.mts.map
|
package/dist/lint.d.mts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const generated: string[];
|
|
2
|
+
export declare const allRulesOf: ({ prefix, rules }: Readonly<{
|
|
3
|
+
prefix: string;
|
|
4
|
+
rules: Readonly<Record<string, unknown>>;
|
|
5
|
+
}>) => Readonly<Record<string, "error">>;
|
|
6
|
+
declare const decisionPluginName: string;
|
|
7
|
+
export declare const decisionRules: Readonly<Record<string, "error">>;
|
|
8
|
+
export declare const decisionTestRules: Record<string, "off">;
|
|
2
9
|
export declare const lint: {
|
|
3
10
|
ignorePatterns: string[];
|
|
4
11
|
plugins: ("effecttsgo" | "eslint" | "import" | "jsdoc" | "jsx-a11y" | "node" | "oxc" | "promise" | "react" | "react-perf" | "typescript" | "unicorn")[];
|
|
@@ -87,6 +94,10 @@ export declare const lint: {
|
|
|
87
94
|
message: string;
|
|
88
95
|
}>[];
|
|
89
96
|
}];
|
|
97
|
+
"eslint-js/no-restricted-syntax": ["error", ...Readonly<{
|
|
98
|
+
selector: string;
|
|
99
|
+
message: string;
|
|
100
|
+
}>[]];
|
|
90
101
|
"typescript/prefer-readonly-parameter-types": ["error", {
|
|
91
102
|
ignoreInferredTypes: true;
|
|
92
103
|
allow: ({
|
|
@@ -142,7 +153,7 @@ export declare const lint: {
|
|
|
142
153
|
rules: Readonly<Record<string, "off">>;
|
|
143
154
|
})[];
|
|
144
155
|
settings: {
|
|
145
|
-
[
|
|
156
|
+
[decisionPluginName]: {
|
|
146
157
|
model: string;
|
|
147
158
|
timeoutMs: number;
|
|
148
159
|
ci: string;
|
|
@@ -155,6 +166,10 @@ export declare const lint: {
|
|
|
155
166
|
reportUnusedDisableDirectives: "error";
|
|
156
167
|
};
|
|
157
168
|
};
|
|
169
|
+
export declare const cloudflareResourceSyntax: readonly Readonly<{
|
|
170
|
+
selector: string;
|
|
171
|
+
message: string;
|
|
172
|
+
}>[];
|
|
158
173
|
export declare const removalPolicySyntax: Readonly<{
|
|
159
174
|
selector: string;
|
|
160
175
|
message: string;
|
|
@@ -189,13 +204,6 @@ export declare const restrictedImports: {
|
|
|
189
204
|
message: string;
|
|
190
205
|
}>[];
|
|
191
206
|
};
|
|
192
|
-
export declare const generated: string[];
|
|
193
|
-
export declare const allRulesOf: ({ prefix, rules }: Readonly<{
|
|
194
|
-
prefix: string;
|
|
195
|
-
rules: Readonly<Record<string, unknown>>;
|
|
196
|
-
}>) => Readonly<Record<string, "error">>;
|
|
197
|
-
export declare const decisionRules: Readonly<Record<string, "error">>;
|
|
198
|
-
export declare const decisionTestRules: Record<string, "off">;
|
|
199
207
|
export declare const fsdRules: {
|
|
200
208
|
readonly "fsd/insignificant-slice": "off";
|
|
201
209
|
readonly "fsd/no-cross-imports": "error";
|
|
@@ -226,4 +234,5 @@ export declare const readonlyParameterAllow: ({
|
|
|
226
234
|
package: string;
|
|
227
235
|
name: string;
|
|
228
236
|
})[];
|
|
237
|
+
export {};
|
|
229
238
|
//# sourceMappingURL=lint.d.mts.map
|
package/dist/lint.mjs
CHANGED
|
@@ -11,6 +11,22 @@ import htmlReact from "@html-eslint/eslint-plugin-react";
|
|
|
11
11
|
import eslintReact from "@r_masseater/oxlint-typed-rules/react";
|
|
12
12
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
13
13
|
// src/features/lint-preset/config/lint-overrides.config.ts
|
|
14
|
+
const LOGPUSH = "Property[key.name=\"logpush\"]:not([value.value=false])";
|
|
15
|
+
const LOGPUSH_MESSAGE = "Worker には logpush: true を付ける。付けないと、その Worker のログが Logpush に流れない";
|
|
16
|
+
const cloudflareResourceSyntax = [
|
|
17
|
+
{
|
|
18
|
+
selector: `CallExpression[callee.object.name="Workers"][callee.property.name="Worker"] > ObjectExpression.arguments:not(:has(${LOGPUSH}))`,
|
|
19
|
+
message: LOGPUSH_MESSAGE
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
selector: `CallExpression[callee.object.name="Website"] > ObjectExpression.arguments:not(:has(${LOGPUSH}))`,
|
|
23
|
+
message: LOGPUSH_MESSAGE
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
selector: "MemberExpression[object.name=\"Rum\"][property.name=\"Site\"]",
|
|
27
|
+
message: "Rum.Site は使わない。CI のトークンに Account Settings Write が要る。Cloudflare API でホストごとに一度サイトを作り、トークンを CF_BEACON_TOKEN に置く"
|
|
28
|
+
}
|
|
29
|
+
];
|
|
14
30
|
const removalPolicySyntax = {
|
|
15
31
|
selector: "CallExpression[callee.object.name=/^(D1|R2)$/][callee.property.name=/^(Database|Bucket)$/]:not(CallExpression[callee.property.name=\"pipe\"][arguments.0.callee.object.name=\"RemovalPolicy\"] > MemberExpression.callee > CallExpression.object)",
|
|
16
32
|
message: "D1 と R2 は作り直すと中身が消えるので、alchemy の RemovalPolicy.protect() を .pipe で付けて置き換えと削除を止める"
|
|
@@ -24,6 +40,7 @@ const alchemyOverride = {
|
|
|
24
40
|
files: ["**/alchemy.run.ts"],
|
|
25
41
|
rules: { "eslint-js/no-restricted-syntax": [
|
|
26
42
|
"error",
|
|
43
|
+
...cloudflareResourceSyntax,
|
|
27
44
|
removalPolicySyntax,
|
|
28
45
|
{
|
|
29
46
|
selector: "CallExpression[callee.name=\"Stack\"]:not([arguments.0.name=\"APP_NAME\"])",
|
|
@@ -48,188 +65,6 @@ const commandsOverride = {
|
|
|
48
65
|
}
|
|
49
66
|
};
|
|
50
67
|
// src/features/lint-preset/config/lint.config.ts
|
|
51
|
-
const REACT_STATE_HOOKS = [
|
|
52
|
-
"useState",
|
|
53
|
-
"useReducer",
|
|
54
|
-
"createContext",
|
|
55
|
-
"useContext"
|
|
56
|
-
];
|
|
57
|
-
const HAND_WRITTEN_SQL = "SQL を手書きせず Drizzle のクエリビルダーを使う";
|
|
58
|
-
const UI_STATE = "UI 状態は effect-atom だけで扱う";
|
|
59
|
-
const INSTRUMENTATION = "計装は Effect のトレーシングだけで扱う";
|
|
60
|
-
const INFRASTRUCTURE = "インフラは Alchemy の IaC と Cloudflare だけで扱い、wrangler は使わない";
|
|
61
|
-
const requiredStack = {
|
|
62
|
-
[UI_STATE]: [
|
|
63
|
-
"zustand",
|
|
64
|
-
"jotai",
|
|
65
|
-
"valtio",
|
|
66
|
-
"recoil",
|
|
67
|
-
"mobx",
|
|
68
|
-
"mobx-*",
|
|
69
|
-
"redux",
|
|
70
|
-
"@reduxjs/*",
|
|
71
|
-
"react-redux",
|
|
72
|
-
"xstate",
|
|
73
|
-
"@xstate/*",
|
|
74
|
-
"nanostores",
|
|
75
|
-
"@nanostores/*",
|
|
76
|
-
"@preact/signals*"
|
|
77
|
-
],
|
|
78
|
-
"サーバー状態は TanStack Query と Eden だけで扱う": [
|
|
79
|
-
"swr",
|
|
80
|
-
"react-query",
|
|
81
|
-
"@apollo/*",
|
|
82
|
-
"urql",
|
|
83
|
-
"@urql/*",
|
|
84
|
-
"axios",
|
|
85
|
-
"ky",
|
|
86
|
-
"ofetch",
|
|
87
|
-
"got",
|
|
88
|
-
"node-fetch",
|
|
89
|
-
"graphql-request",
|
|
90
|
-
"@trpc/*"
|
|
91
|
-
],
|
|
92
|
-
"ルーティングとサーバーは TanStack Start と Elysia だけで扱う": [
|
|
93
|
-
"react-router",
|
|
94
|
-
"react-router-dom",
|
|
95
|
-
"next",
|
|
96
|
-
"@remix-run/*",
|
|
97
|
-
"wouter",
|
|
98
|
-
"express",
|
|
99
|
-
"hono",
|
|
100
|
-
"fastify",
|
|
101
|
-
"koa",
|
|
102
|
-
"@nestjs/*"
|
|
103
|
-
],
|
|
104
|
-
"データベースは Drizzle だけで扱い、スキーマはマイグレーションで生成する": [
|
|
105
|
-
"prisma",
|
|
106
|
-
"@prisma/*",
|
|
107
|
-
"typeorm",
|
|
108
|
-
"sequelize",
|
|
109
|
-
"kysely",
|
|
110
|
-
"knex",
|
|
111
|
-
"@mikro-orm/*",
|
|
112
|
-
"better-sqlite3",
|
|
113
|
-
"pg",
|
|
114
|
-
"mysql2"
|
|
115
|
-
],
|
|
116
|
-
"認証は better-auth だけで扱う": [
|
|
117
|
-
"next-auth",
|
|
118
|
-
"@auth/*",
|
|
119
|
-
"lucia",
|
|
120
|
-
"passport",
|
|
121
|
-
"passport-*",
|
|
122
|
-
"@clerk/*",
|
|
123
|
-
"firebase/auth",
|
|
124
|
-
"@supabase/*"
|
|
125
|
-
],
|
|
126
|
-
"UI は shadcn/ui と Tailwind CSS だけで組む": [
|
|
127
|
-
"@mui/*",
|
|
128
|
-
"antd",
|
|
129
|
-
"@chakra-ui/*",
|
|
130
|
-
"@mantine/*",
|
|
131
|
-
"styled-components",
|
|
132
|
-
"@emotion/*",
|
|
133
|
-
"bootstrap",
|
|
134
|
-
"react-bootstrap"
|
|
135
|
-
],
|
|
136
|
-
"検証、日時、ログ、関数型ユーティリティは Effect だけで扱う": [
|
|
137
|
-
"zod",
|
|
138
|
-
"yup",
|
|
139
|
-
"joi",
|
|
140
|
-
"valibot",
|
|
141
|
-
"arktype",
|
|
142
|
-
"io-ts",
|
|
143
|
-
"superstruct",
|
|
144
|
-
"moment",
|
|
145
|
-
"dayjs",
|
|
146
|
-
"date-fns",
|
|
147
|
-
"luxon",
|
|
148
|
-
"winston",
|
|
149
|
-
"pino",
|
|
150
|
-
"bunyan",
|
|
151
|
-
"loglevel",
|
|
152
|
-
"lodash",
|
|
153
|
-
"lodash-es",
|
|
154
|
-
"ramda",
|
|
155
|
-
"rxjs",
|
|
156
|
-
"fp-ts",
|
|
157
|
-
"neverthrow",
|
|
158
|
-
"ts-results",
|
|
159
|
-
"purify-ts"
|
|
160
|
-
],
|
|
161
|
-
"CSV は effect/encoding の Csv だけで読み書きする": [
|
|
162
|
-
"papaparse",
|
|
163
|
-
"csv-parse",
|
|
164
|
-
"csv-parser",
|
|
165
|
-
"csv-stringify",
|
|
166
|
-
"fast-csv",
|
|
167
|
-
"@fast-csv/*",
|
|
168
|
-
"d3-dsv"
|
|
169
|
-
],
|
|
170
|
-
"フィーチャーフラグは OpenFeature だけで扱う": [
|
|
171
|
-
"launchdarkly-*",
|
|
172
|
-
"@launchdarkly/*",
|
|
173
|
-
"@growthbook/*",
|
|
174
|
-
"unleash-client",
|
|
175
|
-
"flagsmith",
|
|
176
|
-
"@vercel/flags"
|
|
177
|
-
],
|
|
178
|
-
[INSTRUMENTATION]: [
|
|
179
|
-
"@opentelemetry/*",
|
|
180
|
-
"dd-trace",
|
|
181
|
-
"newrelic"
|
|
182
|
-
],
|
|
183
|
-
[INFRASTRUCTURE]: [
|
|
184
|
-
"wrangler",
|
|
185
|
-
"miniflare",
|
|
186
|
-
"@cloudflare/vite-plugin",
|
|
187
|
-
"@vercel/*",
|
|
188
|
-
"@netlify/*",
|
|
189
|
-
"aws-cdk",
|
|
190
|
-
"aws-cdk-lib",
|
|
191
|
-
"@pulumi/*",
|
|
192
|
-
"cdktf"
|
|
193
|
-
]
|
|
194
|
-
};
|
|
195
|
-
const requiredStackEntries = Array.flatMap(Record.toEntries(requiredStack), ([message, modules]) => pipe(modules, Array.map((module) => ({
|
|
196
|
-
message,
|
|
197
|
-
module
|
|
198
|
-
}))));
|
|
199
|
-
const requiredStackPaths = Array.map(pipe(requiredStackEntries, Array.filter(({ module }) => !String.includes("*")(module))), ({ message, module }) => ({
|
|
200
|
-
name: module,
|
|
201
|
-
message
|
|
202
|
-
}));
|
|
203
|
-
const requiredStackPatterns = pipe(requiredStackEntries, Array.map(({ message, module }) => {
|
|
204
|
-
if (String.includes("*")(module)) return {
|
|
205
|
-
group: [module, `${module}/**`],
|
|
206
|
-
message
|
|
207
|
-
};
|
|
208
|
-
return {
|
|
209
|
-
group: [`${module}/**`],
|
|
210
|
-
message
|
|
211
|
-
};
|
|
212
|
-
}));
|
|
213
|
-
const restrictedImports = {
|
|
214
|
-
paths: [
|
|
215
|
-
{
|
|
216
|
-
name: "react",
|
|
217
|
-
importNames: [...REACT_STATE_HOOKS],
|
|
218
|
-
message: UI_STATE
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
name: "drizzle-orm",
|
|
222
|
-
importNames: ["sql"],
|
|
223
|
-
message: HAND_WRITTEN_SQL
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: "drizzle-orm/sql",
|
|
227
|
-
message: HAND_WRITTEN_SQL
|
|
228
|
-
},
|
|
229
|
-
...requiredStackPaths
|
|
230
|
-
],
|
|
231
|
-
patterns: [...requiredStackPatterns]
|
|
232
|
-
};
|
|
233
68
|
const generated = [
|
|
234
69
|
"**/routeTree.gen.ts",
|
|
235
70
|
"**/generated/**",
|
|
@@ -305,6 +140,11 @@ const BROWSER_HANDLES = [
|
|
|
305
140
|
"MouseEvent",
|
|
306
141
|
"AbortSignal",
|
|
307
142
|
"ImageBitmap",
|
|
143
|
+
"AudioContext",
|
|
144
|
+
"OfflineAudioContext",
|
|
145
|
+
"AnalyserNode",
|
|
146
|
+
"AudioBuffer",
|
|
147
|
+
"AudioBufferSourceNode",
|
|
308
148
|
...WEBGPU_HANDLES
|
|
309
149
|
];
|
|
310
150
|
// src/features/lint-preset/config/readonly-lint-tools.config.ts
|
|
@@ -837,6 +677,225 @@ const readonlyParameterAllow = [
|
|
|
837
677
|
]
|
|
838
678
|
}
|
|
839
679
|
];
|
|
680
|
+
// src/features/lint-preset/config/required-stack.config.ts
|
|
681
|
+
const REACT_STATE_HOOKS = [
|
|
682
|
+
"useState",
|
|
683
|
+
"useReducer",
|
|
684
|
+
"createContext",
|
|
685
|
+
"useContext"
|
|
686
|
+
];
|
|
687
|
+
const HAND_WRITTEN_SQL = "SQL を手書きせず Drizzle のクエリビルダーを使う";
|
|
688
|
+
const UI_STATE = "UI 状態は effect-atom だけで扱う";
|
|
689
|
+
const INSTRUMENTATION = "計装は Effect のトレーシングだけで扱う";
|
|
690
|
+
const INFRASTRUCTURE = "インフラは Alchemy の IaC と Cloudflare だけで扱い、wrangler は使わない";
|
|
691
|
+
const requiredStack = {
|
|
692
|
+
[UI_STATE]: [
|
|
693
|
+
"zustand",
|
|
694
|
+
"jotai",
|
|
695
|
+
"valtio",
|
|
696
|
+
"recoil",
|
|
697
|
+
"mobx",
|
|
698
|
+
"mobx-*",
|
|
699
|
+
"redux",
|
|
700
|
+
"@reduxjs/*",
|
|
701
|
+
"react-redux",
|
|
702
|
+
"xstate",
|
|
703
|
+
"@xstate/*",
|
|
704
|
+
"nanostores",
|
|
705
|
+
"@nanostores/*",
|
|
706
|
+
"@preact/signals*"
|
|
707
|
+
],
|
|
708
|
+
"サーバー状態は TanStack Query と Eden だけで扱う": [
|
|
709
|
+
"swr",
|
|
710
|
+
"react-query",
|
|
711
|
+
"@apollo/*",
|
|
712
|
+
"urql",
|
|
713
|
+
"@urql/*",
|
|
714
|
+
"axios",
|
|
715
|
+
"ky",
|
|
716
|
+
"ofetch",
|
|
717
|
+
"got",
|
|
718
|
+
"node-fetch",
|
|
719
|
+
"graphql-request",
|
|
720
|
+
"@trpc/*"
|
|
721
|
+
],
|
|
722
|
+
"ルーティングとサーバーは TanStack Start と Elysia だけで扱う": [
|
|
723
|
+
"react-router",
|
|
724
|
+
"react-router-dom",
|
|
725
|
+
"next",
|
|
726
|
+
"@remix-run/*",
|
|
727
|
+
"wouter",
|
|
728
|
+
"express",
|
|
729
|
+
"hono",
|
|
730
|
+
"fastify",
|
|
731
|
+
"koa",
|
|
732
|
+
"@nestjs/*"
|
|
733
|
+
],
|
|
734
|
+
"データベースは Drizzle だけで扱い、スキーマはマイグレーションで生成する": [
|
|
735
|
+
"prisma",
|
|
736
|
+
"@prisma/*",
|
|
737
|
+
"typeorm",
|
|
738
|
+
"sequelize",
|
|
739
|
+
"kysely",
|
|
740
|
+
"knex",
|
|
741
|
+
"@mikro-orm/*",
|
|
742
|
+
"better-sqlite3",
|
|
743
|
+
"pg",
|
|
744
|
+
"mysql2"
|
|
745
|
+
],
|
|
746
|
+
"認証は better-auth だけで扱う": [
|
|
747
|
+
"next-auth",
|
|
748
|
+
"@auth/*",
|
|
749
|
+
"lucia",
|
|
750
|
+
"passport",
|
|
751
|
+
"passport-*",
|
|
752
|
+
"@clerk/*",
|
|
753
|
+
"firebase/auth",
|
|
754
|
+
"@supabase/*"
|
|
755
|
+
],
|
|
756
|
+
"UI は shadcn/ui と Tailwind CSS だけで組む": [
|
|
757
|
+
"@mui/*",
|
|
758
|
+
"antd",
|
|
759
|
+
"@chakra-ui/*",
|
|
760
|
+
"@mantine/*",
|
|
761
|
+
"styled-components",
|
|
762
|
+
"@emotion/*",
|
|
763
|
+
"bootstrap",
|
|
764
|
+
"react-bootstrap"
|
|
765
|
+
],
|
|
766
|
+
"検証、日時、ログ、関数型ユーティリティは Effect だけで扱う": [
|
|
767
|
+
"zod",
|
|
768
|
+
"yup",
|
|
769
|
+
"joi",
|
|
770
|
+
"valibot",
|
|
771
|
+
"arktype",
|
|
772
|
+
"io-ts",
|
|
773
|
+
"superstruct",
|
|
774
|
+
"moment",
|
|
775
|
+
"dayjs",
|
|
776
|
+
"date-fns",
|
|
777
|
+
"luxon",
|
|
778
|
+
"winston",
|
|
779
|
+
"pino",
|
|
780
|
+
"bunyan",
|
|
781
|
+
"loglevel",
|
|
782
|
+
"lodash",
|
|
783
|
+
"lodash-es",
|
|
784
|
+
"ramda",
|
|
785
|
+
"rxjs",
|
|
786
|
+
"fp-ts",
|
|
787
|
+
"neverthrow",
|
|
788
|
+
"ts-results",
|
|
789
|
+
"purify-ts"
|
|
790
|
+
],
|
|
791
|
+
"CSV は effect/encoding の Csv だけで読み書きする": [
|
|
792
|
+
"papaparse",
|
|
793
|
+
"csv-parse",
|
|
794
|
+
"csv-parser",
|
|
795
|
+
"csv-stringify",
|
|
796
|
+
"fast-csv",
|
|
797
|
+
"@fast-csv/*",
|
|
798
|
+
"d3-dsv"
|
|
799
|
+
],
|
|
800
|
+
"フィーチャーフラグは OpenFeature だけで扱う": [
|
|
801
|
+
"launchdarkly-*",
|
|
802
|
+
"@launchdarkly/*",
|
|
803
|
+
"@growthbook/*",
|
|
804
|
+
"unleash-client",
|
|
805
|
+
"flagsmith",
|
|
806
|
+
"@vercel/flags"
|
|
807
|
+
],
|
|
808
|
+
"テストは Vitest と Playwright だけで扱う": [
|
|
809
|
+
"jest",
|
|
810
|
+
"jest-*",
|
|
811
|
+
"@jest/*",
|
|
812
|
+
"ts-jest",
|
|
813
|
+
"mocha",
|
|
814
|
+
"jasmine",
|
|
815
|
+
"jasmine-core",
|
|
816
|
+
"ava",
|
|
817
|
+
"cypress",
|
|
818
|
+
"tap",
|
|
819
|
+
"uvu"
|
|
820
|
+
],
|
|
821
|
+
"決済は Stripe だけで扱う": [
|
|
822
|
+
"@paypal/*",
|
|
823
|
+
"paypal-rest-sdk",
|
|
824
|
+
"braintree",
|
|
825
|
+
"@paddle/*",
|
|
826
|
+
"@lemonsqueezy/*",
|
|
827
|
+
"square"
|
|
828
|
+
],
|
|
829
|
+
"整形は Vite+ の vp fmt だけで扱う": [
|
|
830
|
+
"prettier",
|
|
831
|
+
"prettier-plugin-*",
|
|
832
|
+
"@prettier/*",
|
|
833
|
+
"@biomejs/*",
|
|
834
|
+
"dprint"
|
|
835
|
+
],
|
|
836
|
+
"lint は Vite+ の vp lint だけで扱い、ESLint のプラグインは oxlint の JS プラグインとして読む": [
|
|
837
|
+
"eslint",
|
|
838
|
+
"@eslint/*",
|
|
839
|
+
"eslint-config-*",
|
|
840
|
+
"tslint",
|
|
841
|
+
"standard",
|
|
842
|
+
"xo"
|
|
843
|
+
],
|
|
844
|
+
[INSTRUMENTATION]: [
|
|
845
|
+
"@opentelemetry/*",
|
|
846
|
+
"dd-trace",
|
|
847
|
+
"newrelic"
|
|
848
|
+
],
|
|
849
|
+
[INFRASTRUCTURE]: [
|
|
850
|
+
"wrangler",
|
|
851
|
+
"miniflare",
|
|
852
|
+
"@cloudflare/vite-plugin",
|
|
853
|
+
"@vercel/*",
|
|
854
|
+
"@netlify/*",
|
|
855
|
+
"aws-cdk",
|
|
856
|
+
"aws-cdk-lib",
|
|
857
|
+
"@pulumi/*",
|
|
858
|
+
"cdktf"
|
|
859
|
+
]
|
|
860
|
+
};
|
|
861
|
+
const requiredStackEntries = Array.flatMap(Record.toEntries(requiredStack), ([message, modules]) => pipe(modules, Array.map((module) => ({
|
|
862
|
+
message,
|
|
863
|
+
module
|
|
864
|
+
}))));
|
|
865
|
+
const requiredStackPaths = Array.map(pipe(requiredStackEntries, Array.filter(({ module }) => !String.includes("*")(module))), ({ message, module }) => ({
|
|
866
|
+
name: module,
|
|
867
|
+
message
|
|
868
|
+
}));
|
|
869
|
+
const requiredStackPatterns = pipe(requiredStackEntries, Array.map(({ message, module }) => {
|
|
870
|
+
if (String.includes("*")(module)) return {
|
|
871
|
+
group: [module, `${module}/**`],
|
|
872
|
+
message
|
|
873
|
+
};
|
|
874
|
+
return {
|
|
875
|
+
group: [`${module}/**`],
|
|
876
|
+
message
|
|
877
|
+
};
|
|
878
|
+
}));
|
|
879
|
+
const restrictedImports = {
|
|
880
|
+
paths: [
|
|
881
|
+
{
|
|
882
|
+
name: "react",
|
|
883
|
+
importNames: [...REACT_STATE_HOOKS],
|
|
884
|
+
message: UI_STATE
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
name: "drizzle-orm",
|
|
888
|
+
importNames: ["sql"],
|
|
889
|
+
message: HAND_WRITTEN_SQL
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
name: "drizzle-orm/sql",
|
|
893
|
+
message: HAND_WRITTEN_SQL
|
|
894
|
+
},
|
|
895
|
+
...requiredStackPaths
|
|
896
|
+
],
|
|
897
|
+
patterns: [...requiredStackPatterns]
|
|
898
|
+
};
|
|
840
899
|
// src/features/lint-preset/config/preset.ts
|
|
841
900
|
const resolved = (specifier) => fileURLToPath(import.meta.resolve(specifier));
|
|
842
901
|
const DECISION_TIMEOUT_MS = 5e4;
|
|
@@ -984,6 +1043,7 @@ const lint = {
|
|
|
984
1043
|
"msch"
|
|
985
1044
|
] }],
|
|
986
1045
|
"eslint/no-restricted-imports": ["error", restrictedImports],
|
|
1046
|
+
"eslint-js/no-restricted-syntax": ["error", ...cloudflareResourceSyntax],
|
|
987
1047
|
"typescript/prefer-readonly-parameter-types": ["error", {
|
|
988
1048
|
ignoreInferredTypes: true,
|
|
989
1049
|
allow: readonlyParameterAllow
|
|
@@ -1020,7 +1080,7 @@ const lint = {
|
|
|
1020
1080
|
}
|
|
1021
1081
|
}
|
|
1022
1082
|
],
|
|
1023
|
-
settings: { [
|
|
1083
|
+
settings: { [decisionPluginName]: {
|
|
1024
1084
|
model: "cloudflare/@cf/qwen/qwen3.8-27b",
|
|
1025
1085
|
timeoutMs: DECISION_TIMEOUT_MS,
|
|
1026
1086
|
ci: "skip"
|
|
@@ -1039,6 +1099,6 @@ const fsdRules = {
|
|
|
1039
1099
|
"fsd/no-higher-level-imports": "error",
|
|
1040
1100
|
"fsd/no-wildcard-exports": "error"
|
|
1041
1101
|
};
|
|
1042
|
-
export { INFRASTRUCTURE, INSTRUMENTATION, alchemyOverride, allRulesOf, commandsOverride, decisionRules, decisionTestRules, fsdRules, generated, lint, readonlyParameterAllow, removalPolicyOverride, removalPolicySyntax, requiredStack, restrictedImports };
|
|
1102
|
+
export { INFRASTRUCTURE, INSTRUMENTATION, alchemyOverride, allRulesOf, cloudflareResourceSyntax, commandsOverride, decisionRules, decisionTestRules, fsdRules, generated, lint, readonlyParameterAllow, removalPolicyOverride, removalPolicySyntax, requiredStack, restrictedImports };
|
|
1043
1103
|
|
|
1044
1104
|
//# sourceMappingURL=lint.mjs.map
|