mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
4f488abe5c
- installation of lefthook is now in the responsibility of the developer - reasoning: the different development settings require different setups nevertheless
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
# Lefthook configuration
|
|
#
|
|
# Install lefthook with any preferred method (see https://github.com/evilmartians/lefthook?tab=readme-ov-file#install).
|
|
# example: `gem install lefthook`
|
|
#
|
|
# Add commit hooks with `lefthook install`.
|
|
#
|
|
# To override any config, create a `lefthook-local.yml` file - e.g., for changing the run command
|
|
# to be executed in a docker container context.
|
|
#
|
|
# Refer for explanation to the following link:
|
|
# https://github.com/evilmartians/lefthook/blob/master/docs/usage.md
|
|
|
|
pre-commit:
|
|
parallel: true
|
|
commands:
|
|
eslint:
|
|
root: "frontend/"
|
|
files: git diff --name-only --staged
|
|
glob: "*.{js,ts,jsx,tsx}"
|
|
run: npx eslint {staged_files}
|
|
rubocop:
|
|
files: git diff --name-only --staged
|
|
glob: "*.rb"
|
|
run: bin/dirty-rubocop --uncommitted --force-exclusion {files}
|
|
erb_lint:
|
|
files: git diff --name-only --staged
|
|
glob: "*.erb"
|
|
run: erb_lint {files}
|
|
primer-view-components-version-is-the-same-everyhwere:
|
|
files: git diff --name-only --staged
|
|
glob: "{Gemfile.lock,frontend/package.json}"
|
|
run: script/check_same_primer_view_components_version_everywhere
|