Skip to content

Commit cf6a63f

Browse files
committed
major rewrite of test code, fixed a couple of missing cases. awaiting more testing.
1 parent b420cb5 commit cf6a63f

File tree

2 files changed

+152
-307
lines changed

2 files changed

+152
-307
lines changed

lib/rules/no-multi-comp.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ module.exports = {
6565
if (node.declaration.type === 'ClassDeclaration') {
6666
return node.declaration.id.name;
6767
}
68+
if (node.declaration.type === 'Identifier') {
69+
return node.declaration.name;
70+
}
6871
if (node.declaration.declarations) {
6972
const declarator = node.declaration.declarations.find((declaration) => validIdentifiers.has(declaration.init.type));
7073
if (declarator) {
@@ -109,7 +112,7 @@ module.exports = {
109112
* @returns {boolean} True if the component is exported or exportOnly is false
110113
*/
111114
function isPrivate(component) {
112-
return ignoreInternal && exportedComponents.has(findComponentIdentifierFromComponent(component));
115+
return ignoreInternal && !exportedComponents.has(findComponentIdentifierFromComponent(component));
113116
}
114117

115118
const rule = {

0 commit comments

Comments
 (0)