1.0.0-1.0.0-alpha.16.0 • Published 3 years ago

@shopify/eslint-plugin-hydrogen v1.0.0-1.0.0-alpha.16.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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.

RuleDescriptionConfigurationsFixable
hydrogen/no-state-in-server-componentsPrevents useState and useReducer in React Server Componentsrecommended

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',
}