Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bjervis/eslint-plugin-redundant-stack

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bjervis/eslint-plugin-redundant-stack

Warn on <Stack> elements that only have a single child

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eslint-plugin-redundant-stack

Designed to work with projects using braid-design-system, this plugin detects when a Stack element is redundant.

Braid Stacks are used to manage the vertical spacing between elements. If you have one a single element inside a Stack (or none), there's nothing for it to be spaced from, and so you don't need to include a Stack.

Usually this comes about because you did need a Stack originally, but refactored away the other child elements, not realising there was only one left.

Usage

yarn add -D @bjervis/eslint-plugin-redundant-stack

Then in your eslint config

plugins: ['@bjervis/redundant-stack'],
rules: {
  '@bjervis/redundant-stack/no-redundant-stack': 2,
},

If you're using Braid, you're probably also using sku, so:

// sku.config.js
module.exports = {
  ...,
  dangerouslySetESLintConfig: (skuConfig) => ({
    ...skuConfig,
    plugins: ['@bjervis/redundant-stack'],
    rules: {
      '@bjervis/redundant-stack/no-redundant-stack': 2,
    },
  }),
}

FAQs

Package last updated on 24 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc