@blumintinc/eslint-plugin-blumint 1.5.1 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -59,7 +59,7 @@ const no_jsx_in_hooks_1 = require("./rules/no-jsx-in-hooks");
59
59
  module.exports = {
60
60
  meta: {
61
61
  name: '@blumintinc/eslint-plugin-blumint',
62
- version: '1.5.1',
62
+ version: '1.5.3',
63
63
  },
64
64
  parseOptions: {
65
65
  ecmaVersion: 2020,
@@ -137,15 +137,16 @@ exports.enforceExportedFunctionTypes = (0, createRule_1.createRule)({
137
137
  function isTypeExported(typeName) {
138
138
  const sourceCode = context.getSourceCode();
139
139
  const program = sourceCode.ast;
140
- // Check for imported types
141
- const importedTypes = program.body.filter((node) => {
140
+ // Check for imported types first - if found, return true immediately
141
+ // since imported types are already available to consumers
142
+ const hasImportedType = program.body.some((node) => {
142
143
  if (node.type === utils_1.AST_NODE_TYPES.ImportDeclaration) {
143
144
  return node.specifiers.some((specifier) => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier &&
144
145
  specifier.local.name === typeName);
145
146
  }
146
147
  return false;
147
148
  });
148
- if (importedTypes.length > 0) {
149
+ if (hasImportedType) {
149
150
  return true;
150
151
  }
151
152
  // Check for exported type declarations