corsa-oxlint 2.0.0-beta.3 → 2.0.0-beta.5

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.
@@ -19,6 +19,7 @@ declare const noUnnecessaryTypeAssertionRule: Rule;
19
19
  declare const noUnnecessaryTypeConversionRule: Rule;
20
20
  declare const noUnnecessaryTypeParametersRule: Rule;
21
21
  declare const noUnsafeArgumentRule: Rule;
22
+ declare const noUnsafeEnumAssignmentRule: Rule;
22
23
  declare const noUnsafeEnumComparisonRule: Rule;
23
24
  declare const noUselessDefaultAssignmentRule: Rule;
24
25
  declare const nonNullableTypeAssertionStyleRule: Rule;
@@ -36,5 +37,5 @@ declare const strictVoidReturnRule: Rule;
36
37
  declare const switchExhaustivenessCheckRule: Rule;
37
38
  declare const unboundMethodRule: Rule;
38
39
  //#endregion
39
- export { consistentReturnRule, consistentTypeExportsRule, dotNotationRule, noConfusingVoidExpressionRule, noDeprecatedRule, noDuplicateTypeConstituentsRule, noMisusedPromisesRule, noMisusedSpreadRule, noRedundantTypeConstituentsRule, noUnnecessaryBooleanLiteralCompareRule, noUnnecessaryConditionRule, noUnnecessaryQualifierRule, noUnnecessaryTemplateExpressionRule, noUnnecessaryTypeArgumentsRule, noUnnecessaryTypeAssertionRule, noUnnecessaryTypeConversionRule, noUnnecessaryTypeParametersRule, noUnsafeArgumentRule, noUnsafeEnumComparisonRule, noUselessDefaultAssignmentRule, nonNullableTypeAssertionStyleRule, preferNullishCoalescingRule, preferOptionalChainRule, preferReadonlyParameterTypesRule, preferReadonlyRule, preferReturnThisTypeRule, promiseFunctionAsyncRule, relatedGetterSetterPairsRule, requireAwaitRule, returnAwaitRule, strictBooleanExpressionsRule, strictVoidReturnRule, switchExhaustivenessCheckRule, unboundMethodRule };
40
+ export { consistentReturnRule, consistentTypeExportsRule, dotNotationRule, noConfusingVoidExpressionRule, noDeprecatedRule, noDuplicateTypeConstituentsRule, noMisusedPromisesRule, noMisusedSpreadRule, noRedundantTypeConstituentsRule, noUnnecessaryBooleanLiteralCompareRule, noUnnecessaryConditionRule, noUnnecessaryQualifierRule, noUnnecessaryTemplateExpressionRule, noUnnecessaryTypeArgumentsRule, noUnnecessaryTypeAssertionRule, noUnnecessaryTypeConversionRule, noUnnecessaryTypeParametersRule, noUnsafeArgumentRule, noUnsafeEnumAssignmentRule, noUnsafeEnumComparisonRule, noUselessDefaultAssignmentRule, nonNullableTypeAssertionStyleRule, preferNullishCoalescingRule, preferOptionalChainRule, preferReadonlyParameterTypesRule, preferReadonlyRule, preferReturnThisTypeRule, promiseFunctionAsyncRule, relatedGetterSetterPairsRule, requireAwaitRule, returnAwaitRule, strictBooleanExpressionsRule, strictVoidReturnRule, switchExhaustivenessCheckRule, unboundMethodRule };
40
41
  //# sourceMappingURL=checker_backed.d.ts.map
@@ -18,6 +18,7 @@ const noUnnecessaryTypeAssertionRule = createRustNativeRule("no-unnecessary-type
18
18
  const noUnnecessaryTypeConversionRule = createRustNativeRule("no-unnecessary-type-conversion");
19
19
  const noUnnecessaryTypeParametersRule = createRustNativeRule("no-unnecessary-type-parameters");
20
20
  const noUnsafeArgumentRule = createRustNativeRule("no-unsafe-argument");
21
+ const noUnsafeEnumAssignmentRule = createRustNativeRule("no-unsafe-enum-assignment");
21
22
  const noUnsafeEnumComparisonRule = createRustNativeRule("no-unsafe-enum-comparison");
22
23
  const noUselessDefaultAssignmentRule = createRustNativeRule("no-useless-default-assignment");
23
24
  const nonNullableTypeAssertionStyleRule = createRustNativeRule("non-nullable-type-assertion-style");
@@ -35,6 +36,6 @@ const strictVoidReturnRule = createRustNativeRule("strict-void-return");
35
36
  const switchExhaustivenessCheckRule = createRustNativeRule("switch-exhaustiveness-check");
36
37
  const unboundMethodRule = createRustNativeRule("unbound-method");
37
38
  //#endregion
38
- export { consistentReturnRule, consistentTypeExportsRule, dotNotationRule, noConfusingVoidExpressionRule, noDeprecatedRule, noDuplicateTypeConstituentsRule, noMisusedPromisesRule, noMisusedSpreadRule, noRedundantTypeConstituentsRule, noUnnecessaryBooleanLiteralCompareRule, noUnnecessaryConditionRule, noUnnecessaryQualifierRule, noUnnecessaryTemplateExpressionRule, noUnnecessaryTypeArgumentsRule, noUnnecessaryTypeAssertionRule, noUnnecessaryTypeConversionRule, noUnnecessaryTypeParametersRule, noUnsafeArgumentRule, noUnsafeEnumComparisonRule, noUselessDefaultAssignmentRule, nonNullableTypeAssertionStyleRule, preferNullishCoalescingRule, preferOptionalChainRule, preferReadonlyParameterTypesRule, preferReadonlyRule, preferReturnThisTypeRule, promiseFunctionAsyncRule, relatedGetterSetterPairsRule, requireAwaitRule, returnAwaitRule, strictBooleanExpressionsRule, strictVoidReturnRule, switchExhaustivenessCheckRule, unboundMethodRule };
39
+ export { consistentReturnRule, consistentTypeExportsRule, dotNotationRule, noConfusingVoidExpressionRule, noDeprecatedRule, noDuplicateTypeConstituentsRule, noMisusedPromisesRule, noMisusedSpreadRule, noRedundantTypeConstituentsRule, noUnnecessaryBooleanLiteralCompareRule, noUnnecessaryConditionRule, noUnnecessaryQualifierRule, noUnnecessaryTemplateExpressionRule, noUnnecessaryTypeArgumentsRule, noUnnecessaryTypeAssertionRule, noUnnecessaryTypeConversionRule, noUnnecessaryTypeParametersRule, noUnsafeArgumentRule, noUnsafeEnumAssignmentRule, noUnsafeEnumComparisonRule, noUselessDefaultAssignmentRule, nonNullableTypeAssertionStyleRule, preferNullishCoalescingRule, preferOptionalChainRule, preferReadonlyParameterTypesRule, preferReadonlyRule, preferReturnThisTypeRule, promiseFunctionAsyncRule, relatedGetterSetterPairsRule, requireAwaitRule, returnAwaitRule, strictBooleanExpressionsRule, strictVoidReturnRule, switchExhaustivenessCheckRule, unboundMethodRule };
39
40
 
40
41
  //# sourceMappingURL=checker_backed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checker_backed.js","names":[],"sources":["../../ts/rules/checker_backed.ts"],"sourcesContent":["import { createRustNativeRule } from \"./native_bridge\";\n\nexport const consistentReturnRule = createRustNativeRule(\"consistent-return\");\nexport const consistentTypeExportsRule = createRustNativeRule(\"consistent-type-exports\");\nexport const dotNotationRule = createRustNativeRule(\"dot-notation\");\nexport const noConfusingVoidExpressionRule = createRustNativeRule(\"no-confusing-void-expression\");\nexport const noDeprecatedRule = createRustNativeRule(\"no-deprecated\");\nexport const noDuplicateTypeConstituentsRule = createRustNativeRule(\n \"no-duplicate-type-constituents\",\n);\nexport const noMisusedPromisesRule = createRustNativeRule(\"no-misused-promises\");\nexport const noMisusedSpreadRule = createRustNativeRule(\"no-misused-spread\");\nexport const noRedundantTypeConstituentsRule = createRustNativeRule(\n \"no-redundant-type-constituents\",\n);\nexport const noUnnecessaryBooleanLiteralCompareRule = createRustNativeRule(\n \"no-unnecessary-boolean-literal-compare\",\n);\nexport const noUnnecessaryConditionRule = createRustNativeRule(\"no-unnecessary-condition\");\nexport const noUnnecessaryQualifierRule = createRustNativeRule(\"no-unnecessary-qualifier\");\nexport const noUnnecessaryTemplateExpressionRule = createRustNativeRule(\n \"no-unnecessary-template-expression\",\n);\nexport const noUnnecessaryTypeArgumentsRule = createRustNativeRule(\"no-unnecessary-type-arguments\");\nexport const noUnnecessaryTypeAssertionRule = createRustNativeRule(\"no-unnecessary-type-assertion\");\nexport const noUnnecessaryTypeConversionRule = createRustNativeRule(\n \"no-unnecessary-type-conversion\",\n);\nexport const noUnnecessaryTypeParametersRule = createRustNativeRule(\n \"no-unnecessary-type-parameters\",\n);\nexport const noUnsafeArgumentRule = createRustNativeRule(\"no-unsafe-argument\");\nexport const noUnsafeEnumComparisonRule = createRustNativeRule(\"no-unsafe-enum-comparison\");\nexport const noUselessDefaultAssignmentRule = createRustNativeRule(\"no-useless-default-assignment\");\nexport const nonNullableTypeAssertionStyleRule = createRustNativeRule(\n \"non-nullable-type-assertion-style\",\n);\nexport const preferNullishCoalescingRule = createRustNativeRule(\"prefer-nullish-coalescing\");\nexport const preferOptionalChainRule = createRustNativeRule(\"prefer-optional-chain\");\nexport const preferReadonlyRule = createRustNativeRule(\"prefer-readonly\");\nexport const preferReadonlyParameterTypesRule = createRustNativeRule(\n \"prefer-readonly-parameter-types\",\n);\nexport const preferReturnThisTypeRule = createRustNativeRule(\"prefer-return-this-type\");\nexport const promiseFunctionAsyncRule = createRustNativeRule(\"promise-function-async\");\nexport const relatedGetterSetterPairsRule = createRustNativeRule(\"related-getter-setter-pairs\");\nexport const requireAwaitRule = createRustNativeRule(\"require-await\");\nexport const returnAwaitRule = createRustNativeRule(\"return-await\");\nexport const strictBooleanExpressionsRule = createRustNativeRule(\"strict-boolean-expressions\");\nexport const strictVoidReturnRule = createRustNativeRule(\"strict-void-return\");\nexport const switchExhaustivenessCheckRule = createRustNativeRule(\"switch-exhaustiveness-check\");\nexport const unboundMethodRule = createRustNativeRule(\"unbound-method\");\n"],"mappings":";;AAEA,MAAa,uBAAuB,qBAAqB,mBAAmB;AAC5E,MAAa,4BAA4B,qBAAqB,yBAAyB;AACvF,MAAa,kBAAkB,qBAAqB,cAAc;AAClE,MAAa,gCAAgC,qBAAqB,8BAA8B;AAChG,MAAa,mBAAmB,qBAAqB,eAAe;AACpE,MAAa,kCAAkC,qBAC7C,gCACF;AACA,MAAa,wBAAwB,qBAAqB,qBAAqB;AAC/E,MAAa,sBAAsB,qBAAqB,mBAAmB;AAC3E,MAAa,kCAAkC,qBAC7C,gCACF;AACA,MAAa,yCAAyC,qBACpD,wCACF;AACA,MAAa,6BAA6B,qBAAqB,0BAA0B;AACzF,MAAa,6BAA6B,qBAAqB,0BAA0B;AACzF,MAAa,sCAAsC,qBACjD,oCACF;AACA,MAAa,iCAAiC,qBAAqB,+BAA+B;AAClG,MAAa,iCAAiC,qBAAqB,+BAA+B;AAClG,MAAa,kCAAkC,qBAC7C,gCACF;AACA,MAAa,kCAAkC,qBAC7C,gCACF;AACA,MAAa,uBAAuB,qBAAqB,oBAAoB;AAC7E,MAAa,6BAA6B,qBAAqB,2BAA2B;AAC1F,MAAa,iCAAiC,qBAAqB,+BAA+B;AAClG,MAAa,oCAAoC,qBAC/C,mCACF;AACA,MAAa,8BAA8B,qBAAqB,2BAA2B;AAC3F,MAAa,0BAA0B,qBAAqB,uBAAuB;AACnF,MAAa,qBAAqB,qBAAqB,iBAAiB;AACxE,MAAa,mCAAmC,qBAC9C,iCACF;AACA,MAAa,2BAA2B,qBAAqB,yBAAyB;AACtF,MAAa,2BAA2B,qBAAqB,wBAAwB;AACrF,MAAa,+BAA+B,qBAAqB,6BAA6B;AAC9F,MAAa,mBAAmB,qBAAqB,eAAe;AACpE,MAAa,kBAAkB,qBAAqB,cAAc;AAClE,MAAa,+BAA+B,qBAAqB,4BAA4B;AAC7F,MAAa,uBAAuB,qBAAqB,oBAAoB;AAC7E,MAAa,gCAAgC,qBAAqB,6BAA6B;AAC/F,MAAa,oBAAoB,qBAAqB,gBAAgB"}
1
+ {"version":3,"file":"checker_backed.js","names":[],"sources":["../../ts/rules/checker_backed.ts"],"sourcesContent":["import { createRustNativeRule } from \"./native_bridge\";\n\nexport const consistentReturnRule = createRustNativeRule(\"consistent-return\");\nexport const consistentTypeExportsRule = createRustNativeRule(\"consistent-type-exports\");\nexport const dotNotationRule = createRustNativeRule(\"dot-notation\");\nexport const noConfusingVoidExpressionRule = createRustNativeRule(\"no-confusing-void-expression\");\nexport const noDeprecatedRule = createRustNativeRule(\"no-deprecated\");\nexport const noDuplicateTypeConstituentsRule = createRustNativeRule(\n \"no-duplicate-type-constituents\",\n);\nexport const noMisusedPromisesRule = createRustNativeRule(\"no-misused-promises\");\nexport const noMisusedSpreadRule = createRustNativeRule(\"no-misused-spread\");\nexport const noRedundantTypeConstituentsRule = createRustNativeRule(\n \"no-redundant-type-constituents\",\n);\nexport const noUnnecessaryBooleanLiteralCompareRule = createRustNativeRule(\n \"no-unnecessary-boolean-literal-compare\",\n);\nexport const noUnnecessaryConditionRule = createRustNativeRule(\"no-unnecessary-condition\");\nexport const noUnnecessaryQualifierRule = createRustNativeRule(\"no-unnecessary-qualifier\");\nexport const noUnnecessaryTemplateExpressionRule = createRustNativeRule(\n \"no-unnecessary-template-expression\",\n);\nexport const noUnnecessaryTypeArgumentsRule = createRustNativeRule(\"no-unnecessary-type-arguments\");\nexport const noUnnecessaryTypeAssertionRule = createRustNativeRule(\"no-unnecessary-type-assertion\");\nexport const noUnnecessaryTypeConversionRule = createRustNativeRule(\n \"no-unnecessary-type-conversion\",\n);\nexport const noUnnecessaryTypeParametersRule = createRustNativeRule(\n \"no-unnecessary-type-parameters\",\n);\nexport const noUnsafeArgumentRule = createRustNativeRule(\"no-unsafe-argument\");\nexport const noUnsafeEnumAssignmentRule = createRustNativeRule(\"no-unsafe-enum-assignment\");\nexport const noUnsafeEnumComparisonRule = createRustNativeRule(\"no-unsafe-enum-comparison\");\nexport const noUselessDefaultAssignmentRule = createRustNativeRule(\"no-useless-default-assignment\");\nexport const nonNullableTypeAssertionStyleRule = createRustNativeRule(\n \"non-nullable-type-assertion-style\",\n);\nexport const preferNullishCoalescingRule = createRustNativeRule(\"prefer-nullish-coalescing\");\nexport const preferOptionalChainRule = createRustNativeRule(\"prefer-optional-chain\");\nexport const preferReadonlyRule = createRustNativeRule(\"prefer-readonly\");\nexport const preferReadonlyParameterTypesRule = createRustNativeRule(\n \"prefer-readonly-parameter-types\",\n);\nexport const preferReturnThisTypeRule = createRustNativeRule(\"prefer-return-this-type\");\nexport const promiseFunctionAsyncRule = createRustNativeRule(\"promise-function-async\");\nexport const relatedGetterSetterPairsRule = createRustNativeRule(\"related-getter-setter-pairs\");\nexport const requireAwaitRule = createRustNativeRule(\"require-await\");\nexport const returnAwaitRule = createRustNativeRule(\"return-await\");\nexport const strictBooleanExpressionsRule = createRustNativeRule(\"strict-boolean-expressions\");\nexport const strictVoidReturnRule = createRustNativeRule(\"strict-void-return\");\nexport const switchExhaustivenessCheckRule = createRustNativeRule(\"switch-exhaustiveness-check\");\nexport const unboundMethodRule = createRustNativeRule(\"unbound-method\");\n"],"mappings":";;AAEA,MAAa,uBAAuB,qBAAqB,mBA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AqB,gBAAgB"}
@@ -10,7 +10,7 @@ declare namespace index_d_exports {
10
10
  * can reason about the exact supported rule surface without instantiating the
11
11
  * plugin object.
12
12
  */
13
- declare const implementedNativeRuleNames: readonly ["await-thenable", "consistent-return", "consistent-type-exports", "dot-notation", "no-array-delete", "no-base-to-string", "no-confusing-void-expression", "no-deprecated", "no-duplicate-type-constituents", "no-floating-promises", "no-for-in-array", "no-implied-eval", "no-meaningless-void-operator", "no-misused-promises", "no-misused-spread", "no-mixed-enums", "no-redundant-type-constituents", "no-unnecessary-boolean-literal-compare", "no-unnecessary-condition", "no-unnecessary-qualifier", "no-unnecessary-template-expression", "no-unnecessary-type-arguments", "no-unnecessary-type-assertion", "no-unnecessary-type-conversion", "no-unnecessary-type-parameters", "no-unsafe-argument", "no-unsafe-assignment", "no-unsafe-call", "no-unsafe-enum-comparison", "no-unsafe-member-access", "no-unsafe-return", "no-unsafe-type-assertion", "no-unsafe-unary-minus", "no-useless-default-assignment", "non-nullable-type-assertion-style", "only-throw-error", "prefer-find", "prefer-includes", "prefer-nullish-coalescing", "prefer-optional-chain", "prefer-promise-reject-errors", "prefer-readonly", "prefer-readonly-parameter-types", "prefer-reduce-type-parameter", "prefer-regexp-exec", "prefer-return-this-type", "prefer-string-starts-ends-with", "promise-function-async", "related-getter-setter-pairs", "require-array-sort-compare", "require-await", "restrict-plus-operands", "restrict-template-expressions", "return-await", "strict-boolean-expressions", "strict-void-return", "switch-exhaustiveness-check", "unbound-method", "use-unknown-in-catch-callback-variable"];
13
+ declare const implementedNativeRuleNames: readonly ["await-thenable", "consistent-return", "consistent-type-exports", "dot-notation", "no-array-delete", "no-base-to-string", "no-confusing-void-expression", "no-deprecated", "no-duplicate-type-constituents", "no-floating-promises", "no-for-in-array", "no-implied-eval", "no-meaningless-void-operator", "no-misused-promises", "no-misused-spread", "no-mixed-enums", "no-redundant-type-constituents", "no-unnecessary-boolean-literal-compare", "no-unnecessary-condition", "no-unnecessary-qualifier", "no-unnecessary-template-expression", "no-unnecessary-type-arguments", "no-unnecessary-type-assertion", "no-unnecessary-type-conversion", "no-unnecessary-type-parameters", "no-unsafe-argument", "no-unsafe-assignment", "no-unsafe-call", "no-unsafe-enum-assignment", "no-unsafe-enum-comparison", "no-unsafe-member-access", "no-unsafe-return", "no-unsafe-type-assertion", "no-unsafe-unary-minus", "no-useless-default-assignment", "non-nullable-type-assertion-style", "only-throw-error", "prefer-find", "prefer-includes", "prefer-nullish-coalescing", "prefer-optional-chain", "prefer-promise-reject-errors", "prefer-readonly", "prefer-readonly-parameter-types", "prefer-reduce-type-parameter", "prefer-regexp-exec", "prefer-return-this-type", "prefer-string-starts-ends-with", "promise-function-async", "related-getter-setter-pairs", "require-array-sort-compare", "require-await", "restrict-plus-operands", "restrict-template-expressions", "return-await", "strict-boolean-expressions", "strict-void-return", "switch-exhaustiveness-check", "unbound-method", "use-unknown-in-catch-callback-variable"];
14
14
  /**
15
15
  * Native rule names reserved for future parity work.
16
16
  *
@@ -55,6 +55,7 @@ declare const corsaOxlintRules: Readonly<{
55
55
  "no-unsafe-argument": Rule;
56
56
  "no-unsafe-assignment": Rule;
57
57
  "no-unsafe-call": Rule;
58
+ "no-unsafe-enum-assignment": Rule;
58
59
  "no-unsafe-enum-comparison": Rule;
59
60
  "no-unsafe-member-access": Rule;
60
61
  "no-unsafe-return": Rule;
@@ -15,7 +15,7 @@ import { noUnsafeReturnRule } from "./no_unsafe_return.js";
15
15
  import { noUnsafeTypeAssertionRule } from "./no_unsafe_type_assertion.js";
16
16
  import { noUnsafeUnaryMinusRule } from "./no_unsafe_unary_minus.js";
17
17
  import { onlyThrowErrorRule } from "./only_throw_error.js";
18
- import { consistentReturnRule, consistentTypeExportsRule, dotNotationRule, noConfusingVoidExpressionRule, noDeprecatedRule, noDuplicateTypeConstituentsRule, noMisusedPromisesRule, noMisusedSpreadRule, noRedundantTypeConstituentsRule, noUnnecessaryBooleanLiteralCompareRule, noUnnecessaryConditionRule, noUnnecessaryQualifierRule, noUnnecessaryTemplateExpressionRule, noUnnecessaryTypeArgumentsRule, noUnnecessaryTypeAssertionRule, noUnnecessaryTypeConversionRule, noUnnecessaryTypeParametersRule, noUnsafeArgumentRule, noUnsafeEnumComparisonRule, noUselessDefaultAssignmentRule, nonNullableTypeAssertionStyleRule, preferNullishCoalescingRule, preferOptionalChainRule, preferReadonlyParameterTypesRule, preferReadonlyRule, preferReturnThisTypeRule, promiseFunctionAsyncRule, relatedGetterSetterPairsRule, requireAwaitRule, returnAwaitRule, strictBooleanExpressionsRule, strictVoidReturnRule, switchExhaustivenessCheckRule, unboundMethodRule } from "./checker_backed.js";
18
+ import { consistentReturnRule, consistentTypeExportsRule, dotNotationRule, noConfusingVoidExpressionRule, noDeprecatedRule, noDuplicateTypeConstituentsRule, noMisusedPromisesRule, noMisusedSpreadRule, noRedundantTypeConstituentsRule, noUnnecessaryBooleanLiteralCompareRule, noUnnecessaryConditionRule, noUnnecessaryQualifierRule, noUnnecessaryTemplateExpressionRule, noUnnecessaryTypeArgumentsRule, noUnnecessaryTypeAssertionRule, noUnnecessaryTypeConversionRule, noUnnecessaryTypeParametersRule, noUnsafeArgumentRule, noUnsafeEnumAssignmentRule, noUnsafeEnumComparisonRule, noUselessDefaultAssignmentRule, nonNullableTypeAssertionStyleRule, preferNullishCoalescingRule, preferOptionalChainRule, preferReadonlyParameterTypesRule, preferReadonlyRule, preferReturnThisTypeRule, promiseFunctionAsyncRule, relatedGetterSetterPairsRule, requireAwaitRule, returnAwaitRule, strictBooleanExpressionsRule, strictVoidReturnRule, switchExhaustivenessCheckRule, unboundMethodRule } from "./checker_backed.js";
19
19
  import { preferFindRule } from "./prefer_find.js";
20
20
  import { preferIncludesRule } from "./prefer_includes.js";
21
21
  import { preferPromiseRejectErrorsRule } from "./prefer_promise_reject_errors.js";
@@ -70,6 +70,7 @@ const implementedNativeRuleNames = [
70
70
  "no-unsafe-argument",
71
71
  "no-unsafe-assignment",
72
72
  "no-unsafe-call",
73
+ "no-unsafe-enum-assignment",
73
74
  "no-unsafe-enum-comparison",
74
75
  "no-unsafe-member-access",
75
76
  "no-unsafe-return",
@@ -146,6 +147,7 @@ const corsaOxlintRules = Object.freeze({
146
147
  "no-unsafe-argument": noUnsafeArgumentRule,
147
148
  "no-unsafe-assignment": noUnsafeAssignmentRule,
148
149
  "no-unsafe-call": noUnsafeCallRule,
150
+ "no-unsafe-enum-assignment": noUnsafeEnumAssignmentRule,
149
151
  "no-unsafe-enum-comparison": noUnsafeEnumComparisonRule,
150
152
  "no-unsafe-member-access": noUnsafeMemberAccessRule,
151
153
  "no-unsafe-return": noUnsafeReturnRule,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../ts/rules/index.ts"],"sourcesContent":["import { definePlugin } from \"../plugin\";\n\nimport { awaitThenableRule } from \"./await_thenable\";\nimport { noArrayDeleteRule } from \"./no_array_delete\";\nimport { noBaseToStringRule } from \"./no_base_to_string\";\nimport { noFloatingPromisesRule } from \"./no_floating_promises\";\nimport { noForInArrayRule } from \"./no_for_in_array\";\nimport { noImpliedEvalRule } from \"./no_implied_eval\";\nimport { noMeaninglessVoidOperatorRule } from \"./no_meaningless_void_operator\";\nimport { noMixedEnumsRule } from \"./no_mixed_enums\";\nimport { noUnsafeAssignmentRule } from \"./no_unsafe_assignment\";\nimport { noUnsafeCallRule } from \"./no_unsafe_call\";\nimport { noUnsafeMemberAccessRule } from \"./no_unsafe_member_access\";\nimport { noUnsafeReturnRule } from \"./no_unsafe_return\";\nimport { noUnsafeTypeAssertionRule } from \"./no_unsafe_type_assertion\";\nimport { noUnsafeUnaryMinusRule } from \"./no_unsafe_unary_minus\";\nimport { onlyThrowErrorRule } from \"./only_throw_error\";\nimport {\n consistentReturnRule,\n consistentTypeExportsRule,\n dotNotationRule,\n noConfusingVoidExpressionRule,\n noDeprecatedRule,\n noDuplicateTypeConstituentsRule,\n noMisusedPromisesRule,\n noMisusedSpreadRule,\n noRedundantTypeConstituentsRule,\n noUnsafeArgumentRule,\n noUnsafeEnumComparisonRule,\n noUnnecessaryBooleanLiteralCompareRule,\n noUnnecessaryConditionRule,\n noUnnecessaryQualifierRule,\n noUnnecessaryTemplateExpressionRule,\n noUnnecessaryTypeArgumentsRule,\n noUnnecessaryTypeAssertionRule,\n noUnnecessaryTypeConversionRule,\n noUnnecessaryTypeParametersRule,\n noUselessDefaultAssignmentRule,\n nonNullableTypeAssertionStyleRule,\n preferNullishCoalescingRule,\n preferOptionalChainRule,\n preferReadonlyParameterTypesRule,\n preferReadonlyRule,\n preferReturnThisTypeRule,\n promiseFunctionAsyncRule,\n relatedGetterSetterPairsRule,\n requireAwaitRule,\n returnAwaitRule,\n strictBooleanExpressionsRule,\n strictVoidReturnRule,\n switchExhaustivenessCheckRule,\n unboundMethodRule,\n} from \"./checker_backed\";\nimport { preferFindRule } from \"./prefer_find\";\nimport { preferIncludesRule } from \"./prefer_includes\";\nimport { preferPromiseRejectErrorsRule } from \"./prefer_promise_reject_errors\";\nimport { preferReduceTypeParameterRule } from \"./prefer_reduce_type_parameter\";\nimport { preferRegexpExecRule } from \"./prefer_regexp_exec\";\nimport { preferStringStartsEndsWithRule } from \"./prefer_string_starts_ends_with\";\nimport { requireArraySortCompareRule } from \"./require_array_sort_compare\";\nimport { restrictPlusOperandsRule } from \"./restrict_plus_operands\";\nimport { restrictTemplateExpressionsRule } from \"./restrict_template_expressions\";\nimport { useUnknownInCatchCallbackVariableRule } from \"./use_unknown_in_catch_callback_variable\";\n\n/**\n * Native rule names currently implemented by the Rust-backed Corsa rule bridge.\n *\n * The list is exported so preset builders, tests, and documentation generators\n * can reason about the exact supported rule surface without instantiating the\n * plugin object.\n */\nexport const implementedNativeRuleNames = [\n \"await-thenable\",\n \"consistent-return\",\n \"consistent-type-exports\",\n \"dot-notation\",\n \"no-array-delete\",\n \"no-base-to-string\",\n \"no-confusing-void-expression\",\n \"no-deprecated\",\n \"no-duplicate-type-constituents\",\n \"no-floating-promises\",\n \"no-for-in-array\",\n \"no-implied-eval\",\n \"no-meaningless-void-operator\",\n \"no-misused-promises\",\n \"no-misused-spread\",\n \"no-mixed-enums\",\n \"no-redundant-type-constituents\",\n \"no-unnecessary-boolean-literal-compare\",\n \"no-unnecessary-condition\",\n \"no-unnecessary-qualifier\",\n \"no-unnecessary-template-expression\",\n \"no-unnecessary-type-arguments\",\n \"no-unnecessary-type-assertion\",\n \"no-unnecessary-type-conversion\",\n \"no-unnecessary-type-parameters\",\n \"no-unsafe-argument\",\n \"no-unsafe-assignment\",\n \"no-unsafe-call\",\n \"no-unsafe-enum-comparison\",\n \"no-unsafe-member-access\",\n \"no-unsafe-return\",\n \"no-unsafe-type-assertion\",\n \"no-unsafe-unary-minus\",\n \"no-useless-default-assignment\",\n \"non-nullable-type-assertion-style\",\n \"only-throw-error\",\n \"prefer-find\",\n \"prefer-includes\",\n \"prefer-nullish-coalescing\",\n \"prefer-optional-chain\",\n \"prefer-promise-reject-errors\",\n \"prefer-readonly\",\n \"prefer-readonly-parameter-types\",\n \"prefer-reduce-type-parameter\",\n \"prefer-regexp-exec\",\n \"prefer-return-this-type\",\n \"prefer-string-starts-ends-with\",\n \"promise-function-async\",\n \"related-getter-setter-pairs\",\n \"require-array-sort-compare\",\n \"require-await\",\n \"restrict-plus-operands\",\n \"restrict-template-expressions\",\n \"return-await\",\n \"strict-boolean-expressions\",\n \"strict-void-return\",\n \"switch-exhaustiveness-check\",\n \"unbound-method\",\n \"use-unknown-in-catch-callback-variable\",\n] as const;\n\n/**\n * Native rule names reserved for future parity work.\n *\n * This is intentionally empty once all registered rule names have a concrete\n * implementation, but keeping the export stable lets callers surface roadmap\n * state without hard-coding package internals.\n */\nexport const pendingNativeRuleNames = [] as const;\n\n/**\n * Oxlint-compatible rule map backed by Corsa type information.\n *\n * Keys are unprefixed rule names. Consumers usually install this through\n * `corsaOxlintPlugin`, while advanced integrations can compose this map into\n * their own plugin object.\n */\nexport const corsaOxlintRules = Object.freeze({\n \"await-thenable\": awaitThenableRule,\n \"consistent-return\": consistentReturnRule,\n \"consistent-type-exports\": consistentTypeExportsRule,\n \"dot-notation\": dotNotationRule,\n \"no-array-delete\": noArrayDeleteRule,\n \"no-base-to-string\": noBaseToStringRule,\n \"no-confusing-void-expression\": noConfusingVoidExpressionRule,\n \"no-deprecated\": noDeprecatedRule,\n \"no-duplicate-type-constituents\": noDuplicateTypeConstituentsRule,\n \"no-floating-promises\": noFloatingPromisesRule,\n \"no-for-in-array\": noForInArrayRule,\n \"no-implied-eval\": noImpliedEvalRule,\n \"no-meaningless-void-operator\": noMeaninglessVoidOperatorRule,\n \"no-misused-promises\": noMisusedPromisesRule,\n \"no-misused-spread\": noMisusedSpreadRule,\n \"no-mixed-enums\": noMixedEnumsRule,\n \"no-redundant-type-constituents\": noRedundantTypeConstituentsRule,\n \"no-unnecessary-boolean-literal-compare\": noUnnecessaryBooleanLiteralCompareRule,\n \"no-unnecessary-condition\": noUnnecessaryConditionRule,\n \"no-unnecessary-qualifier\": noUnnecessaryQualifierRule,\n \"no-unnecessary-template-expression\": noUnnecessaryTemplateExpressionRule,\n \"no-unnecessary-type-arguments\": noUnnecessaryTypeArgumentsRule,\n \"no-unnecessary-type-assertion\": noUnnecessaryTypeAssertionRule,\n \"no-unnecessary-type-conversion\": noUnnecessaryTypeConversionRule,\n \"no-unnecessary-type-parameters\": noUnnecessaryTypeParametersRule,\n \"no-unsafe-argument\": noUnsafeArgumentRule,\n \"no-unsafe-assignment\": noUnsafeAssignmentRule,\n \"no-unsafe-call\": noUnsafeCallRule,\n \"no-unsafe-enum-comparison\": noUnsafeEnumComparisonRule,\n \"no-unsafe-member-access\": noUnsafeMemberAccessRule,\n \"no-unsafe-return\": noUnsafeReturnRule,\n \"no-unsafe-type-assertion\": noUnsafeTypeAssertionRule,\n \"no-unsafe-unary-minus\": noUnsafeUnaryMinusRule,\n \"no-useless-default-assignment\": noUselessDefaultAssignmentRule,\n \"non-nullable-type-assertion-style\": nonNullableTypeAssertionStyleRule,\n \"only-throw-error\": onlyThrowErrorRule,\n \"prefer-find\": preferFindRule,\n \"prefer-includes\": preferIncludesRule,\n \"prefer-nullish-coalescing\": preferNullishCoalescingRule,\n \"prefer-optional-chain\": preferOptionalChainRule,\n \"prefer-promise-reject-errors\": preferPromiseRejectErrorsRule,\n \"prefer-readonly\": preferReadonlyRule,\n \"prefer-readonly-parameter-types\": preferReadonlyParameterTypesRule,\n \"prefer-reduce-type-parameter\": preferReduceTypeParameterRule,\n \"prefer-regexp-exec\": preferRegexpExecRule,\n \"prefer-return-this-type\": preferReturnThisTypeRule,\n \"prefer-string-starts-ends-with\": preferStringStartsEndsWithRule,\n \"promise-function-async\": promiseFunctionAsyncRule,\n \"related-getter-setter-pairs\": relatedGetterSetterPairsRule,\n \"require-array-sort-compare\": requireArraySortCompareRule,\n \"require-await\": requireAwaitRule,\n \"restrict-plus-operands\": restrictPlusOperandsRule,\n \"restrict-template-expressions\": restrictTemplateExpressionsRule,\n \"return-await\": returnAwaitRule,\n \"strict-boolean-expressions\": strictBooleanExpressionsRule,\n \"strict-void-return\": strictVoidReturnRule,\n \"switch-exhaustiveness-check\": switchExhaustivenessCheckRule,\n \"unbound-method\": unboundMethodRule,\n \"use-unknown-in-catch-callback-variable\": useUnknownInCatchCallbackVariableRule,\n});\n\n/**\n * Oxlint plugin object exposing the Corsa-backed native rule set.\n *\n * Register it under the namespace expected by your config, then enable rules\n * such as `typescript/no-floating-promises` or `typescript/restrict-plus-operands`.\n */\nexport const corsaOxlintPlugin = definePlugin({\n meta: { name: \"oxlint-plugin-corsa\" },\n rules: corsaOxlintRules,\n});\n\nexport default corsaOxlintPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;AASA,MAAa,yBAAyB,CAAC;;;;;;;;AASvC,MAAa,mBAAmB,OAAO,OAAO;CAC5C,kBAAkB;CAClB,qBAAqB;CACrB,2BAA2B;CAC3B,gBAAgB;CAChB,mBAAmB;CACnB,qBAAqB;CACrB,gCAAgC;CAChC,iBAAiB;CACjB,kCAAkC;CAClC,wBAAwB;CACxB,mBAAmB;CACnB,mBAAmB;CACnB,gCAAgC;CAChC,uBAAuB;CACvB,qBAAqB;CACrB,kBAAkB;CAClB,kCAAkC;CAClC,0CAA0C;CAC1C,4BAA4B;CAC5B,4BAA4B;CAC5B,sCAAsC;CACtC,iCAAiC;CACjC,iCAAiC;CACjC,kCAAkC;CAClC,kCAAkC;CAClC,sBAAsB;CACtB,wBAAwB;CACxB,kBAAkB;CAClB,6BAA6B;CAC7B,2BAA2B;CAC3B,oBAAoB;CACpB,4BAA4B;CAC5B,yBAAyB;CACzB,iCAAiC;CACjC,qCAAqC;CACrC,oBAAoB;CACpB,eAAe;CACf,mBAAmB;CACnB,6BAA6B;CAC7B,yBAAyB;CACzB,gCAAgC;CAChC,mBAAmB;CACnB,mCAAmC;CACnC,gCAAgC;CAChC,sBAAsB;CACtB,2BAA2B;CAC3B,kCAAkC;CAClC,0BAA0B;CAC1B,+BAA+B;CAC/B,8BAA8B;CAC9B,iBAAiB;CACjB,0BAA0B;CAC1B,iCAAiC;CACjC,gBAAgB;CAChB,8BAA8B;CAC9B,sBAAsB;CACtB,+BAA+B;CAC/B,kBAAkB;CAClB,0CAA0C;AAC5C,CAAC;;;;;;;AAQD,MAAa,oBAAoB,aAAa;CAC5C,MAAM,EAAE,MAAM,sBAAsB;CACpC,OAAO;AACT,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../ts/rules/index.ts"],"sourcesContent":["import { definePlugin } from \"../plugin\";\n\nimport { awaitThenableRule } from \"./await_thenable\";\nimport { noArrayDeleteRule } from \"./no_array_delete\";\nimport { noBaseToStringRule } from \"./no_base_to_string\";\nimport { noFloatingPromisesRule } from \"./no_floating_promises\";\nimport { noForInArrayRule } from \"./no_for_in_array\";\nimport { noImpliedEvalRule } from \"./no_implied_eval\";\nimport { noMeaninglessVoidOperatorRule } from \"./no_meaningless_void_operator\";\nimport { noMixedEnumsRule } from \"./no_mixed_enums\";\nimport { noUnsafeAssignmentRule } from \"./no_unsafe_assignment\";\nimport { noUnsafeCallRule } from \"./no_unsafe_call\";\nimport { noUnsafeMemberAccessRule } from \"./no_unsafe_member_access\";\nimport { noUnsafeReturnRule } from \"./no_unsafe_return\";\nimport { noUnsafeTypeAssertionRule } from \"./no_unsafe_type_assertion\";\nimport { noUnsafeUnaryMinusRule } from \"./no_unsafe_unary_minus\";\nimport { onlyThrowErrorRule } from \"./only_throw_error\";\nimport {\n consistentReturnRule,\n consistentTypeExportsRule,\n dotNotationRule,\n noConfusingVoidExpressionRule,\n noDeprecatedRule,\n noDuplicateTypeConstituentsRule,\n noMisusedPromisesRule,\n noMisusedSpreadRule,\n noRedundantTypeConstituentsRule,\n noUnsafeArgumentRule,\n noUnsafeEnumAssignmentRule,\n noUnsafeEnumComparisonRule,\n noUnnecessaryBooleanLiteralCompareRule,\n noUnnecessaryConditionRule,\n noUnnecessaryQualifierRule,\n noUnnecessaryTemplateExpressionRule,\n noUnnecessaryTypeArgumentsRule,\n noUnnecessaryTypeAssertionRule,\n noUnnecessaryTypeConversionRule,\n noUnnecessaryTypeParametersRule,\n noUselessDefaultAssignmentRule,\n nonNullableTypeAssertionStyleRule,\n preferNullishCoalescingRule,\n preferOptionalChainRule,\n preferReadonlyParameterTypesRule,\n preferReadonlyRule,\n preferReturnThisTypeRule,\n promiseFunctionAsyncRule,\n relatedGetterSetterPairsRule,\n requireAwaitRule,\n returnAwaitRule,\n strictBooleanExpressionsRule,\n strictVoidReturnRule,\n switchExhaustivenessCheckRule,\n unboundMethodRule,\n} from \"./checker_backed\";\nimport { preferFindRule } from \"./prefer_find\";\nimport { preferIncludesRule } from \"./prefer_includes\";\nimport { preferPromiseRejectErrorsRule } from \"./prefer_promise_reject_errors\";\nimport { preferReduceTypeParameterRule } from \"./prefer_reduce_type_parameter\";\nimport { preferRegexpExecRule } from \"./prefer_regexp_exec\";\nimport { preferStringStartsEndsWithRule } from \"./prefer_string_starts_ends_with\";\nimport { requireArraySortCompareRule } from \"./require_array_sort_compare\";\nimport { restrictPlusOperandsRule } from \"./restrict_plus_operands\";\nimport { restrictTemplateExpressionsRule } from \"./restrict_template_expressions\";\nimport { useUnknownInCatchCallbackVariableRule } from \"./use_unknown_in_catch_callback_variable\";\n\n/**\n * Native rule names currently implemented by the Rust-backed Corsa rule bridge.\n *\n * The list is exported so preset builders, tests, and documentation generators\n * can reason about the exact supported rule surface without instantiating the\n * plugin object.\n */\nexport const implementedNativeRuleNames = [\n \"await-thenable\",\n \"consistent-return\",\n \"consistent-type-exports\",\n \"dot-notation\",\n \"no-array-delete\",\n \"no-base-to-string\",\n \"no-confusing-void-expression\",\n \"no-deprecated\",\n \"no-duplicate-type-constituents\",\n \"no-floating-promises\",\n \"no-for-in-array\",\n \"no-implied-eval\",\n \"no-meaningless-void-operator\",\n \"no-misused-promises\",\n \"no-misused-spread\",\n \"no-mixed-enums\",\n \"no-redundant-type-constituents\",\n \"no-unnecessary-boolean-literal-compare\",\n \"no-unnecessary-condition\",\n \"no-unnecessary-qualifier\",\n \"no-unnecessary-template-expression\",\n \"no-unnecessary-type-arguments\",\n \"no-unnecessary-type-assertion\",\n \"no-unnecessary-type-conversion\",\n \"no-unnecessary-type-parameters\",\n \"no-unsafe-argument\",\n \"no-unsafe-assignment\",\n \"no-unsafe-call\",\n \"no-unsafe-enum-assignment\",\n \"no-unsafe-enum-comparison\",\n \"no-unsafe-member-access\",\n \"no-unsafe-return\",\n \"no-unsafe-type-assertion\",\n \"no-unsafe-unary-minus\",\n \"no-useless-default-assignment\",\n \"non-nullable-type-assertion-style\",\n \"only-throw-error\",\n \"prefer-find\",\n \"prefer-includes\",\n \"prefer-nullish-coalescing\",\n \"prefer-optional-chain\",\n \"prefer-promise-reject-errors\",\n \"prefer-readonly\",\n \"prefer-readonly-parameter-types\",\n \"prefer-reduce-type-parameter\",\n \"prefer-regexp-exec\",\n \"prefer-return-this-type\",\n \"prefer-string-starts-ends-with\",\n \"promise-function-async\",\n \"related-getter-setter-pairs\",\n \"require-array-sort-compare\",\n \"require-await\",\n \"restrict-plus-operands\",\n \"restrict-template-expressions\",\n \"return-await\",\n \"strict-boolean-expressions\",\n \"strict-void-return\",\n \"switch-exhaustiveness-check\",\n \"unbound-method\",\n \"use-unknown-in-catch-callback-variable\",\n] as const;\n\n/**\n * Native rule names reserved for future parity work.\n *\n * This is intentionally empty once all registered rule names have a concrete\n * implementation, but keeping the export stable lets callers surface roadmap\n * state without hard-coding package internals.\n */\nexport const pendingNativeRuleNames = [] as const;\n\n/**\n * Oxlint-compatible rule map backed by Corsa type information.\n *\n * Keys are unprefixed rule names. Consumers usually install this through\n * `corsaOxlintPlugin`, while advanced integrations can compose this map into\n * their own plugin object.\n */\nexport const corsaOxlintRules = Object.freeze({\n \"await-thenable\": awaitThenableRule,\n \"consistent-return\": consistentReturnRule,\n \"consistent-type-exports\": consistentTypeExportsRule,\n \"dot-notation\": dotNotationRule,\n \"no-array-delete\": noArrayDeleteRule,\n \"no-base-to-string\": noBaseToStringRule,\n \"no-confusing-void-expression\": noConfusingVoidExpressionRule,\n \"no-deprecated\": noDeprecatedRule,\n \"no-duplicate-type-constituents\": noDuplicateTypeConstituentsRule,\n \"no-floating-promises\": noFloatingPromisesRule,\n \"no-for-in-array\": noForInArrayRule,\n \"no-implied-eval\": noImpliedEvalRule,\n \"no-meaningless-void-operator\": noMeaninglessVoidOperatorRule,\n \"no-misused-promises\": noMisusedPromisesRule,\n \"no-misused-spread\": noMisusedSpreadRule,\n \"no-mixed-enums\": noMixedEnumsRule,\n \"no-redundant-type-constituents\": noRedundantTypeConstituentsRule,\n \"no-unnecessary-boolean-literal-compare\": noUnnecessaryBooleanLiteralCompareRule,\n \"no-unnecessary-condition\": noUnnecessaryConditionRule,\n \"no-unnecessary-qualifier\": noUnnecessaryQualifierRule,\n \"no-unnecessary-template-expression\": noUnnecessaryTemplateExpressionRule,\n \"no-unnecessary-type-arguments\": noUnnecessaryTypeArgumentsRule,\n \"no-unnecessary-type-assertion\": noUnnecessaryTypeAssertionRule,\n \"no-unnecessary-type-conversion\": noUnnecessaryTypeConversionRule,\n \"no-unnecessary-type-parameters\": noUnnecessaryTypeParametersRule,\n \"no-unsafe-argument\": noUnsafeArgumentRule,\n \"no-unsafe-assignment\": noUnsafeAssignmentRule,\n \"no-unsafe-call\": noUnsafeCallRule,\n \"no-unsafe-enum-assignment\": noUnsafeEnumAssignmentRule,\n \"no-unsafe-enum-comparison\": noUnsafeEnumComparisonRule,\n \"no-unsafe-member-access\": noUnsafeMemberAccessRule,\n \"no-unsafe-return\": noUnsafeReturnRule,\n \"no-unsafe-type-assertion\": noUnsafeTypeAssertionRule,\n \"no-unsafe-unary-minus\": noUnsafeUnaryMinusRule,\n \"no-useless-default-assignment\": noUselessDefaultAssignmentRule,\n \"non-nullable-type-assertion-style\": nonNullableTypeAssertionStyleRule,\n \"only-throw-error\": onlyThrowErrorRule,\n \"prefer-find\": preferFindRule,\n \"prefer-includes\": preferIncludesRule,\n \"prefer-nullish-coalescing\": preferNullishCoalescingRule,\n \"prefer-optional-chain\": preferOptionalChainRule,\n \"prefer-promise-reject-errors\": preferPromiseRejectErrorsRule,\n \"prefer-readonly\": preferReadonlyRule,\n \"prefer-readonly-parameter-types\": preferReadonlyParameterTypesRule,\n \"prefer-reduce-type-parameter\": preferReduceTypeParameterRule,\n \"prefer-regexp-exec\": preferRegexpExecRule,\n \"prefer-return-this-type\": preferReturnThisTypeRule,\n \"prefer-string-starts-ends-with\": preferStringStartsEndsWithRule,\n \"promise-function-async\": promiseFunctionAsyncRule,\n \"related-getter-setter-pairs\": relatedGetterSetterPairsRule,\n \"require-array-sort-compare\": requireArraySortCompareRule,\n \"require-await\": requireAwaitRule,\n \"restrict-plus-operands\": restrictPlusOperandsRule,\n \"restrict-template-expressions\": restrictTemplateExpressionsRule,\n \"return-await\": returnAwaitRule,\n \"strict-boolean-expressions\": strictBooleanExpressionsRule,\n \"strict-void-return\": strictVoidReturnRule,\n \"switch-exhaustiveness-check\": switchExhaustivenessCheckRule,\n \"unbound-method\": unboundMethodRule,\n \"use-unknown-in-catch-callback-variable\": useUnknownInCatchCallbackVariableRule,\n});\n\n/**\n * Oxlint plugin object exposing the Corsa-backed native rule set.\n *\n * Register it under the namespace expected by your config, then enable rules\n * such as `typescript/no-floating-promises` or `typescript/restrict-plus-operands`.\n */\nexport const corsaOxlintPlugin = definePlugin({\n meta: { name: \"oxlint-plugin-corsa\" },\n rules: corsaOxlintRules,\n});\n\nexport default corsaOxlintPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;AASA,MAAa,yBAAyB,CAAC;;;;;;;;AASvC,MAAa,mBAAmB,OAAO,OAAO;CAC5C,kBAAkB;CAClB,qBAAqB;CACrB,2BAA2B;CAC3B,gBAAgB;CAChB,mBAAmB;CACnB,qBAAqB;CACrB,gCAAgC;CAChC,iBAAiB;CACjB,kCAAkC;CAClC,wBAAwB;CACxB,mBAAmB;CACnB,mBAAmB;CACnB,gCAAgC;CAChC,uBAAuB;CACvB,qBAAqB;CACrB,kBAAkB;CAClB,kCAAkC;CAClC,0CAA0C;CAC1C,4BAA4B;CAC5B,4BAA4B;CAC5B,sCAAsC;CACtC,iCAAiC;CACjC,iCAAiC;CACjC,kCAAkC;CAClC,kCAAkC;CAClC,sBAAsB;CACtB,wBAAwB;CACxB,kBAAkB;CAClB,6BAA6B;CAC7B,6BAA6B;CAC7B,2BAA2B;CAC3B,oBAAoB;CACpB,4BAA4B;CAC5B,yBAAyB;CACzB,iCAAiC;CACjC,qCAAqC;CACrC,oBAAoB;CACpB,eAAe;CACf,mBAAmB;CACnB,6BAA6B;CAC7B,yBAAyB;CACzB,gCAAgC;CAChC,mBAAmB;CACnB,mCAAmC;CACnC,gCAAgC;CAChC,sBAAsB;CACtB,2BAA2B;CAC3B,kCAAkC;CAClC,0BAA0B;CAC1B,+BAA+B;CAC/B,8BAA8B;CAC9B,iBAAiB;CACjB,0BAA0B;CAC1B,iCAAiC;CACjC,gBAAgB;CAChB,8BAA8B;CAC9B,sBAAsB;CACtB,+BAA+B;CAC/B,kBAAkB;CAClB,0CAA0C;AAC5C,CAAC;;;;;;;AAQD,MAAa,oBAAoB,aAAa;CAC5C,MAAM,EAAE,MAAM,sBAAsB;CACpC,OAAO;AACT,CAAC"}
@@ -65,8 +65,10 @@ function reportNativeDiagnostics(context, node, diagnostics) {
65
65
  for (const diagnostic of diagnostics) context.report({
66
66
  node: reportNodeForRange(node, diagnostic.range),
67
67
  messageId: diagnostic.messageId,
68
+ ...diagnostic.data ? { data: diagnostic.data } : {},
68
69
  ...diagnostic.suggestions?.length ? { suggest: diagnostic.suggestions.map((suggestion) => ({
69
70
  messageId: suggestion.messageId,
71
+ ...diagnostic.data ? { data: diagnostic.data } : {},
70
72
  fix: (fixer) => suggestion.fixes.map((fix) => fixer.replaceTextRange(oxlintRange(fix.range), fix.replacementText))
71
73
  })) } : {}
72
74
  });
@@ -1 +1 @@
1
- {"version":3,"file":"native_bridge.js","names":[],"sources":["../../ts/rules/native_bridge.ts"],"sourcesContent":["import { nativeLintRuleMetas, runNativeLintRule } from \"@corsa-bind/napi\";\nimport type {\n NativeLintDiagnostic,\n NativeLintNode,\n NativeLintRange,\n NativeLintRuleMeta,\n NativeNodeMetadataDepth,\n} from \"@corsa-bind/napi\";\n\nimport { attachConfigFacts, ruleFactProviders } from \"./fact_providers\";\nimport { createNativeRule } from \"./rule_creator\";\nimport { checkerFor, propertyNamesOfNode, typeAtNode, typeTextsAtNode } from \"./type_utils\";\nimport type { ContextWithParserOptions, CorsaCallSignatureFacts } from \"../types\";\n\ntype RangedNode = {\n readonly type: string;\n readonly range: readonly [number, number];\n};\n\ntype NativeRuleBridgeOptions = {\n readonly shouldRun?: (node: RangedNode, context: ContextWithParserOptions) => boolean;\n readonly includeTypeTexts?: NodeMetadataOption;\n readonly includePropertyNames?: NodeMetadataOption;\n readonly includeText?: NodeMetadataOption;\n readonly maxDepth?: number;\n};\n\ntype NodeMetadataOption = boolean | ((node: RangedNode, depth: number) => boolean);\n\nconst MAX_NATIVE_NODE_DEPTH = 4;\nconst nativeRuleMetasByName = new Map(nativeLintRuleMetas().map((meta) => [meta.name, meta]));\n\nexport function createRustNativeRule(\n ruleName: string,\n metaOverrides: Record<string, unknown> = {},\n bridgeOptions: NativeRuleBridgeOptions = {},\n) {\n const meta = nativeRuleMeta(ruleName);\n return createNativeRule(\n ruleName,\n {\n docs: {\n description: meta.docsDescription,\n },\n hasSuggestions: meta.hasSuggestions,\n messages: meta.messages,\n ...metaOverrides,\n },\n (context) =>\n Object.fromEntries(\n meta.listeners.map((listener) => [\n listener,\n (node: RangedNode) => {\n if (bridgeOptions.shouldRun?.(node, context) === false) {\n return;\n }\n const includeTypeTexts = includeTypeTextsOption(bridgeOptions, meta);\n const includeText = includeTextOption(bridgeOptions, meta);\n reportNativeDiagnostics(\n context,\n node,\n runNativeLintRule(\n ruleName,\n toNativeNode(\n context,\n node,\n includeTypeTexts,\n maxDepthOption(bridgeOptions, meta),\n true,\n includePropertyNamesOption(bridgeOptions, meta),\n includeText,\n meta.bridge.symbolFacts === true,\n 0,\n ruleName,\n ),\n ),\n );\n },\n ]),\n ),\n );\n}\n\nexport function toNativeNode(\n context: ContextWithParserOptions,\n node: RangedNode,\n includeTypeTexts: NodeMetadataOption = true,\n maxDepth = MAX_NATIVE_NODE_DEPTH,\n includeRuleOptions = true,\n includePropertyNames: NodeMetadataOption = includeTypeTexts,\n includeText: NodeMetadataOption = false,\n includeSymbolFacts = false,\n depth = 0,\n ruleName?: string,\n): NativeLintNode {\n const fields: Record<string, unknown> = {};\n const children: Record<string, NativeLintNode> = {};\n const childLists: Record<string, NativeLintNode[]> = {};\n\n const typeAnnotationText = sourceTypeAnnotationText(context, node);\n if (typeAnnotationText) {\n fields.__typeAnnotationText = typeAnnotationText;\n }\n\n const options = (context as { options?: unknown }).options;\n if (includeRuleOptions && Array.isArray(options) && options.length > 0 && isJsonValue(options)) {\n fields.__ruleOptions = options;\n }\n if (includeRuleOptions) {\n // Host facts run BEFORE child serialization: fact providers may annotate\n // descendant AST nodes, and those annotations must be visible when the\n // subtree is serialized below.\n addHostInputs(context, node, fields, includeSymbolFacts, ruleName);\n }\n\n for (const [key, value] of Object.entries(node)) {\n if (isSkippedField(key) || key in fields) {\n continue;\n }\n if (isNativeChildNode(value)) {\n if (maxDepth > 0) {\n children[key] = toNativeNode(\n context,\n value,\n includeTypeTexts,\n maxDepth - 1,\n false,\n includePropertyNames,\n includeText,\n includeSymbolFacts,\n depth + 1,\n );\n }\n continue;\n }\n if (Array.isArray(value)) {\n if (key.startsWith(\"__\") && isJsonValue(value)) {\n // Rule-specific facts may be nested JSON (e.g. per-slot text lists).\n fields[key] = value;\n continue;\n }\n if (maxDepth > 0 && value.every(isNativeChildNode)) {\n childLists[key] = value.map((child) =>\n toNativeNode(\n context,\n child,\n includeTypeTexts,\n maxDepth - 1,\n false,\n includePropertyNames,\n includeText,\n includeSymbolFacts,\n depth + 1,\n ),\n );\n } else if (value.every(isJsonPrimitive)) {\n fields[key] = value;\n }\n continue;\n }\n if (isPrimitiveRecord(value)) {\n fields[key] = value;\n continue;\n }\n if (isJsonPrimitive(value)) {\n fields[key] = value;\n }\n }\n\n const nativeNode: NativeLintNode = {\n kind: node.type,\n range: nativeRange(node.range),\n };\n if (includeMetadataForNode(includeText, node, depth)) {\n nativeNode.text = context.sourceCode.getText(node as never);\n }\n if (includeMetadataForNode(includeTypeTexts, node, depth)) {\n nativeNode.typeTexts = typeTextsAtNode(context, node);\n }\n if (includeMetadataForNode(includePropertyNames, node, depth)) {\n nativeNode.propertyNames = propertyNamesOfNode(context, node);\n }\n if (Object.keys(fields).length > 0) {\n nativeNode.fields = fields;\n }\n if (Object.keys(children).length > 0) {\n nativeNode.children = children;\n }\n if (Object.keys(childLists).length > 0) {\n nativeNode.childLists = childLists;\n }\n return nativeNode;\n}\n\nexport function reportNativeDiagnostics(\n context: ContextWithParserOptions,\n node: RangedNode,\n diagnostics: readonly NativeLintDiagnostic[],\n): void {\n for (const diagnostic of diagnostics) {\n context.report({\n node: reportNodeForRange(node, diagnostic.range),\n messageId: diagnostic.messageId,\n ...(diagnostic.suggestions?.length\n ? {\n suggest: diagnostic.suggestions.map((suggestion) => ({\n messageId: suggestion.messageId,\n fix: (fixer: any) =>\n suggestion.fixes.map((fix) =>\n fixer.replaceTextRange(oxlintRange(fix.range), fix.replacementText),\n ),\n })),\n }\n : {}),\n } as never);\n }\n}\n\nfunction reportNodeForRange(root: RangedNode, range: NativeLintRange): RangedNode {\n return findNodeByRange(root, range) ?? root;\n}\n\nfunction findNodeByRange(\n value: unknown,\n range: NativeLintRange,\n seen = new Set<object>(),\n): RangedNode | undefined {\n if (typeof value !== \"object\" || value === null || seen.has(value)) {\n return undefined;\n }\n seen.add(value);\n\n if (isNativeChildNode(value) && sameRange(value.range, range)) {\n return value;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n const match = findNodeByRange(item, range, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n for (const [key, child] of Object.entries(value)) {\n if (isSkippedField(key)) {\n continue;\n }\n const match = findNodeByRange(child, range, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n}\n\nfunction nativeRuleMeta(ruleName: string): NativeLintRuleMeta {\n const meta = nativeRuleMetasByName.get(ruleName);\n if (!meta) {\n throw new Error(`corsa oxlint native Rust rule is not registered: ${ruleName}`);\n }\n return meta;\n}\n\nfunction includeTypeTextsOption(\n options: NativeRuleBridgeOptions,\n meta: NativeLintRuleMeta,\n): NodeMetadataOption {\n return options.includeTypeTexts ?? nodeMetadataDepthOption(meta.bridge.typeTexts, false);\n}\n\nfunction includePropertyNamesOption(\n options: NativeRuleBridgeOptions,\n meta: NativeLintRuleMeta,\n): NodeMetadataOption {\n return options.includePropertyNames ?? nodeMetadataDepthOption(meta.bridge.propertyNames, false);\n}\n\nfunction includeTextOption(\n options: NativeRuleBridgeOptions,\n meta: NativeLintRuleMeta,\n): NodeMetadataOption {\n return options.includeText ?? nodeMetadataDepthOption(meta.bridge.text, false);\n}\n\nfunction maxDepthOption(options: NativeRuleBridgeOptions, meta: NativeLintRuleMeta): number {\n return options.maxDepth ?? meta.bridge.maxDepth ?? MAX_NATIVE_NODE_DEPTH;\n}\n\nfunction nodeMetadataDepthOption(\n metadata: NativeNodeMetadataDepth | undefined,\n fallback: NodeMetadataOption,\n): NodeMetadataOption {\n if (!metadata) {\n return fallback;\n }\n return (_node, depth) => depth >= metadata.minDepth && depth <= metadata.maxDepth;\n}\n\nfunction includeMetadataForNode(\n option: NodeMetadataOption,\n node: RangedNode,\n depth: number,\n): boolean {\n return typeof option === \"function\" ? option(node, depth) : option;\n}\n\nfunction sourceTypeAnnotationText(\n context: ContextWithParserOptions,\n node: RangedNode,\n): string | undefined {\n const annotation = (node as any).typeAnnotation?.typeAnnotation ?? (node as any).typeAnnotation;\n if (!annotation) {\n return undefined;\n }\n const text = (context as any).sourceCode?.getText(annotation);\n return typeof text === \"string\" && text.length > 0 ? text : undefined;\n}\n\nfunction nativeRange(range: readonly [number, number]): NativeLintRange {\n return { start: range[0], end: range[1] };\n}\n\nfunction oxlintRange(range: NativeLintRange): [number, number] {\n return [range.start, range.end];\n}\n\nfunction sameRange(range: readonly [number, number], expected: NativeLintRange): boolean {\n return range[0] === expected.start && range[1] === expected.end;\n}\n\nfunction addHostInputs(\n context: ContextWithParserOptions,\n node: RangedNode,\n fields: Record<string, unknown>,\n includeSymbolFacts: boolean,\n ruleName?: string,\n): void {\n const current = node as any;\n const ancestors = ancestorFacts(context, current);\n if (ancestors.length > 0) {\n fields.__ancestorFacts = ancestors;\n }\n if (current.type === \"CallExpression\" || current.type === \"NewExpression\") {\n const callFacts = callFactsOfNode(context, current);\n if (Object.keys(callFacts).length > 0) {\n fields.__callFacts = callFacts;\n }\n }\n if (current.parent?.type) {\n fields.__parentKind = current.parent.type;\n }\n if (includeSymbolFacts) {\n const symbolFacts = symbolFactsOfNode(context, current);\n if (Object.keys(symbolFacts).length > 0) {\n fields.__symbolFacts = symbolFacts;\n }\n }\n const typeParameterFacts = typeParameterFactsOfNode(context, current);\n if (Object.keys(typeParameterFacts).length > 0) {\n fields.__typeParameterFacts = typeParameterFacts;\n }\n const returnTypeFacts = returnTypeFactsOfNode(context, current);\n if (Object.keys(returnTypeFacts).length > 0) {\n fields.__returnTypeFacts = returnTypeFacts;\n }\n if (ruleName) {\n const sink = { fields };\n attachConfigFacts(ruleName, context, sink);\n for (const provider of ruleFactProviders[ruleName] ?? []) {\n provider(context, current, sink);\n }\n }\n}\n\nfunction callFactsOfNode(context: ContextWithParserOptions, node: any): Record<string, unknown> {\n const facts: Record<string, unknown> = {};\n const calleeName = identifierName(stripChainExpression(node.callee));\n if (calleeName) {\n facts.calleeName = calleeName;\n }\n const signatureFacts = callSignatureFactsOfNode(context, node);\n if (signatureFacts.expectedArgumentTypeTexts?.length) {\n facts.expectedArgumentTypeTexts = signatureFacts.expectedArgumentTypeTexts;\n }\n if (signatureFacts.explicitTypeArgumentsRequired !== undefined) {\n facts.explicitTypeArgumentsRequired = signatureFacts.explicitTypeArgumentsRequired;\n }\n const typeArgumentFacts = typeArgumentFactsOfCall(context, node, signatureFacts);\n for (const [key, value] of Object.entries(typeArgumentFacts)) {\n facts[key] = value;\n }\n return facts;\n}\n\nfunction symbolFactsOfNode(context: ContextWithParserOptions, node: any): Record<string, unknown> {\n if (node.type !== \"Identifier\" && node.type !== \"MemberExpression\") {\n return {};\n }\n const target = node.type === \"MemberExpression\" ? node.property : node;\n if (target?.type !== \"Identifier\") {\n return {};\n }\n const checker = checkerFor(context);\n const symbol = checker.getSymbolAtLocation(target);\n if (!symbol) {\n return {};\n }\n const deprecatedTag = checker.getJsDocTags(symbol).find((tag) => tag.name === \"deprecated\");\n if (!deprecatedTag) {\n return {};\n }\n const reason = deprecatedTag.text?.trim();\n return reason ? { deprecated: true, deprecationReason: reason } : { deprecated: true };\n}\n\nfunction typeParameterFactsOfNode(\n context: ContextWithParserOptions,\n node: any,\n): Record<string, unknown> {\n if (node.type !== \"TSTypeParameterDeclaration\") {\n return {};\n }\n const params = Array.isArray(node.params) ? node.params : [];\n if (params.length !== 1) {\n return {};\n }\n const name = typeParameterName(params[0]);\n if (!name) {\n return {};\n }\n return {\n name,\n ownerText: node.parent\n ? context.sourceCode.getText(node.parent)\n : context.sourceCode.getText(node),\n };\n}\n\nfunction returnTypeFactsOfNode(\n context: ContextWithParserOptions,\n node: any,\n): Record<string, unknown> {\n const returnTypeTexts =\n node.type === \"ReturnStatement\"\n ? returnTypeTextsOfNearestFunction(context, node)\n : isFunctionLike(node) || node.type === \"ArrowFunctionExpression\"\n ? returnTypeTextsOfFunction(context, node)\n : [];\n return returnTypeTexts.length > 0 ? { texts: returnTypeTexts } : {};\n}\n\nfunction ancestorFacts(\n context: ContextWithParserOptions,\n node: any,\n): readonly Record<string, unknown>[] {\n const ancestors = (context.sourceCode as any)?.getAncestors?.(node) ?? [];\n return ancestors\n .filter((ancestor: any) => typeof ancestor?.type === \"string\")\n .map((ancestor: any) => {\n const fact: Record<string, unknown> = { kind: ancestor.type };\n if (isRange(ancestor.range)) {\n fact.start = ancestor.range[0];\n fact.end = ancestor.range[1];\n }\n if (typeof ancestor.async === \"boolean\") {\n fact.async = ancestor.async;\n }\n if (ancestor.type === \"CatchClause\" && ancestor.param?.type === \"Identifier\") {\n fact.catchParamName = ancestor.param.name;\n }\n const className = ancestor.id?.name;\n if (\n (ancestor.type === \"ClassDeclaration\" || ancestor.type === \"ClassExpression\") &&\n typeof className === \"string\" &&\n className.length > 0\n ) {\n fact.className = className;\n }\n if (isFunctionLike(ancestor)) {\n const paramNames = Array.isArray(ancestor.params)\n ? ancestor.params\n .map(identifierName)\n .filter((name: string | undefined): name is string => name !== undefined)\n : [];\n if (paramNames.length > 0) {\n fact.paramNames = paramNames;\n }\n if (ancestor.parent?.type) {\n fact.parentKind = ancestor.parent.type;\n }\n const parentCalleeName = identifierName(stripChainExpression(ancestor.parent?.callee));\n if (parentCalleeName) {\n fact.parentCalleeName = parentCalleeName;\n }\n const parentCallee = stripChainExpression(ancestor.parent?.callee);\n if (\n parentCallee?.type === \"MemberExpression\" &&\n parentCallee.property?.type === \"Identifier\"\n ) {\n fact.parentCalleePropertyName = parentCallee.property.name;\n }\n const parentArguments = ancestor.parent?.arguments;\n if (Array.isArray(parentArguments)) {\n const index = parentArguments.indexOf(ancestor);\n if (index >= 0) {\n fact.parentArgumentIndex = index;\n if (\n parentArguments\n .slice(0, index)\n .some((argument: any) => argument?.type === \"SpreadElement\")\n ) {\n fact.parentLeadingSpreadArgument = true;\n }\n }\n }\n if (ancestor.parent?.parent?.type) {\n fact.parentParentKind = ancestor.parent.parent.type;\n }\n const parentParentCalleeName = identifierName(\n stripChainExpression(ancestor.parent?.parent?.callee),\n );\n if (parentParentCalleeName) {\n fact.parentParentCalleeName = parentParentCalleeName;\n }\n }\n return fact;\n });\n}\n\nfunction callSignatureFactsOfNode(\n context: ContextWithParserOptions,\n node: any,\n): CorsaCallSignatureFacts {\n const callee = stripChainExpression(node.callee);\n if (!callee) {\n return {};\n }\n const calleeType = typeAtNode(context, callee);\n if (!calleeType) {\n return {};\n }\n const args = Array.isArray(node.arguments) ? node.arguments : [];\n const explicitTypeArguments = typeArgumentNodes(node)\n .map((typeArgument) => context.sourceCode.getText(typeArgument))\n .filter((text: string): text is string => text.length > 0);\n return checkerFor(context).getCallSignatureFacts(\n calleeType,\n node.type === \"NewExpression\" ? 1 : 0,\n args.map((arg: unknown) => typeTextsAtNode(context, arg as never)),\n explicitTypeArguments,\n );\n}\n\nfunction typeArgumentNodes(node: any): readonly any[] {\n const candidates = [\n node.typeArguments?.params,\n node.typeParameters?.params,\n node.typeParameterInstantiation?.params,\n ];\n return candidates.find(Array.isArray) ?? [];\n}\n\n/**\n * Returns the defaults declared on the type parameters of the callee, when the\n * callee is declared in the file being linted.\n *\n * Each entry is the rendered default text, or an empty string for a type\n * parameter without one, so the result aligns with the type parameter list.\n * Returns `undefined` when the declaration is not visible here, which keeps a\n * caller from mistaking \"no defaults\" for \"not found\".\n */\nfunction declaredTypeParameterDefaults(\n context: ContextWithParserOptions,\n node: any,\n): readonly string[] | undefined {\n const name = identifierName(stripChainExpression(node.callee));\n if (!name) {\n return undefined;\n }\n const declaration = findTypeParameterOwner((context.sourceCode as any)?.ast, name);\n const params = declaration?.typeParameters?.params;\n if (!Array.isArray(params)) {\n return undefined;\n }\n return params.map((param: any) =>\n param?.default ? context.sourceCode.getText(param.default).trim() : \"\",\n );\n}\n\n/**\n * Finds the declaration of `name` that carries a type parameter list.\n *\n * Walks the whole tree rather than a scope chain because the oxlint context\n * does not expose scope analysis.\n */\nfunction findTypeParameterOwner(root: any, name: string): any {\n if (!root || typeof root !== \"object\") {\n return undefined;\n }\n const stack: any[] = [root];\n while (stack.length > 0) {\n const current = stack.pop();\n if (!current || typeof current !== \"object\") {\n continue;\n }\n if (Array.isArray(current)) {\n stack.push(...current);\n continue;\n }\n if (current.id?.name === name && current.typeParameters?.params) {\n return current;\n }\n for (const key of Object.keys(current)) {\n if (key === \"parent\") {\n continue;\n }\n const value = current[key];\n if (value && typeof value === \"object\") {\n stack.push(value);\n }\n }\n }\n return undefined;\n}\n\nfunction typeArgumentFactsOfCall(\n context: ContextWithParserOptions,\n node: any,\n signatureFacts: CorsaCallSignatureFacts,\n): Record<string, unknown> {\n const typeArguments = typeArgumentNodes(node);\n if (typeArguments.length === 0) {\n return {};\n }\n const facts: Record<string, unknown> = {\n typeArgumentRanges: typeArguments\n .map((typeArgument) => rangeObject(typeArgument.range))\n .filter((range): range is { start: number; end: number } => range !== undefined),\n };\n const listRange = typeArgumentListRange(node, typeArguments);\n if (listRange) {\n facts.typeArgumentListRange = listRange;\n }\n const declaredDefaults = declaredTypeParameterDefaults(context, node);\n const parameterCount =\n signatureFacts.signature?.typeParameters?.length ??\n declaredDefaults?.length ??\n signatureFacts.signature?.typeParameterDefaultTexts?.length ??\n 0;\n if (parameterCount > 0) {\n facts.typeParameterCount = parameterCount;\n }\n // Upstream exposes no endpoint for a type parameter's default, and a stable\n // TypeScript 7 declaration handle carries no source range to read it from.\n // The declaration is in the AST being linted whenever it is in this file, so\n // read it from there and only fall back to the signature's rendered texts.\n const defaultTexts =\n declaredDefaults ?? signatureFacts.signature?.typeParameterDefaultTexts ?? [];\n const lastIndex = typeArguments.length - 1;\n const lastArgumentText = context.sourceCode.getText(typeArguments[lastIndex])?.trim();\n if (lastArgumentText === \"any\") {\n facts.lastTypeArgumentIsAny = true;\n }\n const lastDefaultText = defaultTexts[lastIndex];\n if (lastDefaultText?.trim() === \"any\") {\n facts.lastTypeParameterDefaultIsAny = true;\n }\n if (lastDefaultText !== undefined) {\n const hasDefault = lastDefaultText.trim().length > 0;\n facts.lastTypeParameterHasDefault = hasDefault;\n if (hasDefault) {\n const identical =\n declaredDefaults !== undefined\n ? typeNodesResolveToSameType(\n context,\n typeArguments[lastIndex],\n declaredDefaultNode(context, node, lastIndex),\n )\n : signatureFacts.explicitTypeArgumentsRequired === false;\n if (identical) {\n facts.lastTypeArgumentEqualsDefault = true;\n facts.lastTypeArgumentSameTypeFlagsAsDefault = true;\n facts.lastTypeArgumentIdenticalToDefault = true;\n }\n }\n }\n return facts;\n}\n\n/**\n * Returns the AST node of the default declared on the callee's type parameter\n * at `index`, when the callee is declared in the file being linted.\n */\nfunction declaredDefaultNode(context: ContextWithParserOptions, node: any, index: number): any {\n const name = identifierName(stripChainExpression(node.callee));\n if (!name) {\n return undefined;\n }\n const declaration = findTypeParameterOwner((context.sourceCode as any)?.ast, name);\n return declaration?.typeParameters?.params?.[index]?.default;\n}\n\n/**\n * Reports whether two type nodes denote the same checker type.\n *\n * Comparing the checker's own type identity keeps this from depending on how\n * either type happens to be spelled.\n */\nfunction typeNodesResolveToSameType(\n context: ContextWithParserOptions,\n left: any,\n right: any,\n): boolean {\n if (!left || !right) {\n return false;\n }\n const checker = checkerFor(context);\n const leftType = checker.getTypeAtLocation(left);\n const rightType = checker.getTypeAtLocation(right);\n return leftType !== undefined && rightType !== undefined && leftType.id === rightType.id;\n}\n\nfunction typeArgumentListRange(\n node: any,\n typeArguments: readonly any[],\n): { start: number; end: number } | undefined {\n const candidates = [node.typeArguments, node.typeParameters, node.typeParameterInstantiation];\n const list = candidates.find((candidate) => Array.isArray(candidate?.params));\n const fromList = rangeObject(list?.range);\n if (fromList) {\n return fromList;\n }\n const first = rangeObject(typeArguments[0]?.range);\n const last = rangeObject(typeArguments[typeArguments.length - 1]?.range);\n if (!first || !last || first.start <= 0) {\n return undefined;\n }\n return { start: first.start - 1, end: last.end + 1 };\n}\n\nfunction rangeObject(range: unknown): { start: number; end: number } | undefined {\n return isRange(range) ? { start: range[0], end: range[1] } : undefined;\n}\n\nfunction typeParameterName(node: any): string | undefined {\n if (typeof node?.name === \"string\") {\n return node.name;\n }\n if (typeof node?.name?.name === \"string\") {\n return node.name.name;\n }\n return undefined;\n}\n\nfunction nearestFunctionAncestor(context: ContextWithParserOptions, node: any): any {\n const ancestors = (context.sourceCode as any)?.getAncestors?.(node) ?? [];\n return [...ancestors].reverse().find((ancestor: any) => ancestor.type?.includes(\"Function\"));\n}\n\nfunction isFunctionLike(node: any): boolean {\n return typeof node?.type === \"string\" && node.type.includes(\"Function\");\n}\n\nfunction returnTypeTextsOfNearestFunction(\n context: ContextWithParserOptions,\n node: any,\n): readonly string[] {\n const owner = nearestFunctionAncestor(context, node);\n return owner ? returnTypeTextsOfFunction(context, owner) : [];\n}\n\nfunction returnTypeTextsOfFunction(\n context: ContextWithParserOptions,\n node: any,\n): readonly string[] {\n const explicitAnnotation = node.returnType?.typeAnnotation ?? node.returnType;\n if (explicitAnnotation) {\n const text = context.sourceCode.getText(explicitAnnotation);\n if (text) {\n return [text];\n }\n }\n\n const checker = checkerFor(context);\n const type = typeAtNode(context, node);\n if (!type) {\n return [];\n }\n\n const texts = new Set<string>();\n for (const signature of checker.getSignaturesOfType(type, 0)) {\n const returnType = checker.getReturnTypeOfSignature(signature);\n if (!returnType) {\n continue;\n }\n for (const text of [...(returnType.texts ?? []), checker.typeToString(returnType)]) {\n if (text) {\n texts.add(text);\n }\n }\n }\n\n const resolved = [...texts];\n return resolved.every(isPermissiveTypeText) ? [] : resolved;\n}\n\nfunction isPermissiveTypeText(text: string): boolean {\n return text === \"any\" || text === \"unknown\" || text === \"never\";\n}\n\nfunction stripChainExpression(node: any): any {\n let current = node;\n while (current?.type === \"ChainExpression\") {\n current = current.expression;\n }\n return current;\n}\n\nfunction identifierName(node: any): string | undefined {\n const current = stripChainExpression(node);\n return current?.type === \"Identifier\" && typeof current.name === \"string\"\n ? current.name\n : undefined;\n}\n\nfunction isNativeChildNode(value: unknown): value is RangedNode {\n return (\n typeof value === \"object\" &&\n value !== null &&\n typeof (value as { type?: unknown }).type === \"string\" &&\n isRange((value as { range?: unknown }).range)\n );\n}\n\nfunction isRange(value: unknown): value is readonly [number, number] {\n return (\n Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === \"number\" &&\n typeof value[1] === \"number\"\n );\n}\n\nfunction isJsonPrimitive(value: unknown): value is string | number | boolean | null {\n return value === null || [\"boolean\", \"number\", \"string\"].includes(typeof value);\n}\n\nfunction isJsonValue(value: unknown): boolean {\n if (isJsonPrimitive(value)) {\n return true;\n }\n if (Array.isArray(value)) {\n return value.every(isJsonValue);\n }\n return typeof value === \"object\" && value !== null && Object.values(value).every(isJsonValue);\n}\n\nfunction isPrimitiveRecord(\n value: unknown,\n): value is Record<string, string | number | boolean | null> {\n return (\n typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value) &&\n Object.values(value).every(isJsonPrimitive)\n );\n}\n\nfunction isSkippedField(key: string): boolean {\n return key === \"type\" || key === \"range\" || key === \"loc\" || key === \"parent\";\n}\n"],"mappings":";;;;;AA6BA,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB,IAAI,IAAI,oBAAoB,CAAC,CAAC,KAAK,SAAS,CAAC,KAAK,MAAM,IAAI,CAAC,CAAC;AAE5F,SAAgB,qBACd,UACA,gBAAyC,CAAC,GAC1C,gBAAyC,CAAC,GAC1C;CACA,MAAM,OAAO,eAAe,QAAQ;CACpC,OAAO,iBACL,UACA;EACE,MAAM,EACJ,aAAa,KAAK,gBACpB;EACA,gBAAgB,KAAK;EACrB,UAAU,KAAK;EACf,GAAG;CACL,IACC,YACC,OAAO,YACL,KAAK,UAAU,KAAK,aAAa,CAC/B,WACC,SAAqB;EACpB,IAAI,cAAc,YAAY,MAAM,OAAO,MAAM,OAC/C;EAEF,MAAM,mBAAmB,uBAAuB,eAAe,IAAI;EACnE,MAAM,cAAc,kBAAkB,eAAe,IAAI;EACzD,wBACE,SACA,MACA,kBACE,UACA,aACE,SACA,MACA,kBACA,eAAe,eAAe,IAAI,GAClC,MACA,2BAA2B,eAAe,IAAI,GAC9C,aACA,KAAK,OAAO,gBAAgB,MAC5B,GACA,QACF,CACF,CACF;CACF,CACF,CAAC,CACH,CACJ;AACF;AAEA,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MAAM,WAAW;CAEhC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,OAAO,OAAO,KAAK,CAAC,CAAC,MAAM,WAAW;AAC9F;AAEA,SAAS,kBACP,OAC2D;CAC3D,OACE,OAAO,UAAU,YACjB,UAAU,QACV,CAAC,MAAM,QAAQ,KAAK,KACpB,OAAO,OAAO,KAAK,CAAC,CAAC,MAAM,eAAe;AAE9C;AAEA,SAAS,eAAe,KAAsB;CAC5C,OAAO,QAAQ,UAAU,QAAQ,WAAW,QAAQ,SAAS,QAAQ;AACvE"}
1
+ {"version":3,"file":"native_bridge.js","names":[],"sources":["../../ts/rules/native_bridge.ts"],"sourcesContent":["import { nativeLintRuleMetas, runNativeLintRule } from \"@corsa-bind/napi\";\nimport type {\n NativeLintDiagnostic,\n NativeLintNode,\n NativeLintRange,\n NativeLintRuleMeta,\n NativeNodeMetadataDepth,\n} from \"@corsa-bind/napi\";\n\nimport { attachConfigFacts, ruleFactProviders } from \"./fact_providers\";\nimport { createNativeRule } from \"./rule_creator\";\nimport { checkerFor, propertyNamesOfNode, typeAtNode, typeTextsAtNode } from \"./type_utils\";\nimport type { ContextWithParserOptions, CorsaCallSignatureFacts } from \"../types\";\n\ntype RangedNode = {\n readonly type: string;\n readonly range: readonly [number, number];\n};\n\ntype NativeRuleBridgeOptions = {\n readonly shouldRun?: (node: RangedNode, context: ContextWithParserOptions) => boolean;\n readonly includeTypeTexts?: NodeMetadataOption;\n readonly includePropertyNames?: NodeMetadataOption;\n readonly includeText?: NodeMetadataOption;\n readonly maxDepth?: number;\n};\n\ntype NodeMetadataOption = boolean | ((node: RangedNode, depth: number) => boolean);\n\nconst MAX_NATIVE_NODE_DEPTH = 4;\nconst nativeRuleMetasByName = new Map(nativeLintRuleMetas().map((meta) => [meta.name, meta]));\n\nexport function createRustNativeRule(\n ruleName: string,\n metaOverrides: Record<string, unknown> = {},\n bridgeOptions: NativeRuleBridgeOptions = {},\n) {\n const meta = nativeRuleMeta(ruleName);\n return createNativeRule(\n ruleName,\n {\n docs: {\n description: meta.docsDescription,\n },\n hasSuggestions: meta.hasSuggestions,\n messages: meta.messages,\n ...metaOverrides,\n },\n (context) =>\n Object.fromEntries(\n meta.listeners.map((listener) => [\n listener,\n (node: RangedNode) => {\n if (bridgeOptions.shouldRun?.(node, context) === false) {\n return;\n }\n const includeTypeTexts = includeTypeTextsOption(bridgeOptions, meta);\n const includeText = includeTextOption(bridgeOptions, meta);\n reportNativeDiagnostics(\n context,\n node,\n runNativeLintRule(\n ruleName,\n toNativeNode(\n context,\n node,\n includeTypeTexts,\n maxDepthOption(bridgeOptions, meta),\n true,\n includePropertyNamesOption(bridgeOptions, meta),\n includeText,\n meta.bridge.symbolFacts === true,\n 0,\n ruleName,\n ),\n ),\n );\n },\n ]),\n ),\n );\n}\n\nexport function toNativeNode(\n context: ContextWithParserOptions,\n node: RangedNode,\n includeTypeTexts: NodeMetadataOption = true,\n maxDepth = MAX_NATIVE_NODE_DEPTH,\n includeRuleOptions = true,\n includePropertyNames: NodeMetadataOption = includeTypeTexts,\n includeText: NodeMetadataOption = false,\n includeSymbolFacts = false,\n depth = 0,\n ruleName?: string,\n): NativeLintNode {\n const fields: Record<string, unknown> = {};\n const children: Record<string, NativeLintNode> = {};\n const childLists: Record<string, NativeLintNode[]> = {};\n\n const typeAnnotationText = sourceTypeAnnotationText(context, node);\n if (typeAnnotationText) {\n fields.__typeAnnotationText = typeAnnotationText;\n }\n\n const options = (context as { options?: unknown }).options;\n if (includeRuleOptions && Array.isArray(options) && options.length > 0 && isJsonValue(options)) {\n fields.__ruleOptions = options;\n }\n if (includeRuleOptions) {\n // Host facts run BEFORE child serialization: fact providers may annotate\n // descendant AST nodes, and those annotations must be visible when the\n // subtree is serialized below.\n addHostInputs(context, node, fields, includeSymbolFacts, ruleName);\n }\n\n for (const [key, value] of Object.entries(node)) {\n if (isSkippedField(key) || key in fields) {\n continue;\n }\n if (isNativeChildNode(value)) {\n if (maxDepth > 0) {\n children[key] = toNativeNode(\n context,\n value,\n includeTypeTexts,\n maxDepth - 1,\n false,\n includePropertyNames,\n includeText,\n includeSymbolFacts,\n depth + 1,\n );\n }\n continue;\n }\n if (Array.isArray(value)) {\n if (key.startsWith(\"__\") && isJsonValue(value)) {\n // Rule-specific facts may be nested JSON (e.g. per-slot text lists).\n fields[key] = value;\n continue;\n }\n if (maxDepth > 0 && value.every(isNativeChildNode)) {\n childLists[key] = value.map((child) =>\n toNativeNode(\n context,\n child,\n includeTypeTexts,\n maxDepth - 1,\n false,\n includePropertyNames,\n includeText,\n includeSymbolFacts,\n depth + 1,\n ),\n );\n } else if (value.every(isJsonPrimitive)) {\n fields[key] = value;\n }\n continue;\n }\n if (isPrimitiveRecord(value)) {\n fields[key] = value;\n continue;\n }\n if (isJsonPrimitive(value)) {\n fields[key] = value;\n }\n }\n\n const nativeNode: NativeLintNode = {\n kind: node.type,\n range: nativeRange(node.range),\n };\n if (includeMetadataForNode(includeText, node, depth)) {\n nativeNode.text = context.sourceCode.getText(node as never);\n }\n if (includeMetadataForNode(includeTypeTexts, node, depth)) {\n nativeNode.typeTexts = typeTextsAtNode(context, node);\n }\n if (includeMetadataForNode(includePropertyNames, node, depth)) {\n nativeNode.propertyNames = propertyNamesOfNode(context, node);\n }\n if (Object.keys(fields).length > 0) {\n nativeNode.fields = fields;\n }\n if (Object.keys(children).length > 0) {\n nativeNode.children = children;\n }\n if (Object.keys(childLists).length > 0) {\n nativeNode.childLists = childLists;\n }\n return nativeNode;\n}\n\nexport function reportNativeDiagnostics(\n context: ContextWithParserOptions,\n node: RangedNode,\n diagnostics: readonly NativeLintDiagnostic[],\n): void {\n for (const diagnostic of diagnostics) {\n context.report({\n node: reportNodeForRange(node, diagnostic.range),\n messageId: diagnostic.messageId,\n ...(diagnostic.data ? { data: diagnostic.data } : {}),\n ...(diagnostic.suggestions?.length\n ? {\n suggest: diagnostic.suggestions.map((suggestion) => ({\n messageId: suggestion.messageId,\n // Suggestion templates share the report's placeholders\n // (for example dot-notation's `{{key}}`).\n ...(diagnostic.data ? { data: diagnostic.data } : {}),\n fix: (fixer: any) =>\n suggestion.fixes.map((fix) =>\n fixer.replaceTextRange(oxlintRange(fix.range), fix.replacementText),\n ),\n })),\n }\n : {}),\n } as never);\n }\n}\n\nfunction reportNodeForRange(root: RangedNode, range: NativeLintRange): RangedNode {\n return findNodeByRange(root, range) ?? root;\n}\n\nfunction findNodeByRange(\n value: unknown,\n range: NativeLintRange,\n seen = new Set<object>(),\n): RangedNode | undefined {\n if (typeof value !== \"object\" || value === null || seen.has(value)) {\n return undefined;\n }\n seen.add(value);\n\n if (isNativeChildNode(value) && sameRange(value.range, range)) {\n return value;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n const match = findNodeByRange(item, range, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n for (const [key, child] of Object.entries(value)) {\n if (isSkippedField(key)) {\n continue;\n }\n const match = findNodeByRange(child, range, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n}\n\nfunction nativeRuleMeta(ruleName: string): NativeLintRuleMeta {\n const meta = nativeRuleMetasByName.get(ruleName);\n if (!meta) {\n throw new Error(`corsa oxlint native Rust rule is not registered: ${ruleName}`);\n }\n return meta;\n}\n\nfunction includeTypeTextsOption(\n options: NativeRuleBridgeOptions,\n meta: NativeLintRuleMeta,\n): NodeMetadataOption {\n return options.includeTypeTexts ?? nodeMetadataDepthOption(meta.bridge.typeTexts, false);\n}\n\nfunction includePropertyNamesOption(\n options: NativeRuleBridgeOptions,\n meta: NativeLintRuleMeta,\n): NodeMetadataOption {\n return options.includePropertyNames ?? nodeMetadataDepthOption(meta.bridge.propertyNames, false);\n}\n\nfunction includeTextOption(\n options: NativeRuleBridgeOptions,\n meta: NativeLintRuleMeta,\n): NodeMetadataOption {\n return options.includeText ?? nodeMetadataDepthOption(meta.bridge.text, false);\n}\n\nfunction maxDepthOption(options: NativeRuleBridgeOptions, meta: NativeLintRuleMeta): number {\n return options.maxDepth ?? meta.bridge.maxDepth ?? MAX_NATIVE_NODE_DEPTH;\n}\n\nfunction nodeMetadataDepthOption(\n metadata: NativeNodeMetadataDepth | undefined,\n fallback: NodeMetadataOption,\n): NodeMetadataOption {\n if (!metadata) {\n return fallback;\n }\n return (_node, depth) => depth >= metadata.minDepth && depth <= metadata.maxDepth;\n}\n\nfunction includeMetadataForNode(\n option: NodeMetadataOption,\n node: RangedNode,\n depth: number,\n): boolean {\n return typeof option === \"function\" ? option(node, depth) : option;\n}\n\nfunction sourceTypeAnnotationText(\n context: ContextWithParserOptions,\n node: RangedNode,\n): string | undefined {\n const annotation = (node as any).typeAnnotation?.typeAnnotation ?? (node as any).typeAnnotation;\n if (!annotation) {\n return undefined;\n }\n const text = (context as any).sourceCode?.getText(annotation);\n return typeof text === \"string\" && text.length > 0 ? text : undefined;\n}\n\nfunction nativeRange(range: readonly [number, number]): NativeLintRange {\n return { start: range[0], end: range[1] };\n}\n\nfunction oxlintRange(range: NativeLintRange): [number, number] {\n return [range.start, range.end];\n}\n\nfunction sameRange(range: readonly [number, number], expected: NativeLintRange): boolean {\n return range[0] === expected.start && range[1] === expected.end;\n}\n\nfunction addHostInputs(\n context: ContextWithParserOptions,\n node: RangedNode,\n fields: Record<string, unknown>,\n includeSymbolFacts: boolean,\n ruleName?: string,\n): void {\n const current = node as any;\n const ancestors = ancestorFacts(context, current);\n if (ancestors.length > 0) {\n fields.__ancestorFacts = ancestors;\n }\n if (current.type === \"CallExpression\" || current.type === \"NewExpression\") {\n const callFacts = callFactsOfNode(context, current);\n if (Object.keys(callFacts).length > 0) {\n fields.__callFacts = callFacts;\n }\n }\n if (current.parent?.type) {\n fields.__parentKind = current.parent.type;\n }\n if (includeSymbolFacts) {\n const symbolFacts = symbolFactsOfNode(context, current);\n if (Object.keys(symbolFacts).length > 0) {\n fields.__symbolFacts = symbolFacts;\n }\n }\n const typeParameterFacts = typeParameterFactsOfNode(context, current);\n if (Object.keys(typeParameterFacts).length > 0) {\n fields.__typeParameterFacts = typeParameterFacts;\n }\n const returnTypeFacts = returnTypeFactsOfNode(context, current);\n if (Object.keys(returnTypeFacts).length > 0) {\n fields.__returnTypeFacts = returnTypeFacts;\n }\n if (ruleName) {\n const sink = { fields };\n attachConfigFacts(ruleName, context, sink);\n for (const provider of ruleFactProviders[ruleName] ?? []) {\n provider(context, current, sink);\n }\n }\n}\n\nfunction callFactsOfNode(context: ContextWithParserOptions, node: any): Record<string, unknown> {\n const facts: Record<string, unknown> = {};\n const calleeName = identifierName(stripChainExpression(node.callee));\n if (calleeName) {\n facts.calleeName = calleeName;\n }\n const signatureFacts = callSignatureFactsOfNode(context, node);\n if (signatureFacts.expectedArgumentTypeTexts?.length) {\n facts.expectedArgumentTypeTexts = signatureFacts.expectedArgumentTypeTexts;\n }\n if (signatureFacts.explicitTypeArgumentsRequired !== undefined) {\n facts.explicitTypeArgumentsRequired = signatureFacts.explicitTypeArgumentsRequired;\n }\n const typeArgumentFacts = typeArgumentFactsOfCall(context, node, signatureFacts);\n for (const [key, value] of Object.entries(typeArgumentFacts)) {\n facts[key] = value;\n }\n return facts;\n}\n\nfunction symbolFactsOfNode(context: ContextWithParserOptions, node: any): Record<string, unknown> {\n if (node.type !== \"Identifier\" && node.type !== \"MemberExpression\") {\n return {};\n }\n const target = node.type === \"MemberExpression\" ? node.property : node;\n if (target?.type !== \"Identifier\") {\n return {};\n }\n const checker = checkerFor(context);\n const symbol = checker.getSymbolAtLocation(target);\n if (!symbol) {\n return {};\n }\n const deprecatedTag = checker.getJsDocTags(symbol).find((tag) => tag.name === \"deprecated\");\n if (!deprecatedTag) {\n return {};\n }\n const reason = deprecatedTag.text?.trim();\n return reason ? { deprecated: true, deprecationReason: reason } : { deprecated: true };\n}\n\nfunction typeParameterFactsOfNode(\n context: ContextWithParserOptions,\n node: any,\n): Record<string, unknown> {\n if (node.type !== \"TSTypeParameterDeclaration\") {\n return {};\n }\n const params = Array.isArray(node.params) ? node.params : [];\n if (params.length !== 1) {\n return {};\n }\n const name = typeParameterName(params[0]);\n if (!name) {\n return {};\n }\n return {\n name,\n ownerText: node.parent\n ? context.sourceCode.getText(node.parent)\n : context.sourceCode.getText(node),\n };\n}\n\nfunction returnTypeFactsOfNode(\n context: ContextWithParserOptions,\n node: any,\n): Record<string, unknown> {\n const returnTypeTexts =\n node.type === \"ReturnStatement\"\n ? returnTypeTextsOfNearestFunction(context, node)\n : isFunctionLike(node) || node.type === \"ArrowFunctionExpression\"\n ? returnTypeTextsOfFunction(context, node)\n : [];\n return returnTypeTexts.length > 0 ? { texts: returnTypeTexts } : {};\n}\n\nfunction ancestorFacts(\n context: ContextWithParserOptions,\n node: any,\n): readonly Record<string, unknown>[] {\n const ancestors = (context.sourceCode as any)?.getAncestors?.(node) ?? [];\n return ancestors\n .filter((ancestor: any) => typeof ancestor?.type === \"string\")\n .map((ancestor: any) => {\n const fact: Record<string, unknown> = { kind: ancestor.type };\n if (isRange(ancestor.range)) {\n fact.start = ancestor.range[0];\n fact.end = ancestor.range[1];\n }\n if (typeof ancestor.async === \"boolean\") {\n fact.async = ancestor.async;\n }\n if (ancestor.type === \"CatchClause\" && ancestor.param?.type === \"Identifier\") {\n fact.catchParamName = ancestor.param.name;\n }\n const className = ancestor.id?.name;\n if (\n (ancestor.type === \"ClassDeclaration\" || ancestor.type === \"ClassExpression\") &&\n typeof className === \"string\" &&\n className.length > 0\n ) {\n fact.className = className;\n }\n if (isFunctionLike(ancestor)) {\n const paramNames = Array.isArray(ancestor.params)\n ? ancestor.params\n .map(identifierName)\n .filter((name: string | undefined): name is string => name !== undefined)\n : [];\n if (paramNames.length > 0) {\n fact.paramNames = paramNames;\n }\n if (ancestor.parent?.type) {\n fact.parentKind = ancestor.parent.type;\n }\n const parentCalleeName = identifierName(stripChainExpression(ancestor.parent?.callee));\n if (parentCalleeName) {\n fact.parentCalleeName = parentCalleeName;\n }\n const parentCallee = stripChainExpression(ancestor.parent?.callee);\n if (\n parentCallee?.type === \"MemberExpression\" &&\n parentCallee.property?.type === \"Identifier\"\n ) {\n fact.parentCalleePropertyName = parentCallee.property.name;\n }\n const parentArguments = ancestor.parent?.arguments;\n if (Array.isArray(parentArguments)) {\n const index = parentArguments.indexOf(ancestor);\n if (index >= 0) {\n fact.parentArgumentIndex = index;\n if (\n parentArguments\n .slice(0, index)\n .some((argument: any) => argument?.type === \"SpreadElement\")\n ) {\n fact.parentLeadingSpreadArgument = true;\n }\n }\n }\n if (ancestor.parent?.parent?.type) {\n fact.parentParentKind = ancestor.parent.parent.type;\n }\n const parentParentCalleeName = identifierName(\n stripChainExpression(ancestor.parent?.parent?.callee),\n );\n if (parentParentCalleeName) {\n fact.parentParentCalleeName = parentParentCalleeName;\n }\n }\n return fact;\n });\n}\n\nfunction callSignatureFactsOfNode(\n context: ContextWithParserOptions,\n node: any,\n): CorsaCallSignatureFacts {\n const callee = stripChainExpression(node.callee);\n if (!callee) {\n return {};\n }\n const calleeType = typeAtNode(context, callee);\n if (!calleeType) {\n return {};\n }\n const args = Array.isArray(node.arguments) ? node.arguments : [];\n const explicitTypeArguments = typeArgumentNodes(node)\n .map((typeArgument) => context.sourceCode.getText(typeArgument))\n .filter((text: string): text is string => text.length > 0);\n return checkerFor(context).getCallSignatureFacts(\n calleeType,\n node.type === \"NewExpression\" ? 1 : 0,\n args.map((arg: unknown) => typeTextsAtNode(context, arg as never)),\n explicitTypeArguments,\n );\n}\n\nfunction typeArgumentNodes(node: any): readonly any[] {\n const candidates = [\n node.typeArguments?.params,\n node.typeParameters?.params,\n node.typeParameterInstantiation?.params,\n ];\n return candidates.find(Array.isArray) ?? [];\n}\n\n/**\n * Returns the defaults declared on the type parameters of the callee, when the\n * callee is declared in the file being linted.\n *\n * Each entry is the rendered default text, or an empty string for a type\n * parameter without one, so the result aligns with the type parameter list.\n * Returns `undefined` when the declaration is not visible here, which keeps a\n * caller from mistaking \"no defaults\" for \"not found\".\n */\nfunction declaredTypeParameterDefaults(\n context: ContextWithParserOptions,\n node: any,\n): readonly string[] | undefined {\n const name = identifierName(stripChainExpression(node.callee));\n if (!name) {\n return undefined;\n }\n const declaration = findTypeParameterOwner((context.sourceCode as any)?.ast, name);\n const params = declaration?.typeParameters?.params;\n if (!Array.isArray(params)) {\n return undefined;\n }\n return params.map((param: any) =>\n param?.default ? context.sourceCode.getText(param.default).trim() : \"\",\n );\n}\n\n/**\n * Finds the declaration of `name` that carries a type parameter list.\n *\n * Walks the whole tree rather than a scope chain because the oxlint context\n * does not expose scope analysis.\n */\nfunction findTypeParameterOwner(root: any, name: string): any {\n if (!root || typeof root !== \"object\") {\n return undefined;\n }\n const stack: any[] = [root];\n while (stack.length > 0) {\n const current = stack.pop();\n if (!current || typeof current !== \"object\") {\n continue;\n }\n if (Array.isArray(current)) {\n stack.push(...current);\n continue;\n }\n if (current.id?.name === name && current.typeParameters?.params) {\n return current;\n }\n for (const key of Object.keys(current)) {\n if (key === \"parent\") {\n continue;\n }\n const value = current[key];\n if (value && typeof value === \"object\") {\n stack.push(value);\n }\n }\n }\n return undefined;\n}\n\nfunction typeArgumentFactsOfCall(\n context: ContextWithParserOptions,\n node: any,\n signatureFacts: CorsaCallSignatureFacts,\n): Record<string, unknown> {\n const typeArguments = typeArgumentNodes(node);\n if (typeArguments.length === 0) {\n return {};\n }\n const facts: Record<string, unknown> = {\n typeArgumentRanges: typeArguments\n .map((typeArgument) => rangeObject(typeArgument.range))\n .filter((range): range is { start: number; end: number } => range !== undefined),\n };\n const listRange = typeArgumentListRange(node, typeArguments);\n if (listRange) {\n facts.typeArgumentListRange = listRange;\n }\n const declaredDefaults = declaredTypeParameterDefaults(context, node);\n const parameterCount =\n signatureFacts.signature?.typeParameters?.length ??\n declaredDefaults?.length ??\n signatureFacts.signature?.typeParameterDefaultTexts?.length ??\n 0;\n if (parameterCount > 0) {\n facts.typeParameterCount = parameterCount;\n }\n // Upstream exposes no endpoint for a type parameter's default, and a stable\n // TypeScript 7 declaration handle carries no source range to read it from.\n // The declaration is in the AST being linted whenever it is in this file, so\n // read it from there and only fall back to the signature's rendered texts.\n const defaultTexts =\n declaredDefaults ?? signatureFacts.signature?.typeParameterDefaultTexts ?? [];\n const lastIndex = typeArguments.length - 1;\n const lastArgumentText = context.sourceCode.getText(typeArguments[lastIndex])?.trim();\n if (lastArgumentText === \"any\") {\n facts.lastTypeArgumentIsAny = true;\n }\n const lastDefaultText = defaultTexts[lastIndex];\n if (lastDefaultText?.trim() === \"any\") {\n facts.lastTypeParameterDefaultIsAny = true;\n }\n if (lastDefaultText !== undefined) {\n const hasDefault = lastDefaultText.trim().length > 0;\n facts.lastTypeParameterHasDefault = hasDefault;\n if (hasDefault) {\n const identical =\n declaredDefaults !== undefined\n ? typeNodesResolveToSameType(\n context,\n typeArguments[lastIndex],\n declaredDefaultNode(context, node, lastIndex),\n )\n : signatureFacts.explicitTypeArgumentsRequired === false;\n if (identical) {\n facts.lastTypeArgumentEqualsDefault = true;\n facts.lastTypeArgumentSameTypeFlagsAsDefault = true;\n facts.lastTypeArgumentIdenticalToDefault = true;\n }\n }\n }\n return facts;\n}\n\n/**\n * Returns the AST node of the default declared on the callee's type parameter\n * at `index`, when the callee is declared in the file being linted.\n */\nfunction declaredDefaultNode(context: ContextWithParserOptions, node: any, index: number): any {\n const name = identifierName(stripChainExpression(node.callee));\n if (!name) {\n return undefined;\n }\n const declaration = findTypeParameterOwner((context.sourceCode as any)?.ast, name);\n return declaration?.typeParameters?.params?.[index]?.default;\n}\n\n/**\n * Reports whether two type nodes denote the same checker type.\n *\n * Comparing the checker's own type identity keeps this from depending on how\n * either type happens to be spelled.\n */\nfunction typeNodesResolveToSameType(\n context: ContextWithParserOptions,\n left: any,\n right: any,\n): boolean {\n if (!left || !right) {\n return false;\n }\n const checker = checkerFor(context);\n const leftType = checker.getTypeAtLocation(left);\n const rightType = checker.getTypeAtLocation(right);\n return leftType !== undefined && rightType !== undefined && leftType.id === rightType.id;\n}\n\nfunction typeArgumentListRange(\n node: any,\n typeArguments: readonly any[],\n): { start: number; end: number } | undefined {\n const candidates = [node.typeArguments, node.typeParameters, node.typeParameterInstantiation];\n const list = candidates.find((candidate) => Array.isArray(candidate?.params));\n const fromList = rangeObject(list?.range);\n if (fromList) {\n return fromList;\n }\n const first = rangeObject(typeArguments[0]?.range);\n const last = rangeObject(typeArguments[typeArguments.length - 1]?.range);\n if (!first || !last || first.start <= 0) {\n return undefined;\n }\n return { start: first.start - 1, end: last.end + 1 };\n}\n\nfunction rangeObject(range: unknown): { start: number; end: number } | undefined {\n return isRange(range) ? { start: range[0], end: range[1] } : undefined;\n}\n\nfunction typeParameterName(node: any): string | undefined {\n if (typeof node?.name === \"string\") {\n return node.name;\n }\n if (typeof node?.name?.name === \"string\") {\n return node.name.name;\n }\n return undefined;\n}\n\nfunction nearestFunctionAncestor(context: ContextWithParserOptions, node: any): any {\n const ancestors = (context.sourceCode as any)?.getAncestors?.(node) ?? [];\n return [...ancestors].reverse().find((ancestor: any) => ancestor.type?.includes(\"Function\"));\n}\n\nfunction isFunctionLike(node: any): boolean {\n return typeof node?.type === \"string\" && node.type.includes(\"Function\");\n}\n\nfunction returnTypeTextsOfNearestFunction(\n context: ContextWithParserOptions,\n node: any,\n): readonly string[] {\n const owner = nearestFunctionAncestor(context, node);\n return owner ? returnTypeTextsOfFunction(context, owner) : [];\n}\n\nfunction returnTypeTextsOfFunction(\n context: ContextWithParserOptions,\n node: any,\n): readonly string[] {\n const explicitAnnotation = node.returnType?.typeAnnotation ?? node.returnType;\n if (explicitAnnotation) {\n const text = context.sourceCode.getText(explicitAnnotation);\n if (text) {\n return [text];\n }\n }\n\n const checker = checkerFor(context);\n const type = typeAtNode(context, node);\n if (!type) {\n return [];\n }\n\n const texts = new Set<string>();\n for (const signature of checker.getSignaturesOfType(type, 0)) {\n const returnType = checker.getReturnTypeOfSignature(signature);\n if (!returnType) {\n continue;\n }\n for (const text of [...(returnType.texts ?? []), checker.typeToString(returnType)]) {\n if (text) {\n texts.add(text);\n }\n }\n }\n\n const resolved = [...texts];\n return resolved.every(isPermissiveTypeText) ? [] : resolved;\n}\n\nfunction isPermissiveTypeText(text: string): boolean {\n return text === \"any\" || text === \"unknown\" || text === \"never\";\n}\n\nfunction stripChainExpression(node: any): any {\n let current = node;\n while (current?.type === \"ChainExpression\") {\n current = current.expression;\n }\n return current;\n}\n\nfunction identifierName(node: any): string | undefined {\n const current = stripChainExpression(node);\n return current?.type === \"Identifier\" && typeof current.name === \"string\"\n ? current.name\n : undefined;\n}\n\nfunction isNativeChildNode(value: unknown): value is RangedNode {\n return (\n typeof value === \"object\" &&\n value !== null &&\n typeof (value as { type?: unknown }).type === \"string\" &&\n isRange((value as { range?: unknown }).range)\n );\n}\n\nfunction isRange(value: unknown): value is readonly [number, number] {\n return (\n Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === \"number\" &&\n typeof value[1] === \"number\"\n );\n}\n\nfunction isJsonPrimitive(value: unknown): value is string | number | boolean | null {\n return value === null || [\"boolean\", \"number\", \"string\"].includes(typeof value);\n}\n\nfunction isJsonValue(value: unknown): boolean {\n if (isJsonPrimitive(value)) {\n return true;\n }\n if (Array.isArray(value)) {\n return value.every(isJsonValue);\n }\n return typeof value === \"object\" && value !== null && Object.values(value).every(isJsonValue);\n}\n\nfunction isPrimitiveRecord(\n value: unknown,\n): value is Record<string, string | number | boolean | null> {\n return (\n typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value) &&\n Object.values(value).every(isJsonPrimitive)\n );\n}\n\nfunction isSkippedField(key: string): boolean {\n return key === \"type\" || key === \"range\" || key === \"loc\" || key === \"parent\";\n}\n"],"mappings":";;;;;AA6BA,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB,IAAI,IAAI,oBAAoB,CAAC,CAAC,KAAK,SAAS,CAAC,KAAK,MAAM,IAAI,CAAC,CAAC;AAE5F,SAAgB,qBACd,UACA,gBAAyC,CAAC,GAC1C,gBAAyC,CAAC,GAC1C;CACA,MAAM,OAAO,eAAe,QAAQ;CACpC,OAAO,iBACL,UACA;EACE,MAAM,EACJ,aAAa,KAAK,g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AqB,IAAI;CACzC,OAAO,SAAS,SAAS,gBAAgB,OAAO,QAAQ,SAAS,WAC7D,QAAQ,OACR,KAAA;AACN;AAEA,SAAS,kBAAkB,OAAqC;CAC9D,OACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAQ,MAA6B,SAAS,YAC9C,QAAS,MAA8B,KAAK;AAEhD;AAEA,SAAS,QAAQ,OAAoD;CACnE,OACE,MAAM,QAAQ,KAAK,KACnB,MAAM,WAAW,KACjB,OAAO,MAAM,OAAO,YACpB,OAAO,MAAM,OAAO;AAExB;AAEA,SAAS,gBAAgB,OAA2D;CAClF,OAAO,UAAU,QAAQ;EAAC;EAAW;EAAU;CAAQ,CAAC,CAAC,SAAS,OAAO,KAAK;AAChF;AAEA,SAAS,YAAY,OAAyB;CAC5C,IAAI,gBAAgB,KAAK,GACvB,OAAO;CAET,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,MAAM,MAAM,WAAW;CAEhC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,OAAO,OAAO,KAAK,CAAC,CAAC,MAAM,WAAW;AAC9F;AAEA,SAAS,kBACP,OAC2D;CAC3D,OACE,OAAO,UAAU,YACjB,UAAU,QACV,CAAC,MAAM,QAAQ,KAAK,KACpB,OAAO,OAAO,KAAK,CAAC,CAAC,MAAM,eAAe;AAE9C;AAEA,SAAS,eAAe,KAAsB;CAC5C,OAAO,QAAQ,UAAU,QAAQ,WAAW,QAAQ,SAAS,QAAQ;AACvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corsa-oxlint",
3
- "version": "2.0.0-beta.3",
3
+ "version": "2.0.0-beta.5",
4
4
  "description": "Type-aware Oxlint helpers powered by Corsa",
5
5
  "homepage": "https://github.com/ubugeeei-prod/corsa-bind/tree/main/src/bindings/nodejs/corsa_oxlint",
6
6
  "bugs": {
@@ -95,7 +95,7 @@
95
95
  "./package.json": "./package.json"
96
96
  },
97
97
  "dependencies": {
98
- "@corsa-bind/napi": "2.0.0-beta.3"
98
+ "@corsa-bind/napi": "2.0.0-beta.5"
99
99
  },
100
100
  "devDependencies": {
101
101
  "@oxlint/plugins": "1.80.0",