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

@elastic/eslint-plugin-eui

Package Overview
Dependencies
Maintainers
62
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic/eslint-plugin-eui

This package contains an eslint plugin that enforces some default rules for using EUI.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
62
Created
Source

@elastic/eslint-plugin-eui

This package contains an eslint plugin that enforces some default rules for using EUI.

Setup

  1. install @elastic/eslint-plugin-eui as a dev dependency
  2. extend plugin:@elastic/eui/recommended in your eslint config

Rules

@elastic/eui/href-or-on-click

<EuiButton /> should either be a button or a link, for a11y purposes. When given an href the button behaves as a link, otherwise an onClick handler is expected and it will behave as a button.

In some cases it makes sense to disable this rule locally, such as when cmd+click should open the link in a new tab, but a standard click should use the history.pushState() API to change the URL without triggering a full page load.

Publishing

This package is published separately from the rest of EUI, as required by eslint. The code is not transpiled, so make sure to use require() statements rather than import, and once the code is updated run:

  1. npm version patch|minor|major
  2. commit version bump
  3. npm publish in this directory
  4. push the version bump upstream

FAQs

Package last updated on 15 Aug 2019

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