process: protect main and add linting, formatting and commit hooks for the backend

Open
#59 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
eslint, express, git, javascript, node.js

Research direction

Start by locating the backend package configuration and existing CI workflow; the issue says the React app already uses CRA's ESLint preset, but does not name backend files or test commands. Review how the backend is built and tested before estimating the lint, format, hook, and pull request template changes. Done means main has the requested protection and backend checks and hooks run as described.

Written by the indexing model from the issue text.

Description

enhancement

On 9 July five pull requests (#45-#49) were opened from one branch and each was merged a minute or two after its commit, so none could be reviewed; #45 changed 239 files. The backend also has no ESLint, Prettier or Git hooks (only the React app has CRA's ESLint preset).

Suggested fix

  • Branch protection on main: pull request required, required status checks (tests), dismiss stale approvals, include administrators.
  • ESLint + Prettier for the backend, run by husky + lint-staged on pre-commit and in CI; a commit-msg hook for Conventional Commits (most history already follows it).
  • A .github/PULL_REQUEST_TEMPLATE.md asking for the linked issue and how it was tested.

Found while reviewing StudyNotion with Claude Code.

Dominant language
JavaScript
Stars
23
Forks
8
Avg merge
11m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from khemssharma/StudyNotion

All issues in khemssharma/StudyNotion

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.