Skip to content

#2092 skip lint-staged on feature branches; CI lints on PRs - #2674

Open
Pushpak731 wants to merge 2 commits into
Accenture:mainfrom
Pushpak731:chore/lint-on-pr-only
Open

Pushpak731 wants to merge 2 commits into
Accenture:mainfrom
Pushpak731:chore/lint-on-pr-only

Conversation

@Pushpak731

Copy link
Copy Markdown

PR details

What changes did you make? (Give an overview)

The pre-commit hook now only runs lint-staged when committing directly to main. On feature branches it prints a skip message instead, since the PR's CI (npm run lint in code-test.yml) already runs the same lint on every PR — keeping local commits fast without losing coverage. The TypeScript d.ts generation still runs on every commit.

Further details (optional)

The hook checks git branch --show-current and skips lint-staged for any branch other than main/master. This means:

  • Feature branches: fast local commits, CI catches lint issues on the PR
  • Direct commits to main: lint-staged still runs as a safety net
  • TypeScript d.ts generation: unchanged, runs on all commits

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • test scripts updated — N/A (CI workflow change)
  • Wiki updated (if applicable) — N/A

The pre-commit hook now only runs lint-staged when committing directly
to main. On feature branches it prints a skip message instead, since
the PR's CI (npm run lint in code-test.yml) already catches lint
issues. TypeScript d.ts generation still runs on every commit.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 15:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

[TASK] run tslint for creation of files not before each commit but only on merge requests to main

2 participants