This package contains an eslint plugin that enforces some default rules for using EUI.
@elastic/eslint-plugin-euias a dev dependency
plugin:@elastic/eui/recommendedin your eslint config
<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.
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:
npm version patch|minor|major
- commit version bump
npm publishin this directory
- push the version bump upstream