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: setup eslint & prettier #3

Merged
merged 6 commits into from
Sep 9, 2024
Merged

chore: setup eslint & prettier #3

merged 6 commits into from
Sep 9, 2024

Conversation

0xnigir1
Copy link
Collaborator

@0xnigir1 0xnigir1 commented Sep 6, 2024

Description

  • Configuration for eslint and prettier for lint and format
  • Add pre-commit hook with lint-staged

Checklist before requesting a review

  • I have conducted a self-review of my code.
  • I have conducted a QA.

jahabeebs
jahabeebs previously approved these changes Sep 6, 2024
Copy link

@jahabeebs jahabeebs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

Copy link

@0xyaco 0xyaco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best .eslintrc.js ever, dropped a comment so we can discuss it as a team but after that is ready to go

.eslintrc.js Outdated
},
ignorePatterns: [".eslintrc.js"],
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were debating with @0xkenj1 about having explicit return types. I generally like the idea of being explicit but should we enforce it on the template though or are we going to be lenient on our base?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to me both are okay but if we're going to be explicit then makes sense to have it on, maybe just a warning to not be so strict

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @jahabeebs thoughts?

Comment on lines +20 to +21
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-floating-promises": "error",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🇹🇩

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JAJAJAJAJA i had to search the flag

.prettierrc Outdated
"<THIRD_PARTY_MODULES>",
"",
"<TYPES>^@zkchainhub",
"^@zkchainhub/(.*)$",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zkchainhub ? 🤣

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch 🙈

@0xnigir1 0xnigir1 merged commit 09b8423 into dev Sep 9, 2024
6 checks passed
@0xnigir1 0xnigir1 deleted the chore/linter-config branch September 9, 2024 20:04
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.

4 participants