Migrate eslint-plugin-hydrogen
from hydrogen 1 to h2
#521
cartogram
started this conversation in
Ideas + Feature Requests
Replies: 2 comments 3 replies
-
We probably don't want |
Beta Was this translation helpful? Give feedback.
2 replies
-
Remix has it's own eslint config: Are there any specific config rules from hydrogen v1 that we want in hydrogen v2? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In version 1 of hydrogen we had an
eslint-plugin
package that served to provide the following:1. Common Configurations
These level-set on common ESLint rules to enforce Shopify’s JavaScript best practices, and catch common issues when using Hydrogen. We maintain these so merchants don't need to worry about the undifferentiated setup common to every Hydrogen app. ESLint is a the standard tool for JavaScript and TypeScript, and providing either a base config or plugin is common among almost every other (meta-)framework.
We provide 3 possible configurations:
The Hydrogen configuration excludes suggested third-party plugins, but keeps the custom Hydrogen rules with their suggested defaults.
The TypeScript configuration is a partial set of overrides to augment the recommended or Hydrogen configurations.
2. Custom Rules
We also provided a set of custom rules that only made sense in projects using Hydrogen v1.
Moving forward in V2
I suggest we move this package with both the configurations and custom rules into the new H2 repo. We will want to take another look at the configurations now that we are using Remix, and also remove all of the custom rules except
prefer-image-component
.Does anyone see a problem with this or see value in taking another direction? Happy to hear any/all feedback 🙂
Beta Was this translation helpful? Give feedback.
All reactions