6 Commits

Author SHA1 Message Date
Sojan Jose
8d92862ba9 fix: Update pre-commit hook to handle staged deleted files (#11357)
The pre-commit hook was failing when there were staged deleted files
because:
- It was using 'ls' to filter files, which fails when they don't exist
in the filesystem
- Deleted files are still in Git's staging area but not in the
filesystem

Changes made:
1. Added a check to filter files with 'test -f' before passing to
Rubocop
2. Added the same check for staging Rubocop's changes
3. Added '|| true' to prevent errors when no files match the filters

This ensures the pre-commit hook completes successfully even when files
are staged for deletion.
2025-04-24 16:54:53 +05:30
Chatwoot Bot
4397ee7d3b chore: Update translations, add pnpm sync:i18n command (#10893)
Added a command to sync files in the locale/*/ folder. Run `pnpm
sync:i18n` would copy index.js in `dashboard/locale/en` to every other
folder `dashboard/locale/*/`

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
2025-02-12 17:43:46 -08:00
Shivam Mishra
42f6621afb feat: Vite + vue 3 💚 (#10047)
Fixes https://github.com/chatwoot/chatwoot/issues/8436
Fixes https://github.com/chatwoot/chatwoot/issues/9767
Fixes https://github.com/chatwoot/chatwoot/issues/10156
Fixes https://github.com/chatwoot/chatwoot/issues/6031
Fixes https://github.com/chatwoot/chatwoot/issues/5696
Fixes https://github.com/chatwoot/chatwoot/issues/9250
Fixes https://github.com/chatwoot/chatwoot/issues/9762

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2024-10-02 00:36:30 -07:00
Shivam Mishra
76650c86cd chore: add --force-exclusion option (#6535)
The pre-commit hook would format event those files excluded in the config. This is because the files were passed as args instead of the linter running on the entire project. When this happens, the exclude is not respect.

The --force-exclusion flag instructs our machine overlords to force exlucde files specified in the configuration Exclude even if they are explicitly passed as arguments.
2023-02-24 17:15:11 +05:30
Shivam Mishra
e1e836cb59 chore: Run linters on staged files only (#6347)
- This PR speeds up the pre-commit hook to lint only the staged files instead of running it across all files as it does now.
2023-01-31 17:29:34 +05:30
Muhsin Keloth
9306b725d8 chore: Fix pre-commit hooks (#3525)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-12-08 17:32:00 -08:00