Skip to content

Commit

Permalink
major rewrite of test code, fixed a couple of missing cases. awaiting…
Browse files Browse the repository at this point in the history
… more testing.
  • Loading branch information
vwillyams committed Oct 23, 2024
1 parent b420cb5 commit cf6a63f
Show file tree
Hide file tree
Showing 2 changed files with 152 additions and 307 deletions.
5 changes: 4 additions & 1 deletion lib/rules/no-multi-comp.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ module.exports = {
if (node.declaration.type === 'ClassDeclaration') {
return node.declaration.id.name;
}
if (node.declaration.type === 'Identifier') {
return node.declaration.name;
}
if (node.declaration.declarations) {
const declarator = node.declaration.declarations.find((declaration) => validIdentifiers.has(declaration.init.type));
if (declarator) {
Expand Down Expand Up @@ -109,7 +112,7 @@ module.exports = {
* @returns {boolean} True if the component is exported or exportOnly is false
*/
function isPrivate(component) {
return ignoreInternal && exportedComponents.has(findComponentIdentifierFromComponent(component));
return ignoreInternal && !exportedComponents.has(findComponentIdentifierFromComponent(component));
}

const rule = {
Expand Down
Loading

0 comments on commit cf6a63f

Please sign in to comment.