@stripe/extensibility-eslint-plugin 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/configs/async-with-egress.cjs +11 -7
  2. package/dist/configs/async-with-egress.js +11 -7
  3. package/dist/configs/billing.bill.discount_calculation.cjs +11 -7
  4. package/dist/configs/billing.bill.discount_calculation.js +11 -7
  5. package/dist/configs/billing.customer_balance_application.cjs +11 -7
  6. package/dist/configs/billing.customer_balance_application.js +11 -7
  7. package/dist/configs/{billing.invoice_collection_setting.cjs → billing.invoice_collection_options.cjs} +19 -15
  8. package/dist/configs/{billing.invoice_collection_setting.d.ts → billing.invoice_collection_options.d.ts} +2 -2
  9. package/dist/configs/billing.invoice_collection_options.d.ts.map +1 -0
  10. package/dist/configs/{billing.invoice_collection_setting.js → billing.invoice_collection_options.js} +15 -11
  11. package/dist/configs/billing.prorations.cjs +11 -7
  12. package/dist/configs/billing.prorations.js +11 -7
  13. package/dist/configs/billing.recurring_billing_item_handling.cjs +11 -7
  14. package/dist/configs/billing.recurring_billing_item_handling.js +11 -7
  15. package/dist/configs/core.workflows.custom_action.cjs +11 -7
  16. package/dist/configs/core.workflows.custom_action.js +11 -7
  17. package/dist/configs/custom-objects.cjs +11 -7
  18. package/dist/configs/custom-objects.js +11 -7
  19. package/dist/configs/extend.objects.custom_objects.cjs +11 -7
  20. package/dist/configs/extend.objects.custom_objects.js +11 -7
  21. package/dist/configs/extend.workflows.custom_action.cjs +11 -7
  22. package/dist/configs/extend.workflows.custom_action.js +11 -7
  23. package/dist/configs/runtime-core.cjs +11 -7
  24. package/dist/configs/runtime-core.js +11 -7
  25. package/dist/configs/sync-no-egress.cjs +11 -7
  26. package/dist/configs/sync-no-egress.js +11 -7
  27. package/dist/index.cjs +12 -8
  28. package/dist/index.js +12 -8
  29. package/dist/internal/analysis/eslint/module-scope.d.ts +1 -1
  30. package/dist/internal/analysis/eslint/module-scope.d.ts.map +1 -1
  31. package/dist/security-rules/valid-extension-interface.d.ts.map +1 -1
  32. package/dist/tsconfig.build.tsbuildinfo +1 -1
  33. package/package.json +7 -7
  34. package/dist/configs/billing.invoice_collection_setting.d.ts.map +0 -1
@@ -8064,9 +8064,9 @@ var rule3 = {
8064
8064
  if (!sourceFile) {
8065
8065
  return;
8066
8066
  }
8067
+ const sourceCode = context.sourceCode;
8067
8068
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8068
8069
  if (!classDeclaration) {
8069
- const sourceCode = context.sourceCode;
8070
8070
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8071
8071
  context.report({
8072
8072
  node: firstToken ?? sourceCode.ast,
@@ -8084,21 +8084,25 @@ var rule3 = {
8084
8084
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8085
8085
  );
8086
8086
  if (sdkInterfaces.length === 0) {
8087
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8087
8088
  context.report({
8088
- loc: toReportLoc(classDeclaration),
8089
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8089
8090
  messageId: "MISSING_SDK_INTERFACE",
8090
8091
  data: { expectedInterfaceName, interfaceId }
8091
8092
  });
8092
8093
  return;
8093
8094
  }
8094
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8095
- const resolvedName = interfaceSymbol?.getName();
8096
- return resolvedName === expectedInterfaceName;
8097
- });
8095
+ const matchesExpected = sdkInterfaces.some(
8096
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8097
+ );
8098
8098
  if (!matchesExpected) {
8099
+ const firstMismatch = sdkInterfaces[0];
8100
+ if (!firstMismatch) {
8101
+ return;
8102
+ }
8099
8103
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8100
8104
  context.report({
8101
- loc: toReportLoc(classDeclaration),
8105
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8102
8106
  messageId: "WRONG_INTERFACE",
8103
8107
  data: {
8104
8108
  actualName: actualNames,
@@ -8030,9 +8030,9 @@ var rule3 = {
8030
8030
  if (!sourceFile) {
8031
8031
  return;
8032
8032
  }
8033
+ const sourceCode = context.sourceCode;
8033
8034
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8034
8035
  if (!classDeclaration) {
8035
- const sourceCode = context.sourceCode;
8036
8036
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8037
8037
  context.report({
8038
8038
  node: firstToken ?? sourceCode.ast,
@@ -8050,21 +8050,25 @@ var rule3 = {
8050
8050
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8051
8051
  );
8052
8052
  if (sdkInterfaces.length === 0) {
8053
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8053
8054
  context.report({
8054
- loc: toReportLoc(classDeclaration),
8055
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8055
8056
  messageId: "MISSING_SDK_INTERFACE",
8056
8057
  data: { expectedInterfaceName, interfaceId }
8057
8058
  });
8058
8059
  return;
8059
8060
  }
8060
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8061
- const resolvedName = interfaceSymbol?.getName();
8062
- return resolvedName === expectedInterfaceName;
8063
- });
8061
+ const matchesExpected = sdkInterfaces.some(
8062
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8063
+ );
8064
8064
  if (!matchesExpected) {
8065
+ const firstMismatch = sdkInterfaces[0];
8066
+ if (!firstMismatch) {
8067
+ return;
8068
+ }
8065
8069
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8066
8070
  context.report({
8067
- loc: toReportLoc(classDeclaration),
8071
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8068
8072
  messageId: "WRONG_INTERFACE",
8069
8073
  data: {
8070
8074
  actualName: actualNames,
@@ -8074,9 +8074,9 @@ var rule3 = {
8074
8074
  if (!sourceFile) {
8075
8075
  return;
8076
8076
  }
8077
+ const sourceCode = context.sourceCode;
8077
8078
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8078
8079
  if (!classDeclaration) {
8079
- const sourceCode = context.sourceCode;
8080
8080
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8081
8081
  context.report({
8082
8082
  node: firstToken ?? sourceCode.ast,
@@ -8094,21 +8094,25 @@ var rule3 = {
8094
8094
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8095
8095
  );
8096
8096
  if (sdkInterfaces.length === 0) {
8097
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8097
8098
  context.report({
8098
- loc: toReportLoc(classDeclaration),
8099
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8099
8100
  messageId: "MISSING_SDK_INTERFACE",
8100
8101
  data: { expectedInterfaceName, interfaceId }
8101
8102
  });
8102
8103
  return;
8103
8104
  }
8104
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8105
- const resolvedName = interfaceSymbol?.getName();
8106
- return resolvedName === expectedInterfaceName;
8107
- });
8105
+ const matchesExpected = sdkInterfaces.some(
8106
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8107
+ );
8108
8108
  if (!matchesExpected) {
8109
+ const firstMismatch = sdkInterfaces[0];
8110
+ if (!firstMismatch) {
8111
+ return;
8112
+ }
8109
8113
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8110
8114
  context.report({
8111
- loc: toReportLoc(classDeclaration),
8115
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8112
8116
  messageId: "WRONG_INTERFACE",
8113
8117
  data: {
8114
8118
  actualName: actualNames,
@@ -8040,9 +8040,9 @@ var rule3 = {
8040
8040
  if (!sourceFile) {
8041
8041
  return;
8042
8042
  }
8043
+ const sourceCode = context.sourceCode;
8043
8044
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8044
8045
  if (!classDeclaration) {
8045
- const sourceCode = context.sourceCode;
8046
8046
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8047
8047
  context.report({
8048
8048
  node: firstToken ?? sourceCode.ast,
@@ -8060,21 +8060,25 @@ var rule3 = {
8060
8060
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8061
8061
  );
8062
8062
  if (sdkInterfaces.length === 0) {
8063
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8063
8064
  context.report({
8064
- loc: toReportLoc(classDeclaration),
8065
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8065
8066
  messageId: "MISSING_SDK_INTERFACE",
8066
8067
  data: { expectedInterfaceName, interfaceId }
8067
8068
  });
8068
8069
  return;
8069
8070
  }
8070
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8071
- const resolvedName = interfaceSymbol?.getName();
8072
- return resolvedName === expectedInterfaceName;
8073
- });
8071
+ const matchesExpected = sdkInterfaces.some(
8072
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8073
+ );
8074
8074
  if (!matchesExpected) {
8075
+ const firstMismatch = sdkInterfaces[0];
8076
+ if (!firstMismatch) {
8077
+ return;
8078
+ }
8075
8079
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8076
8080
  context.report({
8077
- loc: toReportLoc(classDeclaration),
8081
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8078
8082
  messageId: "WRONG_INTERFACE",
8079
8083
  data: {
8080
8084
  actualName: actualNames,
@@ -8074,9 +8074,9 @@ var rule3 = {
8074
8074
  if (!sourceFile) {
8075
8075
  return;
8076
8076
  }
8077
+ const sourceCode = context.sourceCode;
8077
8078
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8078
8079
  if (!classDeclaration) {
8079
- const sourceCode = context.sourceCode;
8080
8080
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8081
8081
  context.report({
8082
8082
  node: firstToken ?? sourceCode.ast,
@@ -8094,21 +8094,25 @@ var rule3 = {
8094
8094
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8095
8095
  );
8096
8096
  if (sdkInterfaces.length === 0) {
8097
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8097
8098
  context.report({
8098
- loc: toReportLoc(classDeclaration),
8099
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8099
8100
  messageId: "MISSING_SDK_INTERFACE",
8100
8101
  data: { expectedInterfaceName, interfaceId }
8101
8102
  });
8102
8103
  return;
8103
8104
  }
8104
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8105
- const resolvedName = interfaceSymbol?.getName();
8106
- return resolvedName === expectedInterfaceName;
8107
- });
8105
+ const matchesExpected = sdkInterfaces.some(
8106
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8107
+ );
8108
8108
  if (!matchesExpected) {
8109
+ const firstMismatch = sdkInterfaces[0];
8110
+ if (!firstMismatch) {
8111
+ return;
8112
+ }
8109
8113
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8110
8114
  context.report({
8111
- loc: toReportLoc(classDeclaration),
8115
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8112
8116
  messageId: "WRONG_INTERFACE",
8113
8117
  data: {
8114
8118
  actualName: actualNames,
@@ -8040,9 +8040,9 @@ var rule3 = {
8040
8040
  if (!sourceFile) {
8041
8041
  return;
8042
8042
  }
8043
+ const sourceCode = context.sourceCode;
8043
8044
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8044
8045
  if (!classDeclaration) {
8045
- const sourceCode = context.sourceCode;
8046
8046
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8047
8047
  context.report({
8048
8048
  node: firstToken ?? sourceCode.ast,
@@ -8060,21 +8060,25 @@ var rule3 = {
8060
8060
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8061
8061
  );
8062
8062
  if (sdkInterfaces.length === 0) {
8063
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8063
8064
  context.report({
8064
- loc: toReportLoc(classDeclaration),
8065
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8065
8066
  messageId: "MISSING_SDK_INTERFACE",
8066
8067
  data: { expectedInterfaceName, interfaceId }
8067
8068
  });
8068
8069
  return;
8069
8070
  }
8070
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8071
- const resolvedName = interfaceSymbol?.getName();
8072
- return resolvedName === expectedInterfaceName;
8073
- });
8071
+ const matchesExpected = sdkInterfaces.some(
8072
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8073
+ );
8074
8074
  if (!matchesExpected) {
8075
+ const firstMismatch = sdkInterfaces[0];
8076
+ if (!firstMismatch) {
8077
+ return;
8078
+ }
8075
8079
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8076
8080
  context.report({
8077
- loc: toReportLoc(classDeclaration),
8081
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8078
8082
  messageId: "WRONG_INTERFACE",
8079
8083
  data: {
8080
8084
  actualName: actualNames,
@@ -7536,12 +7536,12 @@ var require_eslint_plugin_security = __commonJS({
7536
7536
  }
7537
7537
  });
7538
7538
 
7539
- // src/configs/billing.invoice_collection_setting.ts
7540
- var billing_invoice_collection_setting_exports = {};
7541
- __export(billing_invoice_collection_setting_exports, {
7542
- default: () => billing_invoice_collection_setting_default
7539
+ // src/configs/billing.invoice_collection_options.ts
7540
+ var billing_invoice_collection_options_exports = {};
7541
+ __export(billing_invoice_collection_options_exports, {
7542
+ default: () => billing_invoice_collection_options_default
7543
7543
  });
7544
- module.exports = __toCommonJS(billing_invoice_collection_setting_exports);
7544
+ module.exports = __toCommonJS(billing_invoice_collection_options_exports);
7545
7545
 
7546
7546
  // src/extension-type-config.ts
7547
7547
  var EXTENSION_SOURCE_FILES = [
@@ -8074,9 +8074,9 @@ var rule3 = {
8074
8074
  if (!sourceFile) {
8075
8075
  return;
8076
8076
  }
8077
+ const sourceCode = context.sourceCode;
8077
8078
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8078
8079
  if (!classDeclaration) {
8079
- const sourceCode = context.sourceCode;
8080
8080
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8081
8081
  context.report({
8082
8082
  node: firstToken ?? sourceCode.ast,
@@ -8094,21 +8094,25 @@ var rule3 = {
8094
8094
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8095
8095
  );
8096
8096
  if (sdkInterfaces.length === 0) {
8097
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8097
8098
  context.report({
8098
- loc: toReportLoc(classDeclaration),
8099
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8099
8100
  messageId: "MISSING_SDK_INTERFACE",
8100
8101
  data: { expectedInterfaceName, interfaceId }
8101
8102
  });
8102
8103
  return;
8103
8104
  }
8104
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8105
- const resolvedName = interfaceSymbol?.getName();
8106
- return resolvedName === expectedInterfaceName;
8107
- });
8105
+ const matchesExpected = sdkInterfaces.some(
8106
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8107
+ );
8108
8108
  if (!matchesExpected) {
8109
+ const firstMismatch = sdkInterfaces[0];
8110
+ if (!firstMismatch) {
8111
+ return;
8112
+ }
8109
8113
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8110
8114
  context.report({
8111
- loc: toReportLoc(classDeclaration),
8115
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8112
8116
  messageId: "WRONG_INTERFACE",
8113
8117
  data: {
8114
8118
  actualName: actualNames,
@@ -8248,9 +8252,9 @@ var config2 = [
8248
8252
  ];
8249
8253
  var sync_no_egress_default = config2;
8250
8254
 
8251
- // src/configs/billing.invoice_collection_setting.ts
8255
+ // src/configs/billing.invoice_collection_options.ts
8252
8256
  var config3 = createExtensionTypeConfig(
8253
- "billing.invoice_collection_setting",
8257
+ "billing.invoice_collection_options",
8254
8258
  sync_no_egress_default
8255
8259
  );
8256
- var billing_invoice_collection_setting_default = config3;
8260
+ var billing_invoice_collection_options_default = config3;
@@ -1,9 +1,9 @@
1
1
  import type { Linter } from 'eslint';
2
2
  /**
3
- * ESLint flat config for the `billing.invoice_collection_setting`
3
+ * ESLint flat config for the `billing.invoice_collection_options`
4
4
  * extension interface.
5
5
  * @public
6
6
  */
7
7
  declare const config: Linter.Config[];
8
8
  export default config;
9
- //# sourceMappingURL=billing.invoice_collection_setting.d.ts.map
9
+ //# sourceMappingURL=billing.invoice_collection_options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing.invoice_collection_options.d.ts","sourceRoot":"","sources":["../../src/configs/billing.invoice_collection_options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC;;;;GAIG;AACH,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAG1B,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -8040,9 +8040,9 @@ var rule3 = {
8040
8040
  if (!sourceFile) {
8041
8041
  return;
8042
8042
  }
8043
+ const sourceCode = context.sourceCode;
8043
8044
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8044
8045
  if (!classDeclaration) {
8045
- const sourceCode = context.sourceCode;
8046
8046
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8047
8047
  context.report({
8048
8048
  node: firstToken ?? sourceCode.ast,
@@ -8060,21 +8060,25 @@ var rule3 = {
8060
8060
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8061
8061
  );
8062
8062
  if (sdkInterfaces.length === 0) {
8063
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8063
8064
  context.report({
8064
- loc: toReportLoc(classDeclaration),
8065
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8065
8066
  messageId: "MISSING_SDK_INTERFACE",
8066
8067
  data: { expectedInterfaceName, interfaceId }
8067
8068
  });
8068
8069
  return;
8069
8070
  }
8070
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8071
- const resolvedName = interfaceSymbol?.getName();
8072
- return resolvedName === expectedInterfaceName;
8073
- });
8071
+ const matchesExpected = sdkInterfaces.some(
8072
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8073
+ );
8074
8074
  if (!matchesExpected) {
8075
+ const firstMismatch = sdkInterfaces[0];
8076
+ if (!firstMismatch) {
8077
+ return;
8078
+ }
8075
8079
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8076
8080
  context.report({
8077
- loc: toReportLoc(classDeclaration),
8081
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8078
8082
  messageId: "WRONG_INTERFACE",
8079
8083
  data: {
8080
8084
  actualName: actualNames,
@@ -8214,12 +8218,12 @@ var config2 = [
8214
8218
  ];
8215
8219
  var sync_no_egress_default = config2;
8216
8220
 
8217
- // src/configs/billing.invoice_collection_setting.ts
8221
+ // src/configs/billing.invoice_collection_options.ts
8218
8222
  var config3 = createExtensionTypeConfig(
8219
- "billing.invoice_collection_setting",
8223
+ "billing.invoice_collection_options",
8220
8224
  sync_no_egress_default
8221
8225
  );
8222
- var billing_invoice_collection_setting_default = config3;
8226
+ var billing_invoice_collection_options_default = config3;
8223
8227
  export {
8224
- billing_invoice_collection_setting_default as default
8228
+ billing_invoice_collection_options_default as default
8225
8229
  };
@@ -8074,9 +8074,9 @@ var rule3 = {
8074
8074
  if (!sourceFile) {
8075
8075
  return;
8076
8076
  }
8077
+ const sourceCode = context.sourceCode;
8077
8078
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8078
8079
  if (!classDeclaration) {
8079
- const sourceCode = context.sourceCode;
8080
8080
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8081
8081
  context.report({
8082
8082
  node: firstToken ?? sourceCode.ast,
@@ -8094,21 +8094,25 @@ var rule3 = {
8094
8094
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8095
8095
  );
8096
8096
  if (sdkInterfaces.length === 0) {
8097
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8097
8098
  context.report({
8098
- loc: toReportLoc(classDeclaration),
8099
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8099
8100
  messageId: "MISSING_SDK_INTERFACE",
8100
8101
  data: { expectedInterfaceName, interfaceId }
8101
8102
  });
8102
8103
  return;
8103
8104
  }
8104
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8105
- const resolvedName = interfaceSymbol?.getName();
8106
- return resolvedName === expectedInterfaceName;
8107
- });
8105
+ const matchesExpected = sdkInterfaces.some(
8106
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8107
+ );
8108
8108
  if (!matchesExpected) {
8109
+ const firstMismatch = sdkInterfaces[0];
8110
+ if (!firstMismatch) {
8111
+ return;
8112
+ }
8109
8113
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8110
8114
  context.report({
8111
- loc: toReportLoc(classDeclaration),
8115
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8112
8116
  messageId: "WRONG_INTERFACE",
8113
8117
  data: {
8114
8118
  actualName: actualNames,
@@ -8040,9 +8040,9 @@ var rule3 = {
8040
8040
  if (!sourceFile) {
8041
8041
  return;
8042
8042
  }
8043
+ const sourceCode = context.sourceCode;
8043
8044
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8044
8045
  if (!classDeclaration) {
8045
- const sourceCode = context.sourceCode;
8046
8046
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8047
8047
  context.report({
8048
8048
  node: firstToken ?? sourceCode.ast,
@@ -8060,21 +8060,25 @@ var rule3 = {
8060
8060
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8061
8061
  );
8062
8062
  if (sdkInterfaces.length === 0) {
8063
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8063
8064
  context.report({
8064
- loc: toReportLoc(classDeclaration),
8065
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8065
8066
  messageId: "MISSING_SDK_INTERFACE",
8066
8067
  data: { expectedInterfaceName, interfaceId }
8067
8068
  });
8068
8069
  return;
8069
8070
  }
8070
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8071
- const resolvedName = interfaceSymbol?.getName();
8072
- return resolvedName === expectedInterfaceName;
8073
- });
8071
+ const matchesExpected = sdkInterfaces.some(
8072
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8073
+ );
8074
8074
  if (!matchesExpected) {
8075
+ const firstMismatch = sdkInterfaces[0];
8076
+ if (!firstMismatch) {
8077
+ return;
8078
+ }
8075
8079
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8076
8080
  context.report({
8077
- loc: toReportLoc(classDeclaration),
8081
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8078
8082
  messageId: "WRONG_INTERFACE",
8079
8083
  data: {
8080
8084
  actualName: actualNames,
@@ -8074,9 +8074,9 @@ var rule3 = {
8074
8074
  if (!sourceFile) {
8075
8075
  return;
8076
8076
  }
8077
+ const sourceCode = context.sourceCode;
8077
8078
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8078
8079
  if (!classDeclaration) {
8079
- const sourceCode = context.sourceCode;
8080
8080
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8081
8081
  context.report({
8082
8082
  node: firstToken ?? sourceCode.ast,
@@ -8094,21 +8094,25 @@ var rule3 = {
8094
8094
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8095
8095
  );
8096
8096
  if (sdkInterfaces.length === 0) {
8097
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8097
8098
  context.report({
8098
- loc: toReportLoc(classDeclaration),
8099
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8099
8100
  messageId: "MISSING_SDK_INTERFACE",
8100
8101
  data: { expectedInterfaceName, interfaceId }
8101
8102
  });
8102
8103
  return;
8103
8104
  }
8104
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8105
- const resolvedName = interfaceSymbol?.getName();
8106
- return resolvedName === expectedInterfaceName;
8107
- });
8105
+ const matchesExpected = sdkInterfaces.some(
8106
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8107
+ );
8108
8108
  if (!matchesExpected) {
8109
+ const firstMismatch = sdkInterfaces[0];
8110
+ if (!firstMismatch) {
8111
+ return;
8112
+ }
8109
8113
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8110
8114
  context.report({
8111
- loc: toReportLoc(classDeclaration),
8115
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8112
8116
  messageId: "WRONG_INTERFACE",
8113
8117
  data: {
8114
8118
  actualName: actualNames,
@@ -8040,9 +8040,9 @@ var rule3 = {
8040
8040
  if (!sourceFile) {
8041
8041
  return;
8042
8042
  }
8043
+ const sourceCode = context.sourceCode;
8043
8044
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8044
8045
  if (!classDeclaration) {
8045
- const sourceCode = context.sourceCode;
8046
8046
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8047
8047
  context.report({
8048
8048
  node: firstToken ?? sourceCode.ast,
@@ -8060,21 +8060,25 @@ var rule3 = {
8060
8060
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8061
8061
  );
8062
8062
  if (sdkInterfaces.length === 0) {
8063
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8063
8064
  context.report({
8064
- loc: toReportLoc(classDeclaration),
8065
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8065
8066
  messageId: "MISSING_SDK_INTERFACE",
8066
8067
  data: { expectedInterfaceName, interfaceId }
8067
8068
  });
8068
8069
  return;
8069
8070
  }
8070
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8071
- const resolvedName = interfaceSymbol?.getName();
8072
- return resolvedName === expectedInterfaceName;
8073
- });
8071
+ const matchesExpected = sdkInterfaces.some(
8072
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8073
+ );
8074
8074
  if (!matchesExpected) {
8075
+ const firstMismatch = sdkInterfaces[0];
8076
+ if (!firstMismatch) {
8077
+ return;
8078
+ }
8075
8079
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8076
8080
  context.report({
8077
- loc: toReportLoc(classDeclaration),
8081
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8078
8082
  messageId: "WRONG_INTERFACE",
8079
8083
  data: {
8080
8084
  actualName: actualNames,
@@ -8074,9 +8074,9 @@ var rule3 = {
8074
8074
  if (!sourceFile) {
8075
8075
  return;
8076
8076
  }
8077
+ const sourceCode = context.sourceCode;
8077
8078
  const classDeclaration = getDefaultExportedClassDeclaration(sourceFile);
8078
8079
  if (!classDeclaration) {
8079
- const sourceCode = context.sourceCode;
8080
8080
  const firstToken = sourceCode.getFirstToken(sourceCode.ast);
8081
8081
  context.report({
8082
8082
  node: firstToken ?? sourceCode.ast,
@@ -8094,21 +8094,25 @@ var rule3 = {
8094
8094
  ({ interfaceSymbol }) => symbolMatchesExtensionInterface(checker, interfaceSymbol)
8095
8095
  );
8096
8096
  if (sdkInterfaces.length === 0) {
8097
+ const highlightNode = classDeclaration.name ?? implementedTypes[0]?.heritageType.expression;
8097
8098
  context.report({
8098
- loc: toReportLoc(classDeclaration),
8099
+ ...highlightNode ? { loc: toReportLoc(highlightNode) } : { node: sourceCode.getFirstToken(sourceCode.ast) ?? sourceCode.ast },
8099
8100
  messageId: "MISSING_SDK_INTERFACE",
8100
8101
  data: { expectedInterfaceName, interfaceId }
8101
8102
  });
8102
8103
  return;
8103
8104
  }
8104
- const matchesExpected = sdkInterfaces.some(({ interfaceSymbol }) => {
8105
- const resolvedName = interfaceSymbol?.getName();
8106
- return resolvedName === expectedInterfaceName;
8107
- });
8105
+ const matchesExpected = sdkInterfaces.some(
8106
+ ({ interfaceSymbol }) => interfaceSymbol?.getName().startsWith(expectedInterfaceName) ?? false
8107
+ );
8108
8108
  if (!matchesExpected) {
8109
+ const firstMismatch = sdkInterfaces[0];
8110
+ if (!firstMismatch) {
8111
+ return;
8112
+ }
8109
8113
  const actualNames = sdkInterfaces.map(({ interfaceSymbol }) => interfaceSymbol?.getName() ?? "(unknown)").join(", ");
8110
8114
  context.report({
8111
- loc: toReportLoc(classDeclaration),
8115
+ loc: toReportLoc(firstMismatch.heritageType.expression),
8112
8116
  messageId: "WRONG_INTERFACE",
8113
8117
  data: {
8114
8118
  actualName: actualNames,