@shopify/eslint-plugin-hydrogen

1.0.0-1.0.0-alpha.16.0 • Public • Published

eslint-plugin-hydrogen

Hydrogen provides an ESLint plugin to enforce Shopify’s javascript best practices and catch common issues when using React Server components in Hydrogen apps.

Rule Description Configurations Fixable
hydrogen/no-state-in-server-components Prevents useState and useReducer in React Server Components recommended

Installation

You'll first need to install ESLint in addition to this module.

yarn add --dev eslint eslint-plugin-hydrogen

Usage

Hydrogen’s ESLint configurations come bundled in this package. In order to use them, you simply extend the relevant configuration in your project’s .eslintrc.js.

Configurations

Recommended

This plugin exports a recommended configuration.

To enable this configuration use the extends property in your .eslintrc.js config file:

{
  extends: 'plugin:hydrogen/recommended',
}

Readme

Keywords

none

Package Sidebar

Install

npm i @shopify/eslint-plugin-hydrogen

Weekly Downloads

1

Version

1.0.0-1.0.0-alpha.16.0

License

MIT

Unpacked Size

25.9 kB

Total Files

29

Last publish

Collaborators

  • jaimie.rockburn
  • blittle
  • shopify-admin
  • maryharte
  • crisfmb
  • pmoloney89
  • netlohan
  • st999999
  • justin-irl
  • megswim
  • wcandillon
  • nathanpjf
  • shopify-dep
  • goodforonefare
  • lemonmade
  • vsumner
  • wizardlyhel
  • antoine.grant
  • tsov
  • andyw8-shopify
  • henrytao
  • hannachen
  • vividviolet
  • bpscott