@r_masseater/msch 0.24.1 → 0.25.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-B5ilWPaY.mjs → cli-contract-BscmWo5N.mjs} +3 -1
- package/dist/{cli-contract-B5ilWPaY.mjs.map → cli-contract-BscmWo5N.mjs.map} +1 -1
- package/dist/cli.mjs +106 -36
- package/dist/cli.mjs.map +1 -1
- package/dist/decision-rules.d.mts +2 -3
- package/dist/decision-rules.mjs +1 -31
- package/dist/index-BAZH4QMG.d.mts +213 -0
- package/dist/lint-preset-DM15aUhX.mjs +1110 -0
- package/dist/lint-preset-DM15aUhX.mjs.map +1 -0
- package/dist/lint.d.mts +2 -211
- package/dist/lint.mjs +1 -1082
- package/dist/oxlint.mjs +1 -1
- package/dist/{workspace-BPoE5oW1.mjs → workspace-g6vKzUNI.mjs} +8 -2
- package/dist/workspace-g6vKzUNI.mjs.map +1 -0
- package/dist/workspace-settings.mjs +3 -8
- package/dist/workspace-settings.mjs.map +1 -1
- package/package.json +1 -1
- package/skills/msch-checks/SKILL.md +1 -1
- package/dist/decision-rules.mjs.map +0 -1
- package/dist/lint.mjs.map +0 -1
- package/dist/workspace-BPoE5oW1.mjs.map +0 -1
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export { _default as default };
|
|
3
|
-
//# sourceMappingURL=decision-rules.d.mts.map
|
|
1
|
+
import { t as _default } from "./index-BAZH4QMG.mjs";
|
|
2
|
+
export { _default as default };
|
package/dist/decision-rules.mjs
CHANGED
|
@@ -1,31 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// src/features/lint-preset/config/decision-rules.ts
|
|
3
|
-
var decision_rules_default = createDecisionPlugin({
|
|
4
|
-
name: "stack",
|
|
5
|
-
rules: [
|
|
6
|
-
defineDecisionRule({
|
|
7
|
-
id: "exclusive-status",
|
|
8
|
-
target: "file",
|
|
9
|
-
question: "Does this code represent one piece of state with several boolean flags or optional fields whose combinations can contradict each other, instead of one exclusive status expressed as a discriminated union? Answer no when every state is a single exclusive status, or when the file holds no such state. A violation needs two or more booleans or optional fields that describe the same piece of state; a single boolean value, parameter, return value or field is not a violation, and a union of objects told apart by a status or kind field is already an exclusive status. A constant configuration object whose shape a library fixes, such as an OpenFeature flag definition, holds no state and is not a violation.",
|
|
10
|
-
message: "状態は排他的なstatusを持つ判別共用体で表し、booleanフラグの組を使わない。",
|
|
11
|
-
cutoff: .8
|
|
12
|
-
}),
|
|
13
|
-
defineDecisionRule({
|
|
14
|
-
id: "server-state-tanstack-query",
|
|
15
|
-
target: "file",
|
|
16
|
-
question: "Does this code fetch, cache or synchronize server data on the client with something other than TanStack Query, such as fetch inside useEffect, SWR or a hand-written cache? Answer no when server data on the client goes only through TanStack Query, or when the file handles none. Creating an API client such as a better-auth or Eden client, which fetches nothing until a query calls it, is not a violation.",
|
|
17
|
-
message: "サーバー状態はTanStack Queryだけで扱う。",
|
|
18
|
-
cutoff: .8
|
|
19
|
-
}),
|
|
20
|
-
defineDecisionRule({
|
|
21
|
-
id: "ui-state-effect-atom",
|
|
22
|
-
target: "file",
|
|
23
|
-
question: "Does this code hold client-side UI state with something other than effect-atom, such as useState, useReducer, React context used as a store, zustand, jotai or redux? Answer no when client-side UI state is held only by effect-atom, or when the file holds none. effect-atom is Atom from effect/reactivity, read and written through @effect/atom-react hooks such as useAtomValue and useAtomSet. Creating a TanStack Query QueryClient or configuring the router, which hold no UI state, is not a violation.",
|
|
24
|
-
message: "UI状態はeffect-atomだけで扱う。",
|
|
25
|
-
cutoff: .8
|
|
26
|
-
})
|
|
27
|
-
]
|
|
28
|
-
});
|
|
29
|
-
export { decision_rules_default as default };
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=decision-rules.mjs.map
|
|
1
|
+
export { d as default } from "./lint-preset-DM15aUhX.mjs";
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { SteigerConfig } from "@r_masseater/vite-plus-adopt";
|
|
2
|
+
declare const generated: string[];
|
|
3
|
+
declare const allRulesOf: ({ prefix, rules }: Readonly<{
|
|
4
|
+
prefix: string;
|
|
5
|
+
rules: Readonly<Record<string, unknown>>;
|
|
6
|
+
}>) => Readonly<Record<string, "error">>;
|
|
7
|
+
declare const decisionPluginName: string;
|
|
8
|
+
declare const decisionRules: Readonly<Record<string, "error">>;
|
|
9
|
+
declare const decisionTestRules: Record<string, "off">;
|
|
10
|
+
declare const lint: {
|
|
11
|
+
ignorePatterns: string[];
|
|
12
|
+
plugins: ("effecttsgo" | "eslint" | "import" | "jsdoc" | "jsx-a11y" | "node" | "oxc" | "promise" | "react" | "react-perf" | "typescript" | "unicorn")[];
|
|
13
|
+
categories: {
|
|
14
|
+
correctness: "error";
|
|
15
|
+
suspicious: "error";
|
|
16
|
+
pedantic: "error";
|
|
17
|
+
perf: "error";
|
|
18
|
+
style: "error";
|
|
19
|
+
restriction: "error";
|
|
20
|
+
nursery: "error";
|
|
21
|
+
};
|
|
22
|
+
jsPlugins: {
|
|
23
|
+
name: string;
|
|
24
|
+
specifier: string;
|
|
25
|
+
}[];
|
|
26
|
+
rules: {
|
|
27
|
+
"vite-plus/prefer-vite-plus-imports": "error";
|
|
28
|
+
"tanstack-start/no-async-client-component": "error";
|
|
29
|
+
"tanstack-start/no-client-code-in-server-component": "error";
|
|
30
|
+
"no-comments/disallowComments": ["error", {
|
|
31
|
+
allow: readonly string[];
|
|
32
|
+
}];
|
|
33
|
+
"drizzle/enforce-delete-with-where": ["error", {
|
|
34
|
+
drizzleObjectName: string[];
|
|
35
|
+
}];
|
|
36
|
+
"drizzle/enforce-update-with-where": ["error", {
|
|
37
|
+
drizzleObjectName: string[];
|
|
38
|
+
}];
|
|
39
|
+
"shadcn/no-restyle": ["error", {
|
|
40
|
+
contracts: {
|
|
41
|
+
pattern: string;
|
|
42
|
+
allow: string[];
|
|
43
|
+
}[];
|
|
44
|
+
}];
|
|
45
|
+
"baseline-js/use-baseline": ["error", {
|
|
46
|
+
available: "widely";
|
|
47
|
+
includeWebApis: {
|
|
48
|
+
preset: string;
|
|
49
|
+
};
|
|
50
|
+
includeJsBuiltins: {
|
|
51
|
+
preset: string;
|
|
52
|
+
};
|
|
53
|
+
}];
|
|
54
|
+
"eslint/capitalized-comments": "off";
|
|
55
|
+
"eslint/sort-imports": "off";
|
|
56
|
+
"eslint/sort-keys": "off";
|
|
57
|
+
"import/no-named-export": "off";
|
|
58
|
+
"import/prefer-default-export": "off";
|
|
59
|
+
"import/group-exports": "off";
|
|
60
|
+
"import/exports-last": "off";
|
|
61
|
+
"msch-lint/inline-exports": "error";
|
|
62
|
+
"msch-lint/ui-state-in-atoms": "error";
|
|
63
|
+
"msch-lint/no-hand-written-sql": "error";
|
|
64
|
+
"react/react-in-jsx-scope": "off";
|
|
65
|
+
"eslint/no-undef": "off";
|
|
66
|
+
"typescript/promise-function-async": "off";
|
|
67
|
+
"react/forbid-component-props": "off";
|
|
68
|
+
"oxc/no-rest-spread-properties": "off";
|
|
69
|
+
"node/no-top-level-await": "off";
|
|
70
|
+
"import/no-nodejs-modules": "off";
|
|
71
|
+
"eslint/new-cap": ["error", {
|
|
72
|
+
capIsNew: false;
|
|
73
|
+
}];
|
|
74
|
+
"eslint/one-var": ["error", "never"];
|
|
75
|
+
"eslint/id-length": ["error", {
|
|
76
|
+
exceptions: string[];
|
|
77
|
+
}];
|
|
78
|
+
"jsdoc/check-tag-names": ["error", {
|
|
79
|
+
definedTags: string[];
|
|
80
|
+
}];
|
|
81
|
+
"jsdoc/require-param": ["error", {
|
|
82
|
+
exemptedBy: string[];
|
|
83
|
+
}];
|
|
84
|
+
"jsdoc/require-returns": ["error", {
|
|
85
|
+
exemptedBy: string[];
|
|
86
|
+
}];
|
|
87
|
+
"eslint-js/no-restricted-syntax": ["error", ...Readonly<{
|
|
88
|
+
selector: string;
|
|
89
|
+
message: string;
|
|
90
|
+
}>[]];
|
|
91
|
+
"typescript/prefer-readonly-parameter-types": ["error", {
|
|
92
|
+
ignoreInferredTypes: true;
|
|
93
|
+
allow: ({
|
|
94
|
+
from: "package";
|
|
95
|
+
package: string;
|
|
96
|
+
name: string[];
|
|
97
|
+
path?: never;
|
|
98
|
+
} | {
|
|
99
|
+
package?: never;
|
|
100
|
+
from: "file";
|
|
101
|
+
path: string;
|
|
102
|
+
name: string[];
|
|
103
|
+
} | {
|
|
104
|
+
package?: never;
|
|
105
|
+
path?: never;
|
|
106
|
+
from: "file";
|
|
107
|
+
name: string[];
|
|
108
|
+
} | {
|
|
109
|
+
from: "lib";
|
|
110
|
+
name: string[];
|
|
111
|
+
package?: never;
|
|
112
|
+
} | {
|
|
113
|
+
from: "package";
|
|
114
|
+
package: string;
|
|
115
|
+
name: string;
|
|
116
|
+
})[];
|
|
117
|
+
}];
|
|
118
|
+
"eslint/no-duplicate-imports": ["error", {
|
|
119
|
+
allowSeparateTypeImports: true;
|
|
120
|
+
}];
|
|
121
|
+
"react/function-component-definition": ["error", {
|
|
122
|
+
namedComponents: "arrow-function";
|
|
123
|
+
unnamedComponents: "arrow-function";
|
|
124
|
+
}];
|
|
125
|
+
"typescript/no-empty-interface": ["error", {
|
|
126
|
+
allowSingleExtends: true;
|
|
127
|
+
}];
|
|
128
|
+
"typescript/no-empty-object-type": ["error", {
|
|
129
|
+
allowInterfaces: "with-single-extends";
|
|
130
|
+
}];
|
|
131
|
+
"react/jsx-filename-extension": ["error", {
|
|
132
|
+
extensions: string[];
|
|
133
|
+
}];
|
|
134
|
+
"react/only-export-components": ["error", {
|
|
135
|
+
allowExportNames: string[];
|
|
136
|
+
}];
|
|
137
|
+
};
|
|
138
|
+
overrides: ({
|
|
139
|
+
files: string[];
|
|
140
|
+
rules: Readonly<Record<string, ["error", ...unknown[]]>>;
|
|
141
|
+
} | {
|
|
142
|
+
files: string[];
|
|
143
|
+
rules: Readonly<Record<string, "off">>;
|
|
144
|
+
})[];
|
|
145
|
+
settings: {
|
|
146
|
+
[decisionPluginName]: {
|
|
147
|
+
model: string;
|
|
148
|
+
timeoutMs: number;
|
|
149
|
+
ci: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
options: {
|
|
153
|
+
typeAware: true;
|
|
154
|
+
typeCheck: true;
|
|
155
|
+
denyWarnings: true;
|
|
156
|
+
reportUnusedDisableDirectives: "error";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
declare const cloudflareResourceSyntax: readonly Readonly<{
|
|
160
|
+
selector: string;
|
|
161
|
+
message: string;
|
|
162
|
+
}>[];
|
|
163
|
+
declare const removalPolicySyntax: Readonly<{
|
|
164
|
+
selector: string;
|
|
165
|
+
message: string;
|
|
166
|
+
}>;
|
|
167
|
+
declare const removalPolicyOverride: {
|
|
168
|
+
files: string[];
|
|
169
|
+
excludeFiles: string[];
|
|
170
|
+
rules: Readonly<Record<string, ["error", ...unknown[]]>>;
|
|
171
|
+
};
|
|
172
|
+
declare const alchemyOverride: {
|
|
173
|
+
files: string[];
|
|
174
|
+
rules: Readonly<Record<string, ["error", ...unknown[]]>>;
|
|
175
|
+
};
|
|
176
|
+
declare const commandsOverride: {
|
|
177
|
+
files: string[];
|
|
178
|
+
rules: Readonly<Record<string, "off">>;
|
|
179
|
+
};
|
|
180
|
+
declare const INSTRUMENTATION = "計装は Effect のトレーシングだけで扱う";
|
|
181
|
+
declare const requiredStack: Readonly<Record<string, readonly string[]>>;
|
|
182
|
+
declare const tracedRules: {
|
|
183
|
+
readonly "msch-lint/traced-elysia": "error";
|
|
184
|
+
readonly "msch-lint/traced-effect-run": "error";
|
|
185
|
+
};
|
|
186
|
+
declare const steigerRules: SteigerConfig;
|
|
187
|
+
declare const readonlyParameterAllow: ({
|
|
188
|
+
from: "package";
|
|
189
|
+
package: string;
|
|
190
|
+
name: string[];
|
|
191
|
+
path?: never;
|
|
192
|
+
} | {
|
|
193
|
+
package?: never;
|
|
194
|
+
from: "file";
|
|
195
|
+
path: string;
|
|
196
|
+
name: string[];
|
|
197
|
+
} | {
|
|
198
|
+
package?: never;
|
|
199
|
+
path?: never;
|
|
200
|
+
from: "file";
|
|
201
|
+
name: string[];
|
|
202
|
+
} | {
|
|
203
|
+
from: "lib";
|
|
204
|
+
name: string[];
|
|
205
|
+
package?: never;
|
|
206
|
+
} | {
|
|
207
|
+
from: "package";
|
|
208
|
+
package: string;
|
|
209
|
+
name: string;
|
|
210
|
+
})[];
|
|
211
|
+
declare const _default: import("@r_masseater/oxlint-plugin-decision").DecisionPlugin;
|
|
212
|
+
export { INSTRUMENTATION as a, cloudflareResourceSyntax as c, removalPolicySyntax as d, lint as f, generated as g, decisionTestRules as h, tracedRules as i, commandsOverride as l, decisionRules as m, readonlyParameterAllow as n, requiredStack as o, allRulesOf as p, steigerRules as r, alchemyOverride as s, _default as t, removalPolicyOverride as u };
|
|
213
|
+
//# sourceMappingURL=index-BAZH4QMG.d.mts.map
|