@geonosis/lint-parity 1.1.0 → 1.3.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.
|
@@ -157,7 +157,12 @@ var formatSummary = (parity) => {
|
|
|
157
157
|
};
|
|
158
158
|
var rulesNamedBy = (config) => {
|
|
159
159
|
const parsed = JSON.parse(readFileSync(config, "utf8"));
|
|
160
|
-
return
|
|
160
|
+
return [
|
|
161
|
+
.../* @__PURE__ */ new Set([
|
|
162
|
+
...Object.keys(parsed.rules ?? {}),
|
|
163
|
+
...(parsed.overrides ?? []).flatMap((one) => Object.keys(one.rules ?? {}))
|
|
164
|
+
])
|
|
165
|
+
];
|
|
161
166
|
};
|
|
162
167
|
var ruleIdOf = (line) => {
|
|
163
168
|
const token = RULE_IN_LINE.exec(line)?.[1];
|
package/dist/index.d.ts
CHANGED
|
@@ -97,7 +97,15 @@ type CorpusReport = {
|
|
|
97
97
|
plugin: string;
|
|
98
98
|
reach: RuleReach[];
|
|
99
99
|
};
|
|
100
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* The rule ids an oxlint config enables, exactly as it wrote them — plugin prefix included, and
|
|
102
|
+
* from `overrides[]` as well as from `rules`.
|
|
103
|
+
*
|
|
104
|
+
* A config's base block is only its first layer: an overrides entry may name a rule the base block
|
|
105
|
+
* never mentions, and oxlint runs it on every file that entry's globs claim. Reading `rules` alone
|
|
106
|
+
* left such a rule out of the reach scope entirely — it fired, and the report about which rules
|
|
107
|
+
* reach anything did not have a row for it.
|
|
108
|
+
*/
|
|
101
109
|
declare const rulesNamedBy: (config: string) => string[];
|
|
102
110
|
/**
|
|
103
111
|
* The plugin-qualified id behind a finding's `plugin(rule)` token, in the `plugin/rule` shape a
|
package/dist/index.js
CHANGED
package/dist/parity-cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
parityOf,
|
|
6
6
|
parseParityArgs,
|
|
7
7
|
resolveOxlint
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DFMYYU5B.js";
|
|
9
9
|
|
|
10
10
|
// src/parity-cli.ts
|
|
11
11
|
import { mkdirSync, writeFileSync } from "fs";
|
|
@@ -37,6 +37,16 @@ path \u2014 a config in a temp dir cannot find a plugin installed in the workspa
|
|
|
37
37
|
refused rather than counted as zero findings.`;
|
|
38
38
|
var main = () => {
|
|
39
39
|
const argv = process.argv.slice(2);
|
|
40
|
+
if (argv.includes("--print-config-shape")) {
|
|
41
|
+
process.stdout.write(
|
|
42
|
+
`geonosis-lint-parity reads no configuration file.
|
|
43
|
+
|
|
44
|
+
The two configs it compares are .oxlintrc.json files named on the command line with --a and --b,
|
|
45
|
+
and it reads them as oxlint does rather than interpreting them itself.
|
|
46
|
+
`
|
|
47
|
+
);
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
40
50
|
if (argv.includes("--help") || argv.includes("-h") || argv.length === 0) {
|
|
41
51
|
process.stdout.write(`${USAGE}
|
|
42
52
|
`);
|
package/package.json
CHANGED