hydrogen/packages/eslint-plugin
2021-11-10 12:19:42 +09:00
..
.github feat: eslint-remove-plugin-shopify 2021-11-05 04:35:13 +01:00
docs feat: eslint-remove-plugin-shopify 2021-11-05 04:35:13 +01:00
src fix: various eslint config issues 2021-11-08 15:42:02 +01:00
CHANGELOG.md v0.6.2 2021-11-10 12:19:42 +09:00
jest.config.js feat: initial commit 2021-11-04 15:22:30 -07:00
package.json v0.6.2 2021-11-10 12:19:42 +09:00
README.md feat: eslint-remove-plugin-shopify 2021-11-05 04:35:13 +01:00
tsconfig.json feat: initial commit 2021-11-04 15:22:30 -07:00

eslint-plugin-hydrogen

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

Configurations

This plugin exports a recommended configuration.

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

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

Hydrogen

This plugin exports a hydrogen configuration. Unlike the recommended configuration, this excludes suggested third-party plugins and configurations. Instead, it enables only the hydrogen rules with their suggested defaults.

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

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

Contributing

If you've come here to help contribute Thank you ❤️ Take a look at the contributing docs to get getting started.

Installation

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

yarn add --dev eslint eslint-plugin-hydrogen

Usage

Hydrogens ESLint configurations come bundled in this package. To use them you must extend the relevant configuration in your projects .eslintrc.js.