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

Add support for automatic code formatting and liniting #46

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

steekam
Copy link
Contributor

@steekam steekam commented Jul 22, 2022

Closes issue #13

Changes

  • Installed dev dependencies: prettier, eslint tools and config dependencies related to the project.
  • Uses a pre-commit hook to apply formatting changes with prettier and linting with eslint.
  • ESLint auto fixes what it can then displays errors and warnings with suggestions.
  • Prettier rules are specified in .prettierrc.json.
  • ESLint config is in .eslintrc.json which has react and typescript specific support.
  • The current rules and config are based on the respective tool's recommendation but the project maintainers can update the config as they see fit.
  • I have done the initial run of the tools in the components and pages directories, hence the huge line number diffs.

Note
I am not well versed with TypeScript so some of the fixes I have done based on eslint errors may not be ideal.

Resources

@steekam steekam marked this pull request as ready for review July 22, 2022 13:13
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.

None yet

1 participant