Skip to content

Commit

Permalink
DEV: Fix files targetted by Lefthook Prettier
Browse files Browse the repository at this point in the history
The previous glob rule was skipping files in sub-subfolders, causing discrepancies between Travis and Jenkins results.
  • Loading branch information
pmusaraj committed Nov 15, 2019
1 parent 676a1c8 commit 16cdf94
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lefthook.yml
Expand Up @@ -2,23 +2,23 @@ pre-commit:
parallel: true
commands:
rubocop:
glob: '*.rb'
glob: "*.rb"
run: bundle exec rubocop {staged_files}
eslint:
glob: '*.{js,es6}'
glob: "*.{js,es6}"
run: yarn eslint --ext .es6 -f compact {staged_files}
yaml-syntax:
glob: '*.{yaml,yml}'
glob: "*.{yaml,yml}"
run: bundle exec yaml-lint {staged_files}

commands: &commands
bundle-install:
files: git diff --name-only HEAD master
glob: '{Gemfile,Gemfile.lock,*.gemspec}'
glob: "{Gemfile,Gemfile.lock,*.gemspec}"
run: bundle install
yarn-install:
files: git diff --name-only HEAD master
glob: '{package.json,yarn.lock}'
glob: "{package.json,yarn.lock}"
run: yarn install

post-checkout:
Expand All @@ -36,7 +36,8 @@ lints:
rubocop:
run: bundle exec rubocop --parallel
prettier:
run: yarn prettier --list-different app/assets/stylesheets/**/*.scss app/assets/javascripts/**/*.es6 test/javascripts/**/*.es6
glob: "{app/assets/stylesheets/**/*.scss,app/assets/javascripts/**/*.es6,test/javascripts/**/*.es6}"
run: yarn prettier --list-different {all_files}
eslint-assets:
run: yarn eslint --ext .es6 app/assets/javascripts
eslint-test:
Expand Down

0 comments on commit 16cdf94

Please sign in to comment.