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

issue-293 introduced eslint + husky + lint-staged and fixed major errors #295

Merged
merged 2 commits into from
Aug 6, 2023

Conversation

MartinSunal
Copy link
Collaborator

  • eslint is used as a linter
  • husky is configured as pre-commit hook which will trigger lint-staged in server dir
  • lint-staged is configured to run eslint on staged files
  • if eslint finds an error then commit is not created until it is not fixed
  • all detected eslint errors are fixed except "no-async-promise-executor" which was disabled. At some point all code erroring on "no-async-promise-executor" should be fixed and the rule enabled.
  • there is another .eslintrc.json in server/controllers which disables "no-unused-vars" rule because controller's fn signatures were generated so we ignore unused vars.

Fixes #293

@PrathibaJee
Copy link
Collaborator

Reviewer is @DanaSunal

- eslint is used as a linter
- husky is configured as pre-commit hook which will trigger lint-staged in server dir
- lint-staged is configured to run eslint on staged files
- if eslint finds an error then commit is not created until it is not fixed
- all detected eslint errors are fixed except "no-async-promise-executor" which was disabled.
At some point all code erroring on "no-async-promise-executor" should be fixed and the rule enabled.
- there is another .eslintrc.json in server/controllers which disables "no-unused-vars" rule because
controller's fn signatures were generated so we ignore unused vars.

Fixes openBackhaul#293

Signed-off-by: Martin Sunal <martin.sunal@paxet.io>
Signed-off-by: Dana Sunalova <dana@paxet.io>
@DanaSunal DanaSunal merged commit 373cbdc into openBackhaul:develop Aug 6, 2023
2 checks passed
@DanaSunal DanaSunal deleted the issue-293 branch August 6, 2023 10:39
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.

Introduce linter for improving code quality
3 participants