Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: lint #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

chore: lint #2

wants to merge 1 commit into from

Conversation

ckohen
Copy link

@ckohen ckohen commented Feb 14, 2024

  • Adds eslint + prettier config and linted all files.
  • Adds gh workflow to lint on PR and Push
  • Adds precommit hook to lint staged files and ensure conventional commit is used for commit names
  • Adds recommend vscode extensions and appropriate settings for linting
  • Moves the esbuild script to typescript because linting that file informs you that // @ts-check is not a good way to check js files
  • Replaces esuild-plugin-replace (lol) with esbuild-plugin-version-injector for a better version insertion scheme that lint is happier about.

There are code changes in this PR. Most of them are to satisfy lint and are no functionally different. However, a few are bug fixes that showed themselves to be bugs via linting.

I like this ruleset and use it all over the place (also happens to be what we use in discord.js) but if there is code styling that you do not like, I am happy to change those rules before merging this. There are a couple of places where I disabled rules for a chunk of lines because it was obvious that they were split up on purpose for readability and the "more readable" linted version was not actually.

P.s. Sorry about the diff, not much to do about that, and better to do it now than later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant