Socket
Socket
Sign inDemoInstall

eslint-plugin-storybook

Package Overview
Dependencies
130
Maintainers
2
Versions
91
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.0 to 0.6.1--canary.29d633d.0

9

dist/rules/no-uninstalled-addons.js

@@ -41,4 +41,7 @@ "use strict";

const isAddonInstalled = (addon, installedAddons) => {
// cleanup /register or /preset from registered addon
const addonName = addon.replace(/\/register$/, '').replace(/\/preset$/, '');
// cleanup /register or /preset + file extension from registered addon
const addonName = addon
.replace(/\.[mc]?js$/, '')
.replace(/\/register$/, '')
.replace(/\/preset$/, '');
return installedAddons.includes(addonName);

@@ -48,2 +51,4 @@ };

const result = addons
// remove local addons (e.g. ./my-addon/register.js)
.filter((addon) => !addon.startsWith('.'))
.filter((addon) => !isAddonInstalled(addon, installedSbAddons))

@@ -50,0 +55,0 @@ .map((addon) => ({ name: addon }));

{
"name": "eslint-plugin-storybook",
"version": "0.6.0",
"version": "0.6.1--canary.29d633d.0",
"description": "Best practice rules for Storybook",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc