@geonosis/oxlint-plugin-biological-architecture 0.1.2 → 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/README.md +39 -61
- package/corpus/.oxlintrc.json +33 -0
- package/corpus/layers/core/bad-reaches-up.ts +3 -0
- package/corpus/layers/core/thing.ts +1 -0
- package/corpus/layers/feature/bad-relative.ts +3 -0
- package/corpus/layers/feature/good-downward.ts +3 -0
- package/corpus/layers/feature/good-same-layer.ts +3 -0
- package/corpus/layers/feature/good-type-only.ts +3 -0
- package/corpus/layers/feature/sibling.ts +1 -0
- package/corpus/layers/shell/boot.ts +3 -0
- package/corpus/manifest.json +1 -0
- package/dist/{chunk-74VWOEPL.js → chunk-HXBZSOIU.js} +3 -1
- package/dist/discover-atoms.d.ts +39 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +159 -24
- package/dist/presets.d.ts +36 -0
- package/dist/presets.js +1 -1
- package/package.json +5 -8
- package/bin/geonosis-lint-parity.mjs +0 -4
- package/dist/chunk-2VSZAP5M.js +0 -240
- package/dist/chunk-BFFWNFJM.js +0 -6
- package/dist/chunk-BGX2XYEL.js +0 -153
- package/dist/chunk-FGUOGKA5.js +0 -228
- package/dist/chunk-FJ3J7B5J.js +0 -155
- package/dist/chunk-KZ5XEK6F.js +0 -83
- package/dist/chunk-NZVMV3Y5.js +0 -339
- package/dist/chunk-RNY5NDH5.js +0 -155
- package/dist/chunk-SUTNA6YD.js +0 -268
- package/dist/chunk-UM6UIUH3.js +0 -250
- package/dist/chunk-YIAUS4GG.js +0 -298
- package/dist/parity-cli.js +0 -84
- package/dist/parity.js +0 -32
package/dist/chunk-YIAUS4GG.js
DELETED
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
// src/parity.ts
|
|
2
|
-
import { spawnSync } from "child_process";
|
|
3
|
-
import { cpSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
4
|
-
import { tmpdir } from "os";
|
|
5
|
-
import { join } from "path";
|
|
6
|
-
var ANSI = /\[[0-9;]*m/g;
|
|
7
|
-
var SUMMARY_COUNT = /^(\d+) problems?$/m;
|
|
8
|
-
var RULE_IN_LINE = /\[(?:Error|Warning)\/([^\]]+)\]$/;
|
|
9
|
-
var UNIX_FINDING = /^\S[^\n]*:\d+:\d+: .*\[(?:Error|Warning)\/[^\]\n]+\]$/;
|
|
10
|
-
var ParityError = class extends Error {
|
|
11
|
-
constructor(message) {
|
|
12
|
-
super(message);
|
|
13
|
-
this.name = "ParityError";
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
var normaliseFindings = (output, cwd) => output.replaceAll(ANSI, "").split("\n").map((line) => line.trim().replace(`${cwd}/`, "").replace(/^\.\//, "")).filter((line) => UNIX_FINDING.test(line)).toSorted();
|
|
17
|
-
var readRun = ({ code, output }, cwd, side) => {
|
|
18
|
-
const findings = normaliseFindings(output, cwd);
|
|
19
|
-
const summary = SUMMARY_COUNT.exec(output);
|
|
20
|
-
const refuse = (why) => {
|
|
21
|
-
throw new ParityError(`config ${side}: ${why}
|
|
22
|
-
${output.trim()}`);
|
|
23
|
-
};
|
|
24
|
-
if (summary?.[1] !== void 0 && Number(summary[1]) !== findings.length) {
|
|
25
|
-
return refuse(`oxlint says ${summary[1]} problems, ${findings.length} lines parsed as findings`);
|
|
26
|
-
}
|
|
27
|
-
if (findings.length === 0 && code !== 0) {
|
|
28
|
-
return refuse(`oxlint exited ${code} without reporting a single finding`);
|
|
29
|
-
}
|
|
30
|
-
return findings;
|
|
31
|
-
};
|
|
32
|
-
var UNATTRIBUTED = "(unattributed)";
|
|
33
|
-
var ruleOf = (line) => RULE_IN_LINE.exec(line)?.[1] ?? UNATTRIBUTED;
|
|
34
|
-
var asFile = (lines) => lines.length === 0 ? "" : `${lines.join("\n")}
|
|
35
|
-
`;
|
|
36
|
-
var countByRule = (lines) => {
|
|
37
|
-
const counts = /* @__PURE__ */ new Map();
|
|
38
|
-
for (const line of lines) counts.set(ruleOf(line), (counts.get(ruleOf(line)) ?? 0) + 1);
|
|
39
|
-
return counts;
|
|
40
|
-
};
|
|
41
|
-
var missingFrom = (lines, other) => {
|
|
42
|
-
const remaining = /* @__PURE__ */ new Map();
|
|
43
|
-
for (const line of other) remaining.set(line, (remaining.get(line) ?? 0) + 1);
|
|
44
|
-
return lines.filter((line) => {
|
|
45
|
-
const left = remaining.get(line) ?? 0;
|
|
46
|
-
if (left === 0) return true;
|
|
47
|
-
remaining.set(line, left - 1);
|
|
48
|
-
return false;
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
var compareFindings = ({ a, b }) => {
|
|
52
|
-
const inA = countByRule(a);
|
|
53
|
-
const inB = countByRule(b);
|
|
54
|
-
const onlyInA = missingFrom(a, b);
|
|
55
|
-
return {
|
|
56
|
-
a,
|
|
57
|
-
b,
|
|
58
|
-
lost: onlyInA.length > 0,
|
|
59
|
-
onlyInA,
|
|
60
|
-
onlyInB: missingFrom(b, a),
|
|
61
|
-
tally: [.../* @__PURE__ */ new Set([...inA.keys(), ...inB.keys()])].toSorted().map((rule) => ({
|
|
62
|
-
a: inA.get(rule) ?? 0,
|
|
63
|
-
b: inB.get(rule) ?? 0,
|
|
64
|
-
rule
|
|
65
|
-
}))
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
var formatSummary = (parity) => {
|
|
69
|
-
const rows = parity.tally.map(
|
|
70
|
-
(one) => `| \`${one.rule}\` | ${one.a} | ${one.b} | ${one.b - one.a >= 0 ? "+" : ""}${one.b - one.a} |`
|
|
71
|
-
);
|
|
72
|
-
const lost = parity.onlyInA.length === 0 ? "None. Every finding A reported, B reported too.\n" : `${parity.onlyInA.map((line) => `- \`${line}\``).join("\n")}
|
|
73
|
-
`;
|
|
74
|
-
const gained = parity.onlyInB.length === 0 ? "None.\n" : `${parity.onlyInB.map((line) => `- \`${line}\``).join("\n")}
|
|
75
|
-
`;
|
|
76
|
-
return [
|
|
77
|
-
"# findings parity",
|
|
78
|
-
"",
|
|
79
|
-
`- findings A: **${parity.a.length}**`,
|
|
80
|
-
`- findings B: **${parity.b.length}**`,
|
|
81
|
-
`- only in A (lost): **${parity.onlyInA.length}**`,
|
|
82
|
-
`- only in B (gained): **${parity.onlyInB.length}**`,
|
|
83
|
-
"",
|
|
84
|
-
`**${parity.lost ? "FAIL" : "PASS"}** \u2014 ${parity.lost ? "B lost findings A reported. A rule that fired under A and fires nowhere under B stops the adoption." : "B reported everything A did."}`,
|
|
85
|
-
"",
|
|
86
|
-
"## per rule",
|
|
87
|
-
"",
|
|
88
|
-
"| rule | A | B | delta |",
|
|
89
|
-
"|---|---:|---:|---:|",
|
|
90
|
-
...rows,
|
|
91
|
-
"",
|
|
92
|
-
"## only in A (lost)",
|
|
93
|
-
"",
|
|
94
|
-
lost,
|
|
95
|
-
"## only in B (gained)",
|
|
96
|
-
"",
|
|
97
|
-
gained
|
|
98
|
-
].join("\n");
|
|
99
|
-
};
|
|
100
|
-
var rulesNamedBy = (config) => {
|
|
101
|
-
const parsed = JSON.parse(readFileSync(config, "utf8"));
|
|
102
|
-
return Object.keys(parsed.rules ?? {});
|
|
103
|
-
};
|
|
104
|
-
var ruleIdOf = (line) => {
|
|
105
|
-
const token = RULE_IN_LINE.exec(line)?.[1];
|
|
106
|
-
if (token === void 0) return UNATTRIBUTED;
|
|
107
|
-
const at = token.indexOf("(");
|
|
108
|
-
return at === -1 ? token : `${token.slice(0, at)}/${token.slice(at + 1, -1)}`;
|
|
109
|
-
};
|
|
110
|
-
var MANIFEST_FILE = "manifest.json";
|
|
111
|
-
var manifestOf = (plugin) => ({
|
|
112
|
-
plugin: plugin.meta.name,
|
|
113
|
-
rules: Object.keys(plugin.rules).map((rule) => `${plugin.meta.name}/${rule}`).toSorted()
|
|
114
|
-
});
|
|
115
|
-
var readManifest = (corpus) => {
|
|
116
|
-
const path = join(corpus, MANIFEST_FILE);
|
|
117
|
-
let parsed;
|
|
118
|
-
try {
|
|
119
|
-
parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
120
|
-
} catch (error) {
|
|
121
|
-
throw new ParityError(`could not read ${path}: ${error.message}`);
|
|
122
|
-
}
|
|
123
|
-
const manifest = parsed;
|
|
124
|
-
if (typeof manifest.plugin !== "string" || !Array.isArray(manifest.rules)) {
|
|
125
|
-
throw new ParityError(`${path} names no plugin and no rules \u2014 it cannot scope a reach run`);
|
|
126
|
-
}
|
|
127
|
-
return { plugin: manifest.plugin, rules: manifest.rules };
|
|
128
|
-
};
|
|
129
|
-
var corpusOf = ({
|
|
130
|
-
configA,
|
|
131
|
-
configB,
|
|
132
|
-
corpus,
|
|
133
|
-
oxlint
|
|
134
|
-
}) => {
|
|
135
|
-
const manifest = readManifest(corpus);
|
|
136
|
-
const exercised = new Set(manifest.rules);
|
|
137
|
-
const root = mkdtempSync(join(tmpdir(), "geonosis-corpus-"));
|
|
138
|
-
const here = join(root, "corpus");
|
|
139
|
-
const firedIn = (config, side) => new Set(
|
|
140
|
-
readRun(
|
|
141
|
-
lint({
|
|
142
|
-
config,
|
|
143
|
-
cwd: root,
|
|
144
|
-
extra: ["--no-ignore", "--disable-nested-config"],
|
|
145
|
-
oxlint,
|
|
146
|
-
paths: [here]
|
|
147
|
-
}),
|
|
148
|
-
root,
|
|
149
|
-
side
|
|
150
|
-
).map(ruleIdOf)
|
|
151
|
-
);
|
|
152
|
-
let inA = /* @__PURE__ */ new Set();
|
|
153
|
-
let inB = /* @__PURE__ */ new Set();
|
|
154
|
-
try {
|
|
155
|
-
cpSync(corpus, here, { recursive: true });
|
|
156
|
-
inA = firedIn(configA, "A");
|
|
157
|
-
inB = firedIn(configB, "B");
|
|
158
|
-
} finally {
|
|
159
|
-
rmSync(root, { force: true, recursive: true });
|
|
160
|
-
}
|
|
161
|
-
const configured = [.../* @__PURE__ */ new Set([...rulesNamedBy(configA), ...rulesNamedBy(configB)])].toSorted();
|
|
162
|
-
const reach = configured.filter((rule) => exercised.has(rule)).map((rule) => ({ firedInA: inA.has(rule), firedInB: inB.has(rule), rule }));
|
|
163
|
-
return {
|
|
164
|
-
neither: reach.filter((one) => !one.firedInA && !one.firedInB).map((one) => one.rule),
|
|
165
|
-
outside: configured.filter((rule) => !exercised.has(rule)),
|
|
166
|
-
plugin: manifest.plugin,
|
|
167
|
-
reach
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
var formatCorpus = (report) => {
|
|
171
|
-
const rows = report.reach.map(
|
|
172
|
-
(one) => `| \`${one.rule}\` | ${one.firedInA ? "yes" : "NO"} | ${one.firedInB ? "yes" : "NO"} |`
|
|
173
|
-
);
|
|
174
|
-
const outside = report.outside.length === 0 ? "None \u2014 this corpus speaks for every rule the configs enable.\n" : `${report.outside.map((rule) => `- \`${rule}\``).join("\n")}
|
|
175
|
-
`;
|
|
176
|
-
return [
|
|
177
|
-
"# corpus reach",
|
|
178
|
-
"",
|
|
179
|
-
`- rules in scope of this corpus: **${report.reach.length}**`,
|
|
180
|
-
`- fired under neither config: **${report.neither.length}**`,
|
|
181
|
-
`- outside this corpus: **${report.outside.length}**`,
|
|
182
|
-
"",
|
|
183
|
-
report.neither.length === 0 ? "**PASS** \u2014 every in-scope rule has at least one corpus file that fires it." : `**FAIL** \u2014 these rules fire nowhere in the corpus, so nothing shows they reach anything:
|
|
184
|
-
${report.neither.map((rule) => `- \`${rule}\``).join("\n")}`,
|
|
185
|
-
"",
|
|
186
|
-
"## per rule",
|
|
187
|
-
"",
|
|
188
|
-
"| rule | fired under A | fired under B |",
|
|
189
|
-
"|---|---|---|",
|
|
190
|
-
...rows,
|
|
191
|
-
"",
|
|
192
|
-
"## outside this corpus",
|
|
193
|
-
"",
|
|
194
|
-
`Configured rules this corpus never claimed to exercise. It speaks for \`${report.plugin}\` only,`,
|
|
195
|
-
"so it is no evidence either way about these and passes no verdict on them.",
|
|
196
|
-
"",
|
|
197
|
-
outside
|
|
198
|
-
].join("\n");
|
|
199
|
-
};
|
|
200
|
-
var FLAGS = { "--a": "configA", "--b": "configB", "--out": "out", "--oxlint": "oxlint" };
|
|
201
|
-
var CORPUS_FLAG = "--corpus";
|
|
202
|
-
var parseParityArgs = (argv) => {
|
|
203
|
-
const at = argv.indexOf("--");
|
|
204
|
-
const flags = at === -1 ? argv : argv.slice(0, at);
|
|
205
|
-
const paths = at === -1 ? [] : argv.slice(at + 1);
|
|
206
|
-
const read = {};
|
|
207
|
-
let corpus = false;
|
|
208
|
-
let corpusDir;
|
|
209
|
-
for (let index = 0; index < flags.length; index += 1) {
|
|
210
|
-
const flag = flags[index];
|
|
211
|
-
const value = flags[index + 1];
|
|
212
|
-
if (flag === CORPUS_FLAG) {
|
|
213
|
-
corpus = true;
|
|
214
|
-
if (value !== void 0 && !value.startsWith("--")) {
|
|
215
|
-
corpusDir = value;
|
|
216
|
-
index += 1;
|
|
217
|
-
}
|
|
218
|
-
continue;
|
|
219
|
-
}
|
|
220
|
-
const name = FLAGS[flag];
|
|
221
|
-
if (name === void 0) throw new Error(`geonosis-lint-parity: unknown argument "${flag}"`);
|
|
222
|
-
if (value === void 0 || value.startsWith("--")) {
|
|
223
|
-
throw new Error(`geonosis-lint-parity: ${flag} needs a value`);
|
|
224
|
-
}
|
|
225
|
-
read[name] = value;
|
|
226
|
-
index += 1;
|
|
227
|
-
}
|
|
228
|
-
if (read.configA === void 0 || read.configB === void 0) {
|
|
229
|
-
throw new Error(
|
|
230
|
-
"geonosis-lint-parity: both --a and --b are required \u2014 one config compares to nothing"
|
|
231
|
-
);
|
|
232
|
-
}
|
|
233
|
-
return {
|
|
234
|
-
configA: read.configA,
|
|
235
|
-
configB: read.configB,
|
|
236
|
-
corpus,
|
|
237
|
-
...corpusDir === void 0 ? {} : { corpusDir },
|
|
238
|
-
...read.out === void 0 ? {} : { out: read.out },
|
|
239
|
-
...read.oxlint === void 0 ? {} : { oxlint: read.oxlint },
|
|
240
|
-
paths: paths.length === 0 ? ["."] : paths
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
var lint = ({
|
|
244
|
-
config,
|
|
245
|
-
cwd,
|
|
246
|
-
extra = [],
|
|
247
|
-
oxlint,
|
|
248
|
-
paths
|
|
249
|
-
}) => {
|
|
250
|
-
const run = spawnSync(oxlint, ["--format=unix", ...extra, "--config", config, ...paths], {
|
|
251
|
-
cwd,
|
|
252
|
-
encoding: "utf8",
|
|
253
|
-
env: { ...process.env, NO_COLOR: "1" },
|
|
254
|
-
maxBuffer: 64 * 1024 * 1024
|
|
255
|
-
});
|
|
256
|
-
if (run.error !== void 0)
|
|
257
|
-
throw new ParityError(`could not run ${oxlint}: ${run.error.message}`);
|
|
258
|
-
return { code: run.status ?? -1, output: `${run.stdout ?? ""}${run.stderr ?? ""}` };
|
|
259
|
-
};
|
|
260
|
-
var parityOf = ({
|
|
261
|
-
configA,
|
|
262
|
-
configB,
|
|
263
|
-
cwd,
|
|
264
|
-
out,
|
|
265
|
-
oxlint,
|
|
266
|
-
paths
|
|
267
|
-
}) => {
|
|
268
|
-
const parity = compareFindings({
|
|
269
|
-
a: readRun(lint({ config: configA, cwd, oxlint, paths }), cwd, "A"),
|
|
270
|
-
b: readRun(lint({ config: configB, cwd, oxlint, paths }), cwd, "B")
|
|
271
|
-
});
|
|
272
|
-
if (out !== void 0) {
|
|
273
|
-
mkdirSync(out, { recursive: true });
|
|
274
|
-
writeFileSync(join(out, "a.txt"), asFile(parity.a));
|
|
275
|
-
writeFileSync(join(out, "b.txt"), asFile(parity.b));
|
|
276
|
-
writeFileSync(join(out, "only-in-a.txt"), asFile(parity.onlyInA));
|
|
277
|
-
writeFileSync(join(out, "only-in-b.txt"), asFile(parity.onlyInB));
|
|
278
|
-
writeFileSync(join(out, "SUMMARY.md"), formatSummary(parity));
|
|
279
|
-
}
|
|
280
|
-
return parity;
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
export {
|
|
284
|
-
ParityError,
|
|
285
|
-
normaliseFindings,
|
|
286
|
-
readRun,
|
|
287
|
-
compareFindings,
|
|
288
|
-
formatSummary,
|
|
289
|
-
rulesNamedBy,
|
|
290
|
-
ruleIdOf,
|
|
291
|
-
MANIFEST_FILE,
|
|
292
|
-
manifestOf,
|
|
293
|
-
readManifest,
|
|
294
|
-
corpusOf,
|
|
295
|
-
formatCorpus,
|
|
296
|
-
parseParityArgs,
|
|
297
|
-
parityOf
|
|
298
|
-
};
|
package/dist/parity-cli.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
corpusOf,
|
|
3
|
-
formatCorpus,
|
|
4
|
-
formatSummary,
|
|
5
|
-
parityOf,
|
|
6
|
-
parseParityArgs
|
|
7
|
-
} from "./chunk-NZVMV3Y5.js";
|
|
8
|
-
|
|
9
|
-
// src/parity-cli.ts
|
|
10
|
-
import { existsSync, mkdirSync, writeFileSync } from "fs";
|
|
11
|
-
import { dirname, join, resolve } from "path";
|
|
12
|
-
import { fileURLToPath } from "url";
|
|
13
|
-
var USAGE = `geonosis-lint-parity --a <config-a.json> --b <config-b.json> [--oxlint <path>] [--out <dir>] -- <paths\u2026>
|
|
14
|
-
geonosis-lint-parity --corpus [<dir>] --a <config-a.json> --b <config-b.json> [--out <dir>]
|
|
15
|
-
|
|
16
|
-
Runs oxlint twice over the same paths under two configs and diffs the findings. Exits 1 when a
|
|
17
|
-
finding config A reported is missing under config B \u2014 a rule that fired before and fires nowhere
|
|
18
|
-
now is the adoption stopping, whatever the version numbers say.
|
|
19
|
-
|
|
20
|
-
--corpus runs both configs over a reach corpus \u2014 one file per rule that the rule must fire on \u2014
|
|
21
|
-
and exits 1 when a rule the corpus claims to exercise fires under NEITHER. Run it first: a rule
|
|
22
|
-
with no reach evidence reports parity with every other rule that also does nothing. It defaults to
|
|
23
|
-
the corpus this package ships; give it a directory to use another plugin's. A corpus names the
|
|
24
|
-
rules it speaks for in its own manifest.json, and rules outside that list are reported unjudged.
|
|
25
|
-
|
|
26
|
-
oxlint resolves a jsPlugins specifier relative to the CONFIG FILE's directory, not the working
|
|
27
|
-
directory. Write both configs INSIDE the workspace being linted, or name the plugin by absolute
|
|
28
|
-
path \u2014 a config in a temp dir cannot find a plugin installed in the workspace, and the run is
|
|
29
|
-
refused rather than counted as zero findings.`;
|
|
30
|
-
var CORPUS = resolve(dirname(fileURLToPath(import.meta.url)), "../corpus");
|
|
31
|
-
var resolveOxlint = (from) => {
|
|
32
|
-
let dir = from;
|
|
33
|
-
for (; ; ) {
|
|
34
|
-
const bin = resolve(dir, "node_modules/.bin/oxlint");
|
|
35
|
-
if (existsSync(bin)) return bin;
|
|
36
|
-
const parent = dirname(dir);
|
|
37
|
-
if (parent === dir) return "oxlint";
|
|
38
|
-
dir = parent;
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
var main = () => {
|
|
42
|
-
const argv = process.argv.slice(2);
|
|
43
|
-
if (argv.includes("--help") || argv.includes("-h") || argv.length === 0) {
|
|
44
|
-
process.stdout.write(`${USAGE}
|
|
45
|
-
`);
|
|
46
|
-
return 0;
|
|
47
|
-
}
|
|
48
|
-
const args = parseParityArgs(argv);
|
|
49
|
-
const cwd = process.cwd();
|
|
50
|
-
const configA = resolve(cwd, args.configA);
|
|
51
|
-
const configB = resolve(cwd, args.configB);
|
|
52
|
-
const oxlint = args.oxlint ?? resolveOxlint(cwd);
|
|
53
|
-
if (args.corpus) {
|
|
54
|
-
const corpus = args.corpusDir === void 0 ? CORPUS : resolve(cwd, args.corpusDir);
|
|
55
|
-
const report = corpusOf({ configA, configB, corpus, oxlint });
|
|
56
|
-
const text = formatCorpus(report);
|
|
57
|
-
process.stdout.write(`${text}
|
|
58
|
-
`);
|
|
59
|
-
if (args.out !== void 0) {
|
|
60
|
-
const out = resolve(cwd, args.out);
|
|
61
|
-
mkdirSync(out, { recursive: true });
|
|
62
|
-
writeFileSync(join(out, "CORPUS.md"), text);
|
|
63
|
-
}
|
|
64
|
-
return report.neither.length > 0 ? 1 : 0;
|
|
65
|
-
}
|
|
66
|
-
const parity = parityOf({
|
|
67
|
-
configA,
|
|
68
|
-
configB,
|
|
69
|
-
cwd,
|
|
70
|
-
...args.out === void 0 ? {} : { out: resolve(cwd, args.out) },
|
|
71
|
-
oxlint,
|
|
72
|
-
paths: args.paths
|
|
73
|
-
});
|
|
74
|
-
process.stdout.write(`${formatSummary(parity)}
|
|
75
|
-
`);
|
|
76
|
-
return parity.lost ? 1 : 0;
|
|
77
|
-
};
|
|
78
|
-
try {
|
|
79
|
-
process.exit(main());
|
|
80
|
-
} catch (error) {
|
|
81
|
-
process.stderr.write(`${error.message}
|
|
82
|
-
`);
|
|
83
|
-
process.exit(2);
|
|
84
|
-
}
|
package/dist/parity.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MANIFEST_FILE,
|
|
3
|
-
ParityError,
|
|
4
|
-
compareFindings,
|
|
5
|
-
corpusOf,
|
|
6
|
-
formatCorpus,
|
|
7
|
-
formatSummary,
|
|
8
|
-
manifestOf,
|
|
9
|
-
normaliseFindings,
|
|
10
|
-
parityOf,
|
|
11
|
-
parseParityArgs,
|
|
12
|
-
readManifest,
|
|
13
|
-
readRun,
|
|
14
|
-
ruleIdOf,
|
|
15
|
-
rulesNamedBy
|
|
16
|
-
} from "./chunk-NZVMV3Y5.js";
|
|
17
|
-
export {
|
|
18
|
-
MANIFEST_FILE,
|
|
19
|
-
ParityError,
|
|
20
|
-
compareFindings,
|
|
21
|
-
corpusOf,
|
|
22
|
-
formatCorpus,
|
|
23
|
-
formatSummary,
|
|
24
|
-
manifestOf,
|
|
25
|
-
normaliseFindings,
|
|
26
|
-
parityOf,
|
|
27
|
-
parseParityArgs,
|
|
28
|
-
readManifest,
|
|
29
|
-
readRun,
|
|
30
|
-
ruleIdOf,
|
|
31
|
-
rulesNamedBy
|
|
32
|
-
};
|