[WIP] Add repo-wide ESLint config #781
Draft
+1,793
−229
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are you adding in this PR?
theme-tools
seems to only have ESLint configured for thevscode-extension
package. For better or worse, ESLint does catch a lot of legitimate issues. (Though as a side note I find it annoying that many configs, including Shopify's shared config, scream at MAXIMUM ERROR LEVEL for things that are more akin to stylistic nits — IMO it's better to differentiate between nits and errors but to still enforce consistent style in CI with--max-warnings=0
.)Anyway, I added a quick global ESLint config and squelched a bunch of the benign errors in rule overrides. It'll take further work to get everything green so we can start running this in CI, but it's already pointing out some things that look like possible errors. I'll leave them untouched for now, but it might be nice to start surfacing these lints to contributors, even just in the editor.
This is WIP because I aligned the
vscode-extension
config with the global config, but that'll cause itspretest
script to fail right now.