summaryrefslogtreecommitdiff
path: root/lefthook.yml
blob: 54bbdf87e5327bcff136d23610fe1fcb642a3220 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
pre-push:
  parallel: true
  commands:
    danger:
      run: bundle exec danger dry_run
    eslint:
      tags: frontend style
      files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD
      glob: "*.{js,vue}"
      run: yarn eslint --cache --max-warnings 0 --report-unused-disable-directives {files}
    haml-lint:
      tags: view haml style
      files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD
      glob: "*.html.haml"
      run: bundle exec haml-lint --config .haml-lint.yml {files}
    scss-lint:
      tags: stylesheet css style
      files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD
      glob: "*.scss.css"
      exclude: "app/assets/stylesheets/pages/emojis.scss"
      run: bundle exec scss-lint --config .scss-lint.yml {files}
    rubocop:
      tags: backend style
      files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD
      glob: "*.rb"
      run: bundle exec rubocop --parallel --force-exclusion {files}