[GH-ISSUE #1002] Speed up ESLint precommit checks #304

Closed
opened 2026-02-26 18:46:24 +03:00 by kerem · 3 comments
Owner

Originally created by @Mythie on GitHub (Mar 8, 2024).
Original GitHub issue: https://github.com/documenso/documenso/issues/1002

Originally assigned to: @rohit-saluja on GitHub.

Describe the improvement you are suggesting in detail

Currently it takes quite a while for ESLint to run during our precommit checks, we've attempted doing this with lint-staged with the following:

  • The entire repository being linted
  • Just the staged files being linted in one command e.g. eslint --fix a.ts b.ts c.ts
  • Just the staged files being linted in multiple commands e.g. eslint --fix a.ts && eslint --fix b.ts

Additional Information & Alternatives (optional)

This super long precommit time can scare off contributors and makes general development painful since you can be stuck on the linting stage for seconds up to minutes depending on the size of your commit (yes I know keep commits small, I'm sorry!).

Improving this will be a net benefit to DX for both contributors and the Documenso team.

Do you want to work on this improvement?

No

Please check the boxes that apply to this improvement suggestion.

  • I have searched the existing issues and improvement suggestions to avoid duplication.
  • I have provided a clear description of the improvement being suggested.
  • I have explained the rationale behind this improvement.
  • I have included any relevant technical details or design suggestions.
  • I understand that this is a suggestion and that there is no guarantee of implementation.
Originally created by @Mythie on GitHub (Mar 8, 2024). Original GitHub issue: https://github.com/documenso/documenso/issues/1002 Originally assigned to: @rohit-saluja on GitHub. ### Describe the improvement you are suggesting in detail Currently it takes quite a while for ESLint to run during our precommit checks, we've attempted doing this with lint-staged with the following: - The entire repository being linted - Just the staged files being linted in one command e.g. `eslint --fix a.ts b.ts c.ts` - Just the staged files being linted in multiple commands e.g. `eslint --fix a.ts && eslint --fix b.ts` ### Additional Information & Alternatives (optional) This super long precommit time can scare off contributors and makes general development painful since you can be stuck on the linting stage for seconds up to minutes depending on the size of your commit (yes I know keep commits small, I'm sorry!). Improving this will be a net benefit to DX for both contributors and the Documenso team. ### Do you want to work on this improvement? No ### Please check the boxes that apply to this improvement suggestion. - [X] I have searched the existing issues and improvement suggestions to avoid duplication. - [X] I have provided a clear description of the improvement being suggested. - [X] I have explained the rationale behind this improvement. - [X] I have included any relevant technical details or design suggestions. - [X] I understand that this is a suggestion and that there is no guarantee of implementation.
Author
Owner

@rohit-saluja commented on GitHub (Mar 8, 2024):

can you assign me this issue.

<!-- gh-comment-id:1985013204 --> @rohit-saluja commented on GitHub (Mar 8, 2024): can you assign me this issue.
Author
Owner

@Mythie commented on GitHub (Mar 8, 2024):

Assigned, best of luck! We aren't expecting it to be incredibly fast but right now it's painstakingly slow.

I'd suggest creating like 30-50 dummy .ts files with content to test the slowdown during precommit 😄

<!-- gh-comment-id:1985016597 --> @Mythie commented on GitHub (Mar 8, 2024): Assigned, best of luck! We aren't expecting it to be incredibly fast but right now it's painstakingly slow. I'd suggest creating like 30-50 dummy `.ts` files with content to test the slowdown during precommit 😄
Author
Owner

@rohit-saluja commented on GitHub (Mar 8, 2024):

created a pr for this

<!-- gh-comment-id:1985952112 --> @rohit-saluja commented on GitHub (Mar 8, 2024): created a [pr](https://github.com/documenso/documenso/pull/1008) for this
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#304
No description provided.