@r_masseater/msch 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lint.mjs ADDED
@@ -0,0 +1,917 @@
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
+ "SpeechRecognitionResult",
368
+ ...[
369
+ "HTMLCanvasElement",
370
+ "HTMLImageElement",
371
+ "HTMLAnchorElement",
372
+ "CanvasRenderingContext2D",
373
+ "PointerEvent",
374
+ "WheelEvent",
375
+ "KeyboardEvent",
376
+ "MouseEvent",
377
+ "AbortSignal",
378
+ "ImageBitmap",
379
+ ...WEBGPU_HANDLES
380
+ ]
381
+ ]
382
+ },
383
+ {
384
+ from: "package",
385
+ package: "@webgpu/types",
386
+ name: [...WEBGPU_HANDLES]
387
+ },
388
+ {
389
+ from: "package",
390
+ package: "@cloudflare/workers-types",
391
+ name: [
392
+ "AnalyticsEngineDataset",
393
+ "Container",
394
+ "DurableObjectState",
395
+ "DurableObjectStorage",
396
+ "KVNamespace",
397
+ "R2Bucket",
398
+ "SecretsStoreSecret",
399
+ "TailEvent",
400
+ "Onset",
401
+ "Log",
402
+ "Exception",
403
+ "Attribute",
404
+ "SpanUpdateInfo",
405
+ "FetchResponseInfo",
406
+ "Span"
407
+ ]
408
+ },
409
+ {
410
+ from: "package",
411
+ package: "@alchemy.run/cloudflare",
412
+ name: ["Store", "WorkerProps"]
413
+ },
414
+ {
415
+ from: "package",
416
+ package: "@bufbuild/protobuf",
417
+ name: [
418
+ "DescMessage",
419
+ "JsonObject",
420
+ "JsonValue",
421
+ "Message"
422
+ ]
423
+ },
424
+ {
425
+ from: "package",
426
+ package: "lighthouse",
427
+ name: ["FlowResult", "Step"]
428
+ },
429
+ {
430
+ from: "package",
431
+ package: "vitest",
432
+ name: "TestProject"
433
+ },
434
+ {
435
+ from: "package",
436
+ package: "puppeteer-core",
437
+ name: ["Browser", "Page"]
438
+ },
439
+ {
440
+ from: "package",
441
+ package: "miniflare",
442
+ name: "Miniflare"
443
+ },
444
+ {
445
+ from: "package",
446
+ package: "elysia",
447
+ name: "ElysiaConfig"
448
+ },
449
+ {
450
+ from: "package",
451
+ package: "@types/node",
452
+ name: ["Request", "Response"]
453
+ },
454
+ {
455
+ from: "package",
456
+ package: "@better-auth/drizzle-adapter",
457
+ name: "DB"
458
+ },
459
+ {
460
+ from: "package",
461
+ package: "@tanstack/query-core",
462
+ name: "QueryClient"
463
+ },
464
+ {
465
+ from: "package",
466
+ package: "@codemirror/view",
467
+ name: ["EditorView", "ViewUpdate"]
468
+ },
469
+ {
470
+ from: "package",
471
+ package: "@codemirror/state",
472
+ name: ["Extension", "Text"]
473
+ },
474
+ {
475
+ from: "package",
476
+ package: "@codemirror/lint",
477
+ name: "Diagnostic"
478
+ },
479
+ {
480
+ from: "package",
481
+ package: "comlink",
482
+ name: "Remote"
483
+ },
484
+ {
485
+ from: "package",
486
+ package: "typescript",
487
+ name: [
488
+ "API",
489
+ "ArrayLiteralExpression",
490
+ "BinaryExpression",
491
+ "BindingElement",
492
+ "CallExpression",
493
+ "Checker",
494
+ "ClassDeclaration",
495
+ "CompilerHost",
496
+ "CompilerOptions",
497
+ "CompletionEntry",
498
+ "ConfigFileResponse",
499
+ "Declaration",
500
+ "DeclarationBase",
501
+ "DiagnosticResponse",
502
+ "ElementAccessExpression",
503
+ "EnumDeclaration",
504
+ "ExportAssignment",
505
+ "ExportDeclaration",
506
+ "ExportSpecifier",
507
+ "Expression",
508
+ "ExpressionBase",
509
+ "InterfaceDeclaration",
510
+ "JSDocCallbackTag",
511
+ "JSDocTagBase",
512
+ "JSDocTypedefTag",
513
+ "ModuleDeclaration",
514
+ "Node",
515
+ "NodeHandle",
516
+ "NumericLiteral",
517
+ "ParameterDeclaration",
518
+ "ParseConfigFileHost",
519
+ "ParsedCommandLine",
520
+ "Program",
521
+ "Project",
522
+ "PropertyAccessExpression",
523
+ "PropertyDeclaration",
524
+ "PropertySignature",
525
+ "Signature",
526
+ "SignatureDeclaration",
527
+ "Snapshot",
528
+ "SourceFile",
529
+ "StringLiteral",
530
+ "Symbol",
531
+ "Type",
532
+ "TypeAliasDeclaration",
533
+ "TypeChecker",
534
+ "TypeFlags",
535
+ "TypeNode",
536
+ "TypeNodeBase",
537
+ "UnionTypeNode",
538
+ "VariableDeclaration",
539
+ "VariableDeclarationList",
540
+ "WasmTransport"
541
+ ]
542
+ },
543
+ {
544
+ from: "package",
545
+ package: "@codemirror/autocomplete",
546
+ name: "CompletionContext"
547
+ },
548
+ ...lintToolReadonlyAllow,
549
+ {
550
+ from: "package",
551
+ package: "react",
552
+ name: [
553
+ "ReactNode",
554
+ "ButtonHTMLAttributes",
555
+ "ChangeEvent",
556
+ "ClassAttributes",
557
+ "KeyboardEvent",
558
+ "SubmitEvent"
559
+ ]
560
+ },
561
+ {
562
+ from: "package",
563
+ package: "clsx",
564
+ name: "ClassValue"
565
+ },
566
+ {
567
+ from: "package",
568
+ package: "@anthropic-ai/claude-agent-sdk",
569
+ name: ["SDKMessage", "SDKResultMessage"]
570
+ },
571
+ {
572
+ from: "package",
573
+ package: "@types/dom-speech-recognition",
574
+ name: [
575
+ "SpeechRecognition",
576
+ "SpeechRecognitionEvent",
577
+ "SpeechRecognitionResult"
578
+ ]
579
+ },
580
+ {
581
+ from: "package",
582
+ package: "@modelcontextprotocol/server",
583
+ name: "McpServer"
584
+ },
585
+ {
586
+ from: "package",
587
+ package: "discord.js",
588
+ name: ["Client", "Guild"]
589
+ },
590
+ {
591
+ from: "package",
592
+ package: "@discordjs/voice",
593
+ name: ["AudioPlayer", "VoiceConnection"]
594
+ },
595
+ {
596
+ from: "package",
597
+ package: "mdast",
598
+ name: [
599
+ "Root",
600
+ "RootContent",
601
+ "Yaml"
602
+ ]
603
+ },
604
+ {
605
+ from: "package",
606
+ package: "@types/mdast",
607
+ name: ["Code", "Nodes"]
608
+ },
609
+ {
610
+ from: "package",
611
+ package: "@types/hast",
612
+ name: ["Element", "RootContent"]
613
+ },
614
+ {
615
+ from: "package",
616
+ package: "ical.js",
617
+ name: "Component"
618
+ },
619
+ {
620
+ from: "package",
621
+ package: "@jupyterlab/nbformat",
622
+ name: [
623
+ "ICell",
624
+ "IDisplayData",
625
+ "IExecuteResult",
626
+ "INotebookContent",
627
+ "IOutput",
628
+ "MultilineString"
629
+ ]
630
+ },
631
+ {
632
+ from: "package",
633
+ package: "unpdf",
634
+ name: "PDFDocumentProxy"
635
+ },
636
+ {
637
+ from: "package",
638
+ package: "@kenjiuno/msgreader",
639
+ name: "FieldsData"
640
+ },
641
+ {
642
+ from: "package",
643
+ package: "parse5",
644
+ name: [
645
+ "Document",
646
+ "DocumentFragment",
647
+ "DocumentType",
648
+ "Element",
649
+ "Template",
650
+ "CommentNode",
651
+ "TextNode"
652
+ ]
653
+ },
654
+ {
655
+ from: "package",
656
+ package: "postal-mime",
657
+ name: ["Address", "Email"]
658
+ },
659
+ {
660
+ from: "package",
661
+ package: "fflate",
662
+ name: ["Unzipped"]
663
+ },
664
+ {
665
+ from: "package",
666
+ package: "@openrouter/sdk",
667
+ name: [
668
+ "DecisionsChoiceAnswer",
669
+ "DecisionsNoulAnswer",
670
+ "DecisionsScoreAnswer",
671
+ "Unknown"
672
+ ]
673
+ },
674
+ {
675
+ from: "package",
676
+ package: "recharts",
677
+ name: "TooltipPayloadEntry"
678
+ },
679
+ {
680
+ from: "package",
681
+ package: "vfile",
682
+ name: "VFile"
683
+ },
684
+ {
685
+ from: "package",
686
+ package: "modern-tar",
687
+ name: "ParsedTarEntry"
688
+ },
689
+ {
690
+ from: "package",
691
+ package: "@zip.js/zip.js",
692
+ name: ["Entry", "FileEntry"]
693
+ },
694
+ {
695
+ from: "package",
696
+ package: "three",
697
+ name: [
698
+ "LoadingManager",
699
+ "Object3D",
700
+ "WebGLRenderer",
701
+ "PerspectiveCamera",
702
+ "Scene",
703
+ "Sphere",
704
+ "BufferAttribute",
705
+ "Material",
706
+ "Mesh"
707
+ ]
708
+ },
709
+ {
710
+ from: "package",
711
+ package: "@huggingface/transformers",
712
+ name: [
713
+ "RawImage",
714
+ "PretrainedConfig",
715
+ "PreTrainedModel",
716
+ "Processor"
717
+ ]
718
+ },
719
+ {
720
+ from: "package",
721
+ package: "effect",
722
+ name: [
723
+ "Atom",
724
+ "Cause",
725
+ "Context",
726
+ "Duration",
727
+ "Effect",
728
+ "Exit",
729
+ "Fiber",
730
+ "HashMap",
731
+ "HashSet",
732
+ "HttpClientRequest",
733
+ "HttpServerRequest",
734
+ "HttpServerResponse",
735
+ "Layer",
736
+ "Logger",
737
+ "NativeSpan",
738
+ "Option",
739
+ "Redacted",
740
+ "Ref",
741
+ "Stream",
742
+ "Utc",
743
+ "Writable"
744
+ ]
745
+ }
746
+ ];
747
+ // src/lint/preset.ts
748
+ const resolved = (specifier) => fileURLToPath(import.meta.resolve(specifier));
749
+ const typedRules = "@r_masseater/oxlint-typed-rules";
750
+ const lint = {
751
+ ignorePatterns: generated,
752
+ plugins: [
753
+ "eslint",
754
+ "typescript",
755
+ "unicorn",
756
+ "oxc",
757
+ "import",
758
+ "react",
759
+ "react-perf",
760
+ "jsx-a11y",
761
+ "jsdoc",
762
+ "promise",
763
+ "node",
764
+ "effecttsgo"
765
+ ],
766
+ categories: {
767
+ correctness: "error",
768
+ suspicious: "error",
769
+ pedantic: "error",
770
+ perf: "error",
771
+ style: "error",
772
+ restriction: "error",
773
+ nursery: "error"
774
+ },
775
+ jsPlugins: [
776
+ {
777
+ name: "vite-plus",
778
+ specifier: resolved("vite-plus/oxlint-plugin")
779
+ },
780
+ {
781
+ name: "tanstack-query",
782
+ specifier: resolved(`${typedRules}/tanstack-query`)
783
+ },
784
+ {
785
+ name: "tanstack-router",
786
+ specifier: resolved(`${typedRules}/tanstack-router`)
787
+ },
788
+ {
789
+ name: "tanstack-start",
790
+ specifier: resolved(`${typedRules}/tanstack-start`)
791
+ },
792
+ {
793
+ name: "drizzle",
794
+ specifier: resolved(`${typedRules}/drizzle`)
795
+ },
796
+ {
797
+ name: "react-hooks-js",
798
+ specifier: resolved("eslint-plugin-react-hooks")
799
+ },
800
+ {
801
+ name: "@eslint-react",
802
+ specifier: resolved(`${typedRules}/react`)
803
+ },
804
+ {
805
+ name: "shadcn",
806
+ specifier: resolved("@shadcn/lint")
807
+ },
808
+ {
809
+ name: "no-comments",
810
+ specifier: resolved("eslint-plugin-no-comments")
811
+ },
812
+ {
813
+ name: "baseline-js",
814
+ specifier: resolved("eslint-plugin-baseline-js")
815
+ },
816
+ {
817
+ name: "@html-eslint/react",
818
+ specifier: resolved("@html-eslint/eslint-plugin-react")
819
+ },
820
+ {
821
+ name: "eslint-js",
822
+ specifier: resolved("oxlint-plugin-eslint")
823
+ },
824
+ {
825
+ name: decisionPluginName,
826
+ specifier: resolved("@r_masseater/msch/decision-rules")
827
+ }
828
+ ],
829
+ rules: {
830
+ "vite-plus/prefer-vite-plus-imports": "error",
831
+ "tanstack-start/no-async-client-component": "error",
832
+ "tanstack-start/no-client-code-in-server-component": "error",
833
+ "no-comments/disallowComments": ["error", { allow: [
834
+ "oxlint-disable",
835
+ "eslint-disable",
836
+ String.raw`\* @internal \*?$`,
837
+ String.raw`\* @msch \S+ \*?$`,
838
+ "/usr/bin/env node$"
839
+ ] }],
840
+ ...allRulesOf({
841
+ prefix: "tanstack-query",
842
+ rules: tanstackQuery.rules
843
+ }),
844
+ ...allRulesOf({
845
+ prefix: "tanstack-router",
846
+ rules: tanstackRouter.rules
847
+ }),
848
+ "drizzle/enforce-delete-with-where": ["error", { drizzleObjectName: ["db"] }],
849
+ "drizzle/enforce-update-with-where": ["error", { drizzleObjectName: ["db"] }],
850
+ ...allRulesOf({
851
+ prefix: "shadcn",
852
+ rules: plugin.rules
853
+ }),
854
+ "shadcn/no-restyle": ["error", { contracts: shadcnRestyleContracts }],
855
+ ...allRulesOf({
856
+ prefix: "baseline-js",
857
+ rules: baselineJs.rules
858
+ }),
859
+ ...baselineJs.configs.recommended().rules,
860
+ "baseline-js/use-baseline": ["error", {
861
+ available: "widely",
862
+ includeWebApis: { preset: "auto" },
863
+ includeJsBuiltins: { preset: "auto" }
864
+ }],
865
+ ...pluginRules,
866
+ "eslint/sort-imports": "off",
867
+ "eslint/sort-keys": "off",
868
+ "import/no-named-export": "off",
869
+ "import/prefer-default-export": "off",
870
+ "react/react-in-jsx-scope": "off",
871
+ "eslint/no-undef": "off",
872
+ "typescript/promise-function-async": "off",
873
+ "react/forbid-component-props": "off",
874
+ "oxc/no-rest-spread-properties": "off",
875
+ "node/no-top-level-await": "off",
876
+ "eslint/one-var": ["error", "never"],
877
+ "eslint/id-length": ["error", { exceptions: ["x", "y"] }],
878
+ "jsdoc/check-tag-names": ["error", { definedTags: ["msch"] }],
879
+ "eslint/no-restricted-imports": ["error", restrictedImports],
880
+ "typescript/prefer-readonly-parameter-types": ["error", {
881
+ ignoreInferredTypes: true,
882
+ allow: readonlyParameterAllow
883
+ }],
884
+ "eslint/no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
885
+ "react/function-component-definition": ["error", {
886
+ namedComponents: "arrow-function",
887
+ unnamedComponents: "arrow-function"
888
+ }],
889
+ "typescript/no-empty-interface": ["error", { allowSingleExtends: true }],
890
+ "typescript/no-empty-object-type": ["error", { allowInterfaces: "with-single-extends" }],
891
+ "react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
892
+ "react/only-export-components": ["error", { allowExportNames: ["Route"] }]
893
+ },
894
+ overrides: [
895
+ alchemyOverride,
896
+ {
897
+ files: [
898
+ "**/*.config.ts",
899
+ "**/alchemy.*.ts",
900
+ "**/*.worker.ts",
901
+ "**/decision-rules.ts"
902
+ ],
903
+ rules: { "import/no-default-export": "off" }
904
+ },
905
+ scriptsOverride
906
+ ],
907
+ settings: { [decision_rules_default.meta.name]: { model: "openrouter/typesafe/jev-1.14" } },
908
+ options: {
909
+ typeAware: true,
910
+ typeCheck: true,
911
+ denyWarnings: true,
912
+ reportUnusedDisableDirectives: "error"
913
+ }
914
+ };
915
+ export { INFRASTRUCTURE, INSTRUMENTATION, alchemyOverride, allRulesOf, decisionRules, decisionTestRules, generated, lint, readonlyParameterAllow, requiredStack, restrictedImports, scriptsOverride };
916
+
917
+ //# sourceMappingURL=lint.mjs.map