debian-mirror-gitlab/lefthook.yml

41 lines
1.7 KiB
YAML
Raw Normal View History

2021-01-29 00:20:46 +05:30
pre-push:
parallel: true
commands:
danger:
run: bundle exec danger dry_run
eslint:
tags: frontend style
2021-04-17 20:07:23 +05:30
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-01-29 00:20:46 +05:30
glob: "*.{js,vue}"
2021-04-17 20:07:23 +05:30
run: yarn run lint:eslint {files}
2021-01-29 00:20:46 +05:30
haml-lint:
tags: view haml style
2021-04-17 20:07:23 +05:30
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-01-29 00:20:46 +05:30
glob: "*.html.haml"
run: bundle exec haml-lint --config .haml-lint.yml {files}
markdownlint:
tags: documentation style
2021-04-17 20:07:23 +05:30
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-11 19:13:27 +05:30
glob: "doc/*.md"
2021-01-29 00:20:46 +05:30
run: yarn markdownlint {files}
2021-04-17 20:07:23 +05:30
stylelint:
2021-01-29 00:20:46 +05:30
tags: stylesheet css style
2021-04-17 20:07:23 +05:30
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-01-29 00:20:46 +05:30
glob: "*.scss{,.css}"
2021-04-17 20:07:23 +05:30
run: yarn stylelint -q {files}
prettier:
tags: frontend style
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob: "*.{js,vue,graphql}"
run: yarn run prettier --check {files}
2021-01-29 00:20:46 +05:30
rubocop:
tags: backend style
2021-04-17 20:07:23 +05:30
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-01-29 00:20:46 +05:30
glob: "*.rb"
run: bundle exec rubocop --parallel --force-exclusion {files}
vale: # Requires Vale: https://docs.gitlab.com/ee/development/documentation/#install-linters
tags: documentation style
2021-04-17 20:07:23 +05:30
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-11 19:13:27 +05:30
glob: "doc/*.md"
2021-01-29 00:20:46 +05:30
run: if command -v vale 2> /dev/null; then vale --config .vale.ini --minAlertLevel error {files}; else echo "Vale not found. Install Vale"; fi