lint: add eslint config, fix lint issues, enforce clean lint status pre-commit and in CI #64
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.
Similar to #63 where an auto-formatter was added, this adds an automated lint check
It is based on #63 and will be re-based to remove those commits if/when 63 has progress but I wanted to post this now for discussion.
There are no functional changes in this PR, it is all minor code tweaks that do not have semantic differences
Also similar to #63 I want to be clear that I have opinions on code lint just like everyone, and they don't matter. What matters is that the project has a consistent one and it's enforced so contributors know what's okay and what isn't, so it follows that getting it merged is more important than any specific rule.
Given that, I took the eslint config from the main github actions repo, then altered the rules to fit what I thought were the preferences here. If any given rule is wrong, I'll alter the config and re-push until it's good
That said it appeared there were 4 real issues which I fixed in single commits
Once everything passed, I added the lint check to the CI lint workflow and the husky pre-commit hook.
I won't post other PRs using commits from #62 until these are resolved, since the review is otherwise impossible with all the formatting change