@hiveai/core 0.26.0 → 0.26.1
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/index.d.ts +1 -1
- package/dist/index.js +29 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1804,7 +1804,7 @@ interface DraftsOptions extends DraftOptions {
|
|
|
1804
1804
|
* linter-autofix noise, not lessons worth a memory. */
|
|
1805
1805
|
includeStylistic?: boolean;
|
|
1806
1806
|
}
|
|
1807
|
-
/** True when a finding's rule is pure auto-fixable formatting/
|
|
1807
|
+
/** True when a finding's rule is pure auto-fixable formatting / naming convention (no lesson value as a seed). */
|
|
1808
1808
|
declare function isStylisticRule(ruleId: string): boolean;
|
|
1809
1809
|
/** Normalize a tool-specific severity string to the shared scale. */
|
|
1810
1810
|
declare function normalizeFindingSeverity(raw: string | undefined | null): FindingSeverity;
|
package/dist/index.js
CHANGED
|
@@ -3408,8 +3408,36 @@ function escapeRegExp(value) {
|
|
|
3408
3408
|
|
|
3409
3409
|
// src/findings.ts
|
|
3410
3410
|
var STYLISTIC_RULE_RE = /(?:^|[/:])(?:prettier|semi|semi-spacing|no-extra-semi|quotes|jsx-quotes|quote-props|indent|comma-dangle|comma-spacing|comma-style|eol-last|linebreak-style|no-trailing-spaces|no-multiple-empty-lines|no-multi-spaces|object-curly-spacing|array-bracket-spacing|block-spacing|space-before-blocks|space-before-function-paren|space-infix-ops|space-in-parens|keyword-spacing|arrow-spacing|key-spacing|func-call-spacing|padded-blocks|padding-line-between-statements|brace-style|spaced-comment|max-len|prefer-const|no-var)(?:$|[/:])/i;
|
|
3411
|
+
var SONAR_STYLISTIC_KEYS = /* @__PURE__ */ new Set([
|
|
3412
|
+
"S100",
|
|
3413
|
+
"S101",
|
|
3414
|
+
"S103",
|
|
3415
|
+
"S104",
|
|
3416
|
+
"S105",
|
|
3417
|
+
"S113",
|
|
3418
|
+
"S114",
|
|
3419
|
+
"S115",
|
|
3420
|
+
"S116",
|
|
3421
|
+
"S117",
|
|
3422
|
+
"S118",
|
|
3423
|
+
"S119",
|
|
3424
|
+
"S120",
|
|
3425
|
+
"S121",
|
|
3426
|
+
"S122",
|
|
3427
|
+
"S125",
|
|
3428
|
+
"S1110",
|
|
3429
|
+
"S1116",
|
|
3430
|
+
"S1131",
|
|
3431
|
+
"S1542"
|
|
3432
|
+
]);
|
|
3433
|
+
function sonarRuleKey(ruleId) {
|
|
3434
|
+
const m = /(?:^|:)s0*(\d{1,5})$/i.exec(ruleId ?? "");
|
|
3435
|
+
return m ? `S${m[1]}` : null;
|
|
3436
|
+
}
|
|
3411
3437
|
function isStylisticRule(ruleId) {
|
|
3412
|
-
|
|
3438
|
+
if (STYLISTIC_RULE_RE.test(ruleId ?? "")) return true;
|
|
3439
|
+
const sonarKey = sonarRuleKey(ruleId);
|
|
3440
|
+
return sonarKey !== null && SONAR_STYLISTIC_KEYS.has(sonarKey);
|
|
3413
3441
|
}
|
|
3414
3442
|
var SEVERITY_RANK = {
|
|
3415
3443
|
info: 0,
|