DEV: Fix files targetted by Lefthook Prettier

The previous glob rule was skipping files in sub-subfolders, causing discrepancies between Travis and Jenkins results.
This commit is contained in:
Penar Musaraj 2019-11-15 09:21:51 -05:00
parent 676a1c8749
commit 16cdf94001

View File

@ -2,23 +2,23 @@ pre-commit:
parallel: true parallel: true
commands: commands:
rubocop: rubocop:
glob: '*.rb' glob: "*.rb"
run: bundle exec rubocop {staged_files} run: bundle exec rubocop {staged_files}
eslint: eslint:
glob: '*.{js,es6}' glob: "*.{js,es6}"
run: yarn eslint --ext .es6 -f compact {staged_files} run: yarn eslint --ext .es6 -f compact {staged_files}
yaml-syntax: yaml-syntax:
glob: '*.{yaml,yml}' glob: "*.{yaml,yml}"
run: bundle exec yaml-lint {staged_files} run: bundle exec yaml-lint {staged_files}
commands: &commands commands: &commands
bundle-install: bundle-install:
files: git diff --name-only HEAD master files: git diff --name-only HEAD master
glob: '{Gemfile,Gemfile.lock,*.gemspec}' glob: "{Gemfile,Gemfile.lock,*.gemspec}"
run: bundle install run: bundle install
yarn-install: yarn-install:
files: git diff --name-only HEAD master files: git diff --name-only HEAD master
glob: '{package.json,yarn.lock}' glob: "{package.json,yarn.lock}"
run: yarn install run: yarn install
post-checkout: post-checkout:
@ -36,7 +36,8 @@ lints:
rubocop: rubocop:
run: bundle exec rubocop --parallel run: bundle exec rubocop --parallel
prettier: 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: eslint-assets:
run: yarn eslint --ext .es6 app/assets/javascripts run: yarn eslint --ext .es6 app/assets/javascripts
eslint-test: eslint-test: