@opendesignai/harness 0.2.0-alpha.0 → 0.4.0-alpha.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 +90 -44
- package/dist/THIRD-PARTY-LICENSES.md +63 -0
- package/dist/child-env-cPBUueQI.mjs +17 -0
- package/dist/cli.mjs +4916 -209
- package/dist/config.d.mts +68 -0
- package/dist/config.mjs +12 -0
- package/dist/eslint-comments.mjs +1679 -4
- package/dist/hook.d.mts +19 -0
- package/dist/hook.mjs +9843 -0
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.mjs +283 -27
- package/dist/report.d.mts +40 -0
- package/dist/report.mjs +34 -0
- package/docs/adopting.md +107 -11
- package/docs/agent-setup.md +21 -0
- package/docs/agents.md +42 -0
- package/docs/comments.md +33 -0
- package/docs/decisions/0001-oxlint.md +28 -1
- package/docs/decisions/0002-react-compiler-rules.md +39 -0
- package/docs/decisions/0004-type-aware-rules.md +43 -0
- package/docs/decisions/0005-test-weakening-rules.md +28 -0
- package/docs/diagnostics.md +58 -0
- package/docs/hooks.md +152 -36
- package/docs/ratchet.md +23 -21
- package/docs/rules/no-commented-out-code.md +47 -0
- package/docs/rules/no-swallowed-catch.md +18 -7
- package/docs/size.md +3 -1
- package/docs/verify.md +80 -0
- package/package.json +30 -6
- package/presets/react-compiler.json +2 -1
- package/presets/rules/base.json +5 -0
- package/presets/strict-types.json +5 -0
- package/presets/testing.json +22 -0
- package/presets/type-aware.json +69 -0
- package/skills/od-feature-intake/SKILL.md +22 -0
- package/skills/od-pre-pr-review/SKILL.md +46 -0
- package/dist/cli.d.mts +0 -1
- package/dist/eslint-comments.d.mts +0 -40
- package/dist/paths-DBoYPrGy.mjs +0 -59
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { AllowWarnDeny, DummyRuleMap, OxlintOverride, Oxlintrc } from "oxlint";
|
|
2
|
+
/** Option objects shared by the od rules and the typed Oxlint configuration. */
|
|
3
|
+
interface RuleOptions {
|
|
4
|
+
"no-api-path-literal": {
|
|
5
|
+
prefixes?: string[];
|
|
6
|
+
client?: string;
|
|
7
|
+
};
|
|
8
|
+
"no-cjk-literal": {
|
|
9
|
+
pattern?: string;
|
|
10
|
+
};
|
|
11
|
+
"no-commented-out-code": never;
|
|
12
|
+
"no-constant-flag": {
|
|
13
|
+
pattern?: string;
|
|
14
|
+
};
|
|
15
|
+
"no-error-message-match": {
|
|
16
|
+
identifierPattern?: string;
|
|
17
|
+
errorPattern?: string;
|
|
18
|
+
trackAliases?: boolean;
|
|
19
|
+
};
|
|
20
|
+
"no-locale-branch": {
|
|
21
|
+
trackAliases?: boolean;
|
|
22
|
+
aliasPattern?: string;
|
|
23
|
+
};
|
|
24
|
+
"no-process-env": {
|
|
25
|
+
registry?: string;
|
|
26
|
+
};
|
|
27
|
+
"no-product-literal": {
|
|
28
|
+
products?: string[];
|
|
29
|
+
accessors?: string[];
|
|
30
|
+
};
|
|
31
|
+
"no-raw-fetch": {
|
|
32
|
+
client?: string;
|
|
33
|
+
};
|
|
34
|
+
"no-raw-storage": {
|
|
35
|
+
wrapper?: string;
|
|
36
|
+
};
|
|
37
|
+
"no-shell-imports-product": {
|
|
38
|
+
shell?: string[];
|
|
39
|
+
product?: string[];
|
|
40
|
+
aliases?: Record<string, string>;
|
|
41
|
+
};
|
|
42
|
+
"no-swallowed-catch": {
|
|
43
|
+
cleanupCallees?: string[];
|
|
44
|
+
};
|
|
45
|
+
"no-window-bus": {
|
|
46
|
+
allowEvents?: string[];
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
type Rules = DummyRuleMap & { [Name in keyof RuleOptions as `od/${Name}`]?: AllowWarnDeny | [AllowWarnDeny] | (RuleOptions[Name] extends never ? never : [AllowWarnDeny, RuleOptions[Name]]); };
|
|
50
|
+
interface Override extends OxlintOverride {
|
|
51
|
+
rules?: Rules;
|
|
52
|
+
}
|
|
53
|
+
/** The root .oxlintrc.json configuration, with typed options for the od rules. */
|
|
54
|
+
export interface OxlintConfig extends Oxlintrc {
|
|
55
|
+
rules?: Rules;
|
|
56
|
+
overrides?: Override[];
|
|
57
|
+
}
|
|
58
|
+
/** Preset paths for `extends` in a repository-root .oxlintrc.json. */
|
|
59
|
+
export declare const presets: {
|
|
60
|
+
readonly base: "./node_modules/@opendesignai/harness/presets/base.json";
|
|
61
|
+
readonly "platform-boundary": "./node_modules/@opendesignai/harness/presets/platform-boundary.json";
|
|
62
|
+
readonly product: "./node_modules/@opendesignai/harness/presets/product.json";
|
|
63
|
+
readonly "react-compiler": "./node_modules/@opendesignai/harness/presets/react-compiler.json";
|
|
64
|
+
readonly "strict-types": "./node_modules/@opendesignai/harness/presets/strict-types.json";
|
|
65
|
+
readonly testing: "./node_modules/@opendesignai/harness/presets/testing.json";
|
|
66
|
+
readonly "type-aware": "./node_modules/@opendesignai/harness/presets/type-aware.json";
|
|
67
|
+
};
|
|
68
|
+
export {};
|
package/dist/config.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/config.ts
|
|
2
|
+
/** Preset paths for `extends` in a repository-root .oxlintrc.json. */
|
|
3
|
+
const presets = {
|
|
4
|
+
base: "./node_modules/@opendesignai/harness/presets/base.json",
|
|
5
|
+
"platform-boundary": "./node_modules/@opendesignai/harness/presets/platform-boundary.json",
|
|
6
|
+
product: "./node_modules/@opendesignai/harness/presets/product.json",
|
|
7
|
+
"react-compiler": "./node_modules/@opendesignai/harness/presets/react-compiler.json",
|
|
8
|
+
"strict-types": "./node_modules/@opendesignai/harness/presets/strict-types.json",
|
|
9
|
+
testing: "./node_modules/@opendesignai/harness/presets/testing.json",
|
|
10
|
+
"type-aware": "./node_modules/@opendesignai/harness/presets/type-aware.json"
|
|
11
|
+
};
|
|
12
|
+
export { presets };
|