@r_masseater/msch 0.0.0-stage → 0.1.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/LICENSE +661 -0
- package/README.md +41 -2
- package/dist/cli-contract-Wo9XK0jk.mjs +271 -0
- package/dist/cli-contract-Wo9XK0jk.mjs.map +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +1118 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/decision-rules-BFywSPLT.d.mts +3 -0
- package/dist/decision-rules.d.mts +2 -0
- package/dist/decision-rules.mjs +31 -0
- package/dist/decision-rules.mjs.map +1 -0
- package/dist/lint.d.mts +200 -0
- package/dist/lint.mjs +899 -0
- package/dist/lint.mjs.map +1 -0
- package/dist/oxlint.d.mts +7 -0
- package/dist/oxlint.mjs +38 -0
- package/dist/oxlint.mjs.map +1 -0
- package/package.json +72 -3
package/dist/lint.mjs
ADDED
|
@@ -0,0 +1,899 @@
|
|
|
1
|
+
import decision_rules_default from "./decision-rules.mjs";
|
|
2
|
+
import { Array, Record, String as String$1, Struct, pipe } from "effect";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import tanstackQuery from "@r_masseater/oxlint-typed-rules/tanstack-query";
|
|
5
|
+
import tanstackRouter from "@r_masseater/oxlint-typed-rules/tanstack-router";
|
|
6
|
+
import { plugin } from "@shadcn/lint";
|
|
7
|
+
import baselineJs from "eslint-plugin-baseline-js";
|
|
8
|
+
import { presets } from "@effect/tsgo/oxlint-presets";
|
|
9
|
+
import htmlReact from "@html-eslint/eslint-plugin-react";
|
|
10
|
+
import eslintReact from "@r_masseater/oxlint-typed-rules/react";
|
|
11
|
+
import reactHooks from "eslint-plugin-react-hooks";
|
|
12
|
+
// src/lint/lint-overrides.config.ts
|
|
13
|
+
const alchemyOverride = {
|
|
14
|
+
files: ["**/alchemy.run.ts"],
|
|
15
|
+
rules: { "eslint-js/no-restricted-syntax": [
|
|
16
|
+
"error",
|
|
17
|
+
{
|
|
18
|
+
selector: "CallExpression[callee.name=\"Stack\"]:not([arguments.0.name=\"APP_NAME\"])",
|
|
19
|
+
message: "スタック名には app-name.ts の APP_NAME を渡す"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
selector: "Program:not(:has(YieldExpression[delegate=true] > Identifier.argument[name=\"requireAppPrefix\"]))",
|
|
23
|
+
message: "スタックの最後で app-name.ts の requireAppPrefix を yield* して、リソース名の prefix を検査する"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
selector: "CallExpression[callee.name=\"Stack\"] > .arguments:nth-child(3):not(:has(FunctionExpression > BlockStatement > ExpressionStatement:nth-last-child(2) > YieldExpression[delegate=true] > Identifier.argument[name=\"requireAppPrefix\"]))",
|
|
27
|
+
message: "スタックの最後で app-name.ts の requireAppPrefix を yield* して、リソース名の prefix を検査する"
|
|
28
|
+
}
|
|
29
|
+
] }
|
|
30
|
+
};
|
|
31
|
+
const scriptsOverride = {
|
|
32
|
+
files: ["scripts/**"],
|
|
33
|
+
rules: {
|
|
34
|
+
"import/no-nodejs-modules": "off",
|
|
35
|
+
"node/no-process-env": "off",
|
|
36
|
+
"node/no-sync": "off",
|
|
37
|
+
"effecttsgo/node-builtin-import": "off"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
// src/lint/lint.config.ts
|
|
41
|
+
const REACT_STATE_HOOKS = [
|
|
42
|
+
"useState",
|
|
43
|
+
"useReducer",
|
|
44
|
+
"createContext",
|
|
45
|
+
"useContext"
|
|
46
|
+
];
|
|
47
|
+
const HAND_WRITTEN_SQL = "SQL を手書きせず Drizzle のクエリビルダーを使う";
|
|
48
|
+
const UI_STATE = "UI 状態は effect-atom だけで扱う";
|
|
49
|
+
const INSTRUMENTATION = "計装は Effect のトレーシングだけで扱う";
|
|
50
|
+
const INFRASTRUCTURE = "インフラは Alchemy の IaC と Cloudflare だけで扱い、wrangler は使わない";
|
|
51
|
+
const requiredStack = {
|
|
52
|
+
[UI_STATE]: [
|
|
53
|
+
"zustand",
|
|
54
|
+
"jotai",
|
|
55
|
+
"valtio",
|
|
56
|
+
"recoil",
|
|
57
|
+
"mobx",
|
|
58
|
+
"mobx-*",
|
|
59
|
+
"redux",
|
|
60
|
+
"@reduxjs/*",
|
|
61
|
+
"react-redux",
|
|
62
|
+
"xstate",
|
|
63
|
+
"@xstate/*",
|
|
64
|
+
"nanostores",
|
|
65
|
+
"@nanostores/*",
|
|
66
|
+
"@preact/signals*"
|
|
67
|
+
],
|
|
68
|
+
"サーバー状態は TanStack Query と Eden だけで扱う": [
|
|
69
|
+
"swr",
|
|
70
|
+
"react-query",
|
|
71
|
+
"@apollo/*",
|
|
72
|
+
"urql",
|
|
73
|
+
"@urql/*",
|
|
74
|
+
"axios",
|
|
75
|
+
"ky",
|
|
76
|
+
"ofetch",
|
|
77
|
+
"got",
|
|
78
|
+
"node-fetch",
|
|
79
|
+
"graphql-request",
|
|
80
|
+
"@trpc/*"
|
|
81
|
+
],
|
|
82
|
+
"ルーティングとサーバーは TanStack Start と Elysia だけで扱う": [
|
|
83
|
+
"react-router",
|
|
84
|
+
"react-router-dom",
|
|
85
|
+
"next",
|
|
86
|
+
"@remix-run/*",
|
|
87
|
+
"wouter",
|
|
88
|
+
"express",
|
|
89
|
+
"hono",
|
|
90
|
+
"fastify",
|
|
91
|
+
"koa",
|
|
92
|
+
"@nestjs/*"
|
|
93
|
+
],
|
|
94
|
+
"データベースは Drizzle だけで扱い、スキーマはマイグレーションで生成する": [
|
|
95
|
+
"prisma",
|
|
96
|
+
"@prisma/*",
|
|
97
|
+
"typeorm",
|
|
98
|
+
"sequelize",
|
|
99
|
+
"kysely",
|
|
100
|
+
"knex",
|
|
101
|
+
"@mikro-orm/*",
|
|
102
|
+
"better-sqlite3",
|
|
103
|
+
"pg",
|
|
104
|
+
"mysql2"
|
|
105
|
+
],
|
|
106
|
+
"認証は better-auth だけで扱う": [
|
|
107
|
+
"next-auth",
|
|
108
|
+
"@auth/*",
|
|
109
|
+
"lucia",
|
|
110
|
+
"passport",
|
|
111
|
+
"passport-*",
|
|
112
|
+
"@clerk/*",
|
|
113
|
+
"firebase/auth",
|
|
114
|
+
"@supabase/*"
|
|
115
|
+
],
|
|
116
|
+
"UI は shadcn/ui と Tailwind CSS だけで組む": [
|
|
117
|
+
"@mui/*",
|
|
118
|
+
"antd",
|
|
119
|
+
"@chakra-ui/*",
|
|
120
|
+
"@mantine/*",
|
|
121
|
+
"styled-components",
|
|
122
|
+
"@emotion/*",
|
|
123
|
+
"bootstrap",
|
|
124
|
+
"react-bootstrap"
|
|
125
|
+
],
|
|
126
|
+
"検証、日時、ログ、関数型ユーティリティは Effect だけで扱う": [
|
|
127
|
+
"zod",
|
|
128
|
+
"yup",
|
|
129
|
+
"joi",
|
|
130
|
+
"valibot",
|
|
131
|
+
"arktype",
|
|
132
|
+
"io-ts",
|
|
133
|
+
"superstruct",
|
|
134
|
+
"moment",
|
|
135
|
+
"dayjs",
|
|
136
|
+
"date-fns",
|
|
137
|
+
"luxon",
|
|
138
|
+
"winston",
|
|
139
|
+
"pino",
|
|
140
|
+
"bunyan",
|
|
141
|
+
"loglevel",
|
|
142
|
+
"lodash",
|
|
143
|
+
"lodash-es",
|
|
144
|
+
"ramda",
|
|
145
|
+
"rxjs",
|
|
146
|
+
"fp-ts",
|
|
147
|
+
"neverthrow",
|
|
148
|
+
"ts-results",
|
|
149
|
+
"purify-ts"
|
|
150
|
+
],
|
|
151
|
+
"フィーチャーフラグは OpenFeature だけで扱う": [
|
|
152
|
+
"launchdarkly-*",
|
|
153
|
+
"@launchdarkly/*",
|
|
154
|
+
"@growthbook/*",
|
|
155
|
+
"unleash-client",
|
|
156
|
+
"flagsmith",
|
|
157
|
+
"@vercel/flags"
|
|
158
|
+
],
|
|
159
|
+
[INSTRUMENTATION]: [
|
|
160
|
+
"@opentelemetry/*",
|
|
161
|
+
"dd-trace",
|
|
162
|
+
"newrelic"
|
|
163
|
+
],
|
|
164
|
+
[INFRASTRUCTURE]: [
|
|
165
|
+
"wrangler",
|
|
166
|
+
"miniflare",
|
|
167
|
+
"@cloudflare/vite-plugin",
|
|
168
|
+
"@vercel/*",
|
|
169
|
+
"@netlify/*",
|
|
170
|
+
"aws-cdk",
|
|
171
|
+
"aws-cdk-lib",
|
|
172
|
+
"@pulumi/*",
|
|
173
|
+
"cdktf"
|
|
174
|
+
]
|
|
175
|
+
};
|
|
176
|
+
const requiredStackEntries = Array.flatMap(Record.toEntries(requiredStack), ([message, modules]) => pipe(modules, Array.map((module) => ({
|
|
177
|
+
message,
|
|
178
|
+
module
|
|
179
|
+
}))));
|
|
180
|
+
const requiredStackPaths = Array.map(pipe(requiredStackEntries, Array.filter(({ module }) => !String$1.includes("*")(module))), ({ message, module }) => ({
|
|
181
|
+
name: module,
|
|
182
|
+
message
|
|
183
|
+
}));
|
|
184
|
+
const requiredStackPatterns = pipe(requiredStackEntries, Array.map(({ message, module }) => {
|
|
185
|
+
if (String$1.includes("*")(module)) return {
|
|
186
|
+
group: [module, `${module}/**`],
|
|
187
|
+
message
|
|
188
|
+
};
|
|
189
|
+
return {
|
|
190
|
+
group: [`${module}/**`],
|
|
191
|
+
message
|
|
192
|
+
};
|
|
193
|
+
}));
|
|
194
|
+
const restrictedImports = {
|
|
195
|
+
paths: [
|
|
196
|
+
{
|
|
197
|
+
name: "react",
|
|
198
|
+
importNames: [...REACT_STATE_HOOKS],
|
|
199
|
+
message: UI_STATE
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: "drizzle-orm",
|
|
203
|
+
importNames: ["sql"],
|
|
204
|
+
message: HAND_WRITTEN_SQL
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: "drizzle-orm/sql",
|
|
208
|
+
message: HAND_WRITTEN_SQL
|
|
209
|
+
},
|
|
210
|
+
...requiredStackPaths
|
|
211
|
+
],
|
|
212
|
+
patterns: [...requiredStackPatterns]
|
|
213
|
+
};
|
|
214
|
+
const generated = [
|
|
215
|
+
"**/routeTree.gen.ts",
|
|
216
|
+
"**/generated/**",
|
|
217
|
+
"**/drizzle/**/snapshot.json",
|
|
218
|
+
".claude/skills/**",
|
|
219
|
+
".intent/**",
|
|
220
|
+
"AGENTS.md",
|
|
221
|
+
"skills-lock.json",
|
|
222
|
+
".github/release-please/*manifest.json",
|
|
223
|
+
"**/*.d.rpp.ts",
|
|
224
|
+
"**/src-tauri/gen/**"
|
|
225
|
+
];
|
|
226
|
+
const asErrors = (names) => Record.fromEntries(pipe(names, Array.map((name) => [name, "error"])));
|
|
227
|
+
const allRulesOf = ({ prefix, rules }) => asErrors(pipe(Record.keys(rules), Array.map((rule) => `${prefix}/${rule}`)));
|
|
228
|
+
const reactHooksRules = asErrors(pipe(Struct.keys(reactHooks.configs["recommended-latest"].rules), Array.map(String$1.replace("react-hooks/", "react-hooks-js/"))));
|
|
229
|
+
const eslintReactRuleNames = pipe(Record.keys(eslintReact.configs["strict-typescript"].rules ?? {}), Array.filter((name) => !(String$1.replace("@eslint-react/", "react-hooks-js/")(name) in reactHooksRules)));
|
|
230
|
+
const effectRuleNames = pipe(Record.values(presets), Array.flatMap((preset) => Struct.keys(preset.rules ?? {})));
|
|
231
|
+
const pluginRules = {
|
|
232
|
+
...asErrors(Record.keys(htmlReact.configs.all.rules ?? {})),
|
|
233
|
+
...reactHooksRules,
|
|
234
|
+
...asErrors(eslintReactRuleNames),
|
|
235
|
+
...asErrors(effectRuleNames)
|
|
236
|
+
};
|
|
237
|
+
const decisionPluginName = decision_rules_default.meta.name;
|
|
238
|
+
const decisionRules = allRulesOf({
|
|
239
|
+
prefix: decisionPluginName,
|
|
240
|
+
rules: decision_rules_default.rules
|
|
241
|
+
});
|
|
242
|
+
const decisionTestRules = pipe(decisionRules, Record.map(() => "off"));
|
|
243
|
+
const shadcnRestyleContracts = [{
|
|
244
|
+
pattern: "^Table(Head|Cell)$",
|
|
245
|
+
allow: ["text-alignment", "fvn-spacing"]
|
|
246
|
+
}, {
|
|
247
|
+
pattern: "^TableCaption$",
|
|
248
|
+
allow: [
|
|
249
|
+
"caption",
|
|
250
|
+
"text-alignment",
|
|
251
|
+
"mt-*",
|
|
252
|
+
"mb-*"
|
|
253
|
+
]
|
|
254
|
+
}];
|
|
255
|
+
// src/lint/readonly-lint-tools.config.ts
|
|
256
|
+
const lintToolReadonlyAllow = [
|
|
257
|
+
{
|
|
258
|
+
from: "package",
|
|
259
|
+
package: "@oxlint/plugins",
|
|
260
|
+
name: [
|
|
261
|
+
"Context",
|
|
262
|
+
"Location",
|
|
263
|
+
"Node",
|
|
264
|
+
"Range",
|
|
265
|
+
"Rule",
|
|
266
|
+
"RuleMeta",
|
|
267
|
+
"SourceCode",
|
|
268
|
+
"VisitorWithHooks"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
from: "package",
|
|
273
|
+
package: "oxlint",
|
|
274
|
+
name: [
|
|
275
|
+
"InvalidTestCase",
|
|
276
|
+
"Rule",
|
|
277
|
+
"TestCases",
|
|
278
|
+
"ValidTestCase"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
from: "package",
|
|
283
|
+
package: "@commitlint/types",
|
|
284
|
+
name: ["QualifiedConfig"]
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
from: "package",
|
|
288
|
+
package: "@textlint/config-loader",
|
|
289
|
+
name: ["TextlintLoadPackagesFromRawConfigResult"]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
from: "package",
|
|
293
|
+
package: "markdownlint",
|
|
294
|
+
name: ["LintError"]
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
from: "package",
|
|
298
|
+
package: "steiger",
|
|
299
|
+
name: [
|
|
300
|
+
"ConfigObject",
|
|
301
|
+
"GlobalIgnore",
|
|
302
|
+
"Plugin"
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
from: "file",
|
|
307
|
+
path: "upstream/attw-core/lib/checkPackage.d.ts",
|
|
308
|
+
name: ["CheckPackageOptions"]
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
from: "file",
|
|
312
|
+
path: "../vite-plus-adopt/dist/attw.d.mts",
|
|
313
|
+
name: ["CheckPackageOptions"]
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
from: "file",
|
|
317
|
+
path: "src/types.ts",
|
|
318
|
+
name: [
|
|
319
|
+
"CommitlintConfig",
|
|
320
|
+
"MarkdownlintConfig",
|
|
321
|
+
"TextlintConfig",
|
|
322
|
+
"ToolSections"
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
from: "file",
|
|
327
|
+
name: [
|
|
328
|
+
"BoundSymbol",
|
|
329
|
+
"CompatSymbol",
|
|
330
|
+
"CompatType",
|
|
331
|
+
"FileBinding",
|
|
332
|
+
"SymbolTable",
|
|
333
|
+
"TypedContext"
|
|
334
|
+
]
|
|
335
|
+
}
|
|
336
|
+
];
|
|
337
|
+
// src/lint/readonly-types.config.ts
|
|
338
|
+
const WEBGPU_HANDLES = [
|
|
339
|
+
"GPUDevice",
|
|
340
|
+
"GPUCanvasContext",
|
|
341
|
+
"GPUTexture",
|
|
342
|
+
"GPUBuffer",
|
|
343
|
+
"GPUBindGroup",
|
|
344
|
+
"GPUBindGroupLayout",
|
|
345
|
+
"GPUPipelineLayout",
|
|
346
|
+
"GPURenderPipeline",
|
|
347
|
+
"GPUSampler"
|
|
348
|
+
];
|
|
349
|
+
const readonlyParameterAllow = [
|
|
350
|
+
{
|
|
351
|
+
from: "lib",
|
|
352
|
+
name: [
|
|
353
|
+
"HTMLElement",
|
|
354
|
+
"HTMLDivElement",
|
|
355
|
+
"Worker",
|
|
356
|
+
"ReadableStream",
|
|
357
|
+
"Request",
|
|
358
|
+
"Response",
|
|
359
|
+
"Float64Array",
|
|
360
|
+
"ArrayBuffer",
|
|
361
|
+
"RegExp",
|
|
362
|
+
"Uint8Array",
|
|
363
|
+
"DataView",
|
|
364
|
+
"RegExpExecArray",
|
|
365
|
+
"RegExpMatchArray",
|
|
366
|
+
"Date",
|
|
367
|
+
...[
|
|
368
|
+
"HTMLCanvasElement",
|
|
369
|
+
"HTMLImageElement",
|
|
370
|
+
"HTMLAnchorElement",
|
|
371
|
+
"CanvasRenderingContext2D",
|
|
372
|
+
"PointerEvent",
|
|
373
|
+
"WheelEvent",
|
|
374
|
+
"KeyboardEvent",
|
|
375
|
+
"MouseEvent",
|
|
376
|
+
"AbortSignal",
|
|
377
|
+
"ImageBitmap",
|
|
378
|
+
...WEBGPU_HANDLES
|
|
379
|
+
]
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
from: "package",
|
|
384
|
+
package: "@webgpu/types",
|
|
385
|
+
name: [...WEBGPU_HANDLES]
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
from: "package",
|
|
389
|
+
package: "@cloudflare/workers-types",
|
|
390
|
+
name: [
|
|
391
|
+
"AnalyticsEngineDataset",
|
|
392
|
+
"Container",
|
|
393
|
+
"DurableObjectState",
|
|
394
|
+
"DurableObjectStorage",
|
|
395
|
+
"KVNamespace",
|
|
396
|
+
"R2Bucket",
|
|
397
|
+
"SecretsStoreSecret",
|
|
398
|
+
"TailEvent",
|
|
399
|
+
"Onset",
|
|
400
|
+
"Log",
|
|
401
|
+
"Exception",
|
|
402
|
+
"Attribute",
|
|
403
|
+
"SpanUpdateInfo",
|
|
404
|
+
"FetchResponseInfo",
|
|
405
|
+
"Span"
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
from: "package",
|
|
410
|
+
package: "@alchemy.run/cloudflare",
|
|
411
|
+
name: ["Store", "WorkerProps"]
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
from: "package",
|
|
415
|
+
package: "@bufbuild/protobuf",
|
|
416
|
+
name: [
|
|
417
|
+
"DescMessage",
|
|
418
|
+
"JsonObject",
|
|
419
|
+
"JsonValue",
|
|
420
|
+
"Message"
|
|
421
|
+
]
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
from: "package",
|
|
425
|
+
package: "lighthouse",
|
|
426
|
+
name: ["FlowResult", "Step"]
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
from: "package",
|
|
430
|
+
package: "vitest",
|
|
431
|
+
name: "TestProject"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
from: "package",
|
|
435
|
+
package: "puppeteer-core",
|
|
436
|
+
name: ["Browser", "Page"]
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
from: "package",
|
|
440
|
+
package: "miniflare",
|
|
441
|
+
name: "Miniflare"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
from: "package",
|
|
445
|
+
package: "elysia",
|
|
446
|
+
name: "ElysiaConfig"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
from: "package",
|
|
450
|
+
package: "@types/node",
|
|
451
|
+
name: ["Request", "Response"]
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
from: "package",
|
|
455
|
+
package: "@better-auth/drizzle-adapter",
|
|
456
|
+
name: "DB"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
from: "package",
|
|
460
|
+
package: "@tanstack/query-core",
|
|
461
|
+
name: "QueryClient"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
from: "package",
|
|
465
|
+
package: "@codemirror/view",
|
|
466
|
+
name: ["EditorView", "ViewUpdate"]
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
from: "package",
|
|
470
|
+
package: "@codemirror/state",
|
|
471
|
+
name: ["Extension", "Text"]
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
from: "package",
|
|
475
|
+
package: "@codemirror/lint",
|
|
476
|
+
name: "Diagnostic"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
from: "package",
|
|
480
|
+
package: "comlink",
|
|
481
|
+
name: "Remote"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
from: "package",
|
|
485
|
+
package: "typescript",
|
|
486
|
+
name: [
|
|
487
|
+
"API",
|
|
488
|
+
"ArrayLiteralExpression",
|
|
489
|
+
"BinaryExpression",
|
|
490
|
+
"BindingElement",
|
|
491
|
+
"CallExpression",
|
|
492
|
+
"Checker",
|
|
493
|
+
"ClassDeclaration",
|
|
494
|
+
"CompilerHost",
|
|
495
|
+
"CompilerOptions",
|
|
496
|
+
"CompletionEntry",
|
|
497
|
+
"ConfigFileResponse",
|
|
498
|
+
"Declaration",
|
|
499
|
+
"DeclarationBase",
|
|
500
|
+
"DiagnosticResponse",
|
|
501
|
+
"ElementAccessExpression",
|
|
502
|
+
"EnumDeclaration",
|
|
503
|
+
"ExportAssignment",
|
|
504
|
+
"ExportDeclaration",
|
|
505
|
+
"ExportSpecifier",
|
|
506
|
+
"Expression",
|
|
507
|
+
"ExpressionBase",
|
|
508
|
+
"InterfaceDeclaration",
|
|
509
|
+
"JSDocCallbackTag",
|
|
510
|
+
"JSDocTagBase",
|
|
511
|
+
"JSDocTypedefTag",
|
|
512
|
+
"ModuleDeclaration",
|
|
513
|
+
"Node",
|
|
514
|
+
"NodeHandle",
|
|
515
|
+
"NumericLiteral",
|
|
516
|
+
"ParameterDeclaration",
|
|
517
|
+
"ParseConfigFileHost",
|
|
518
|
+
"ParsedCommandLine",
|
|
519
|
+
"Program",
|
|
520
|
+
"Project",
|
|
521
|
+
"PropertyAccessExpression",
|
|
522
|
+
"PropertyDeclaration",
|
|
523
|
+
"PropertySignature",
|
|
524
|
+
"Signature",
|
|
525
|
+
"SignatureDeclaration",
|
|
526
|
+
"Snapshot",
|
|
527
|
+
"SourceFile",
|
|
528
|
+
"StringLiteral",
|
|
529
|
+
"Symbol",
|
|
530
|
+
"Type",
|
|
531
|
+
"TypeAliasDeclaration",
|
|
532
|
+
"TypeChecker",
|
|
533
|
+
"TypeFlags",
|
|
534
|
+
"TypeNode",
|
|
535
|
+
"TypeNodeBase",
|
|
536
|
+
"UnionTypeNode",
|
|
537
|
+
"VariableDeclaration",
|
|
538
|
+
"VariableDeclarationList",
|
|
539
|
+
"WasmTransport"
|
|
540
|
+
]
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
from: "package",
|
|
544
|
+
package: "@codemirror/autocomplete",
|
|
545
|
+
name: "CompletionContext"
|
|
546
|
+
},
|
|
547
|
+
...lintToolReadonlyAllow,
|
|
548
|
+
{
|
|
549
|
+
from: "package",
|
|
550
|
+
package: "react",
|
|
551
|
+
name: [
|
|
552
|
+
"ReactNode",
|
|
553
|
+
"ButtonHTMLAttributes",
|
|
554
|
+
"ChangeEvent",
|
|
555
|
+
"ClassAttributes",
|
|
556
|
+
"KeyboardEvent",
|
|
557
|
+
"SubmitEvent"
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
from: "package",
|
|
562
|
+
package: "clsx",
|
|
563
|
+
name: "ClassValue"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
from: "package",
|
|
567
|
+
package: "@modelcontextprotocol/server",
|
|
568
|
+
name: "McpServer"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
from: "package",
|
|
572
|
+
package: "discord.js",
|
|
573
|
+
name: ["Client", "Guild"]
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
from: "package",
|
|
577
|
+
package: "@discordjs/voice",
|
|
578
|
+
name: ["AudioPlayer", "VoiceConnection"]
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
from: "package",
|
|
582
|
+
package: "mdast",
|
|
583
|
+
name: [
|
|
584
|
+
"Root",
|
|
585
|
+
"RootContent",
|
|
586
|
+
"Yaml"
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
from: "package",
|
|
591
|
+
package: "@types/mdast",
|
|
592
|
+
name: ["Code", "Nodes"]
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
from: "package",
|
|
596
|
+
package: "@types/hast",
|
|
597
|
+
name: ["Element", "RootContent"]
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
from: "package",
|
|
601
|
+
package: "ical.js",
|
|
602
|
+
name: "Component"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
from: "package",
|
|
606
|
+
package: "@jupyterlab/nbformat",
|
|
607
|
+
name: [
|
|
608
|
+
"ICell",
|
|
609
|
+
"IDisplayData",
|
|
610
|
+
"IExecuteResult",
|
|
611
|
+
"INotebookContent",
|
|
612
|
+
"IOutput",
|
|
613
|
+
"MultilineString"
|
|
614
|
+
]
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
from: "package",
|
|
618
|
+
package: "unpdf",
|
|
619
|
+
name: "PDFDocumentProxy"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
from: "package",
|
|
623
|
+
package: "@kenjiuno/msgreader",
|
|
624
|
+
name: "FieldsData"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
from: "package",
|
|
628
|
+
package: "parse5",
|
|
629
|
+
name: [
|
|
630
|
+
"Document",
|
|
631
|
+
"DocumentFragment",
|
|
632
|
+
"DocumentType",
|
|
633
|
+
"Element",
|
|
634
|
+
"Template",
|
|
635
|
+
"CommentNode",
|
|
636
|
+
"TextNode"
|
|
637
|
+
]
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
from: "package",
|
|
641
|
+
package: "postal-mime",
|
|
642
|
+
name: ["Address", "Email"]
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
from: "package",
|
|
646
|
+
package: "fflate",
|
|
647
|
+
name: ["Unzipped"]
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
from: "package",
|
|
651
|
+
package: "@openrouter/sdk",
|
|
652
|
+
name: [
|
|
653
|
+
"DecisionsChoiceAnswer",
|
|
654
|
+
"DecisionsNoulAnswer",
|
|
655
|
+
"DecisionsScoreAnswer",
|
|
656
|
+
"Unknown"
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
from: "package",
|
|
661
|
+
package: "recharts",
|
|
662
|
+
name: "TooltipPayloadEntry"
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
from: "package",
|
|
666
|
+
package: "vfile",
|
|
667
|
+
name: "VFile"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
from: "package",
|
|
671
|
+
package: "modern-tar",
|
|
672
|
+
name: "ParsedTarEntry"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
from: "package",
|
|
676
|
+
package: "@zip.js/zip.js",
|
|
677
|
+
name: ["Entry", "FileEntry"]
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
from: "package",
|
|
681
|
+
package: "three",
|
|
682
|
+
name: [
|
|
683
|
+
"LoadingManager",
|
|
684
|
+
"Object3D",
|
|
685
|
+
"WebGLRenderer",
|
|
686
|
+
"PerspectiveCamera",
|
|
687
|
+
"Scene",
|
|
688
|
+
"Sphere",
|
|
689
|
+
"BufferAttribute",
|
|
690
|
+
"Material",
|
|
691
|
+
"Mesh"
|
|
692
|
+
]
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
from: "package",
|
|
696
|
+
package: "@huggingface/transformers",
|
|
697
|
+
name: [
|
|
698
|
+
"RawImage",
|
|
699
|
+
"PretrainedConfig",
|
|
700
|
+
"PreTrainedModel",
|
|
701
|
+
"Processor"
|
|
702
|
+
]
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
from: "package",
|
|
706
|
+
package: "effect",
|
|
707
|
+
name: [
|
|
708
|
+
"Cause",
|
|
709
|
+
"Context",
|
|
710
|
+
"Duration",
|
|
711
|
+
"Effect",
|
|
712
|
+
"Exit",
|
|
713
|
+
"Fiber",
|
|
714
|
+
"HashMap",
|
|
715
|
+
"HashSet",
|
|
716
|
+
"HttpServerRequest",
|
|
717
|
+
"HttpServerResponse",
|
|
718
|
+
"Layer",
|
|
719
|
+
"Logger",
|
|
720
|
+
"NativeSpan",
|
|
721
|
+
"Option",
|
|
722
|
+
"Redacted",
|
|
723
|
+
"Ref",
|
|
724
|
+
"Stream",
|
|
725
|
+
"Utc"
|
|
726
|
+
]
|
|
727
|
+
}
|
|
728
|
+
];
|
|
729
|
+
// src/lint/preset.ts
|
|
730
|
+
const resolved = (specifier) => fileURLToPath(import.meta.resolve(specifier));
|
|
731
|
+
const typedRules = "@r_masseater/oxlint-typed-rules";
|
|
732
|
+
const lint = {
|
|
733
|
+
ignorePatterns: generated,
|
|
734
|
+
plugins: [
|
|
735
|
+
"eslint",
|
|
736
|
+
"typescript",
|
|
737
|
+
"unicorn",
|
|
738
|
+
"oxc",
|
|
739
|
+
"import",
|
|
740
|
+
"react",
|
|
741
|
+
"react-perf",
|
|
742
|
+
"jsx-a11y",
|
|
743
|
+
"jsdoc",
|
|
744
|
+
"promise",
|
|
745
|
+
"node",
|
|
746
|
+
"effecttsgo"
|
|
747
|
+
],
|
|
748
|
+
categories: {
|
|
749
|
+
correctness: "error",
|
|
750
|
+
suspicious: "error",
|
|
751
|
+
pedantic: "error",
|
|
752
|
+
perf: "error",
|
|
753
|
+
style: "error",
|
|
754
|
+
restriction: "error",
|
|
755
|
+
nursery: "error"
|
|
756
|
+
},
|
|
757
|
+
jsPlugins: [
|
|
758
|
+
{
|
|
759
|
+
name: "vite-plus",
|
|
760
|
+
specifier: resolved("vite-plus/oxlint-plugin")
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
name: "tanstack-query",
|
|
764
|
+
specifier: resolved(`${typedRules}/tanstack-query`)
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
name: "tanstack-router",
|
|
768
|
+
specifier: resolved(`${typedRules}/tanstack-router`)
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
name: "tanstack-start",
|
|
772
|
+
specifier: resolved(`${typedRules}/tanstack-start`)
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
name: "drizzle",
|
|
776
|
+
specifier: resolved(`${typedRules}/drizzle`)
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
name: "react-hooks-js",
|
|
780
|
+
specifier: resolved("eslint-plugin-react-hooks")
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
name: "@eslint-react",
|
|
784
|
+
specifier: resolved(`${typedRules}/react`)
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
name: "shadcn",
|
|
788
|
+
specifier: resolved("@shadcn/lint")
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
name: "no-comments",
|
|
792
|
+
specifier: resolved("eslint-plugin-no-comments")
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
name: "baseline-js",
|
|
796
|
+
specifier: resolved("eslint-plugin-baseline-js")
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
name: "@html-eslint/react",
|
|
800
|
+
specifier: resolved("@html-eslint/eslint-plugin-react")
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
name: "eslint-js",
|
|
804
|
+
specifier: resolved("oxlint-plugin-eslint")
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
name: decisionPluginName,
|
|
808
|
+
specifier: resolved("@r_masseater/msch/decision-rules")
|
|
809
|
+
}
|
|
810
|
+
],
|
|
811
|
+
rules: {
|
|
812
|
+
"vite-plus/prefer-vite-plus-imports": "error",
|
|
813
|
+
"tanstack-start/no-async-client-component": "error",
|
|
814
|
+
"tanstack-start/no-client-code-in-server-component": "error",
|
|
815
|
+
"no-comments/disallowComments": ["error", { allow: [
|
|
816
|
+
"oxlint-disable",
|
|
817
|
+
"eslint-disable",
|
|
818
|
+
String.raw`\* @internal \*?$`,
|
|
819
|
+
String.raw`\* @msch \S+ \*?$`,
|
|
820
|
+
"/usr/bin/env node$"
|
|
821
|
+
] }],
|
|
822
|
+
...allRulesOf({
|
|
823
|
+
prefix: "tanstack-query",
|
|
824
|
+
rules: tanstackQuery.rules
|
|
825
|
+
}),
|
|
826
|
+
...allRulesOf({
|
|
827
|
+
prefix: "tanstack-router",
|
|
828
|
+
rules: tanstackRouter.rules
|
|
829
|
+
}),
|
|
830
|
+
"drizzle/enforce-delete-with-where": ["error", { drizzleObjectName: ["db"] }],
|
|
831
|
+
"drizzle/enforce-update-with-where": ["error", { drizzleObjectName: ["db"] }],
|
|
832
|
+
...allRulesOf({
|
|
833
|
+
prefix: "shadcn",
|
|
834
|
+
rules: plugin.rules
|
|
835
|
+
}),
|
|
836
|
+
"shadcn/no-restyle": ["error", { contracts: shadcnRestyleContracts }],
|
|
837
|
+
...allRulesOf({
|
|
838
|
+
prefix: "baseline-js",
|
|
839
|
+
rules: baselineJs.rules
|
|
840
|
+
}),
|
|
841
|
+
...baselineJs.configs.recommended().rules,
|
|
842
|
+
"baseline-js/use-baseline": ["error", {
|
|
843
|
+
available: "widely",
|
|
844
|
+
includeWebApis: { preset: "auto" },
|
|
845
|
+
includeJsBuiltins: { preset: "auto" }
|
|
846
|
+
}],
|
|
847
|
+
...pluginRules,
|
|
848
|
+
"eslint/sort-imports": "off",
|
|
849
|
+
"eslint/sort-keys": "off",
|
|
850
|
+
"import/no-named-export": "off",
|
|
851
|
+
"import/prefer-default-export": "off",
|
|
852
|
+
"react/react-in-jsx-scope": "off",
|
|
853
|
+
"eslint/no-undef": "off",
|
|
854
|
+
"typescript/promise-function-async": "off",
|
|
855
|
+
"react/forbid-component-props": "off",
|
|
856
|
+
"oxc/no-rest-spread-properties": "off",
|
|
857
|
+
"node/no-top-level-await": "off",
|
|
858
|
+
"eslint/one-var": ["error", "never"],
|
|
859
|
+
"eslint/id-length": ["error", { exceptions: ["x", "y"] }],
|
|
860
|
+
"jsdoc/check-tag-names": ["error", { definedTags: ["msch"] }],
|
|
861
|
+
"eslint/no-restricted-imports": ["error", restrictedImports],
|
|
862
|
+
"typescript/prefer-readonly-parameter-types": ["error", {
|
|
863
|
+
ignoreInferredTypes: true,
|
|
864
|
+
allow: readonlyParameterAllow
|
|
865
|
+
}],
|
|
866
|
+
"eslint/no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
|
|
867
|
+
"react/function-component-definition": ["error", {
|
|
868
|
+
namedComponents: "arrow-function",
|
|
869
|
+
unnamedComponents: "arrow-function"
|
|
870
|
+
}],
|
|
871
|
+
"typescript/no-empty-interface": ["error", { allowSingleExtends: true }],
|
|
872
|
+
"typescript/no-empty-object-type": ["error", { allowInterfaces: "with-single-extends" }],
|
|
873
|
+
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
|
|
874
|
+
"react/only-export-components": ["error", { allowExportNames: ["Route"] }]
|
|
875
|
+
},
|
|
876
|
+
overrides: [
|
|
877
|
+
alchemyOverride,
|
|
878
|
+
{
|
|
879
|
+
files: [
|
|
880
|
+
"**/*.config.ts",
|
|
881
|
+
"**/alchemy.*.ts",
|
|
882
|
+
"**/*.worker.ts",
|
|
883
|
+
"**/decision-rules.ts"
|
|
884
|
+
],
|
|
885
|
+
rules: { "import/no-default-export": "off" }
|
|
886
|
+
},
|
|
887
|
+
scriptsOverride
|
|
888
|
+
],
|
|
889
|
+
settings: { [decision_rules_default.meta.name]: { model: "openrouter/typesafe/jev-1.14" } },
|
|
890
|
+
options: {
|
|
891
|
+
typeAware: true,
|
|
892
|
+
typeCheck: true,
|
|
893
|
+
denyWarnings: true,
|
|
894
|
+
reportUnusedDisableDirectives: "error"
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
export { INFRASTRUCTURE, INSTRUMENTATION, alchemyOverride, allRulesOf, decisionRules, decisionTestRules, generated, lint, readonlyParameterAllow, requiredStack, restrictedImports, scriptsOverride };
|
|
898
|
+
|
|
899
|
+
//# sourceMappingURL=lint.mjs.map
|