Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoelh committed Aug 15, 2023
1 parent f36bf75 commit 73883f4
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lib/rules/no-uninstalled-addons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,9 @@ export = createStorybookRule({
},
ExportDefaultDeclaration: function (node) {
const meta = getMetaObjectExpression(node, context)
if (!meta) {
return null
}

const addonsProp = meta.properties.find(
(prop): prop is TSESTree.Property =>
isProperty(prop) && isIdentifier(prop.key) && prop.key.name === 'addons'
)
if (!meta) return null

if (addonsProp && addonsProp.value && isArrayExpression(addonsProp.value)) {
reportUninstalledAddons(addonsProp.value)
}
findAddonsPropAndReport(meta)
},
ExportNamedDeclaration: function (node) {
const addonsProp =
Expand Down

0 comments on commit 73883f4

Please sign in to comment.