2019-07-02 17:29:52 +08:00
|
|
|
pre-commit:
|
|
|
|
parallel: true
|
|
|
|
commands:
|
|
|
|
rubocop:
|
2019-11-15 22:21:51 +08:00
|
|
|
glob: "*.rb"
|
2020-04-29 13:48:38 +08:00
|
|
|
run: bundle exec rubocop --parallel {staged_files}
|
2020-03-03 03:30:23 +08:00
|
|
|
prettier:
|
|
|
|
glob: "*.{js,es6}"
|
2020-08-20 18:36:52 +08:00
|
|
|
include: "app/assets/javascripts|test/javascripts"
|
2021-01-28 00:25:48 +08:00
|
|
|
run: yarn pprettier --list-different {staged_files}
|
2019-07-02 17:29:52 +08:00
|
|
|
eslint-es6:
|
2019-11-15 22:21:51 +08:00
|
|
|
glob: "*.es6"
|
2020-08-20 18:36:52 +08:00
|
|
|
include: "app/assets/javascripts|test/javascripts"
|
2019-07-02 17:29:52 +08:00
|
|
|
run: yarn eslint --ext .es6 -f compact {staged_files}
|
2020-03-13 01:29:55 +08:00
|
|
|
eslint-js:
|
2020-03-03 03:30:23 +08:00
|
|
|
glob: "*.js"
|
2020-08-20 18:36:52 +08:00
|
|
|
include: "app/assets/javascripts|test/javascripts"
|
2019-07-02 17:29:52 +08:00
|
|
|
run: yarn eslint -f compact {staged_files}
|
2020-02-07 00:26:06 +08:00
|
|
|
ember-template-lint:
|
2020-04-15 13:57:28 +08:00
|
|
|
run: yarn run ember-template-lint {staged_files}
|
2019-07-02 17:29:52 +08:00
|
|
|
yaml-syntax:
|
2019-11-15 22:21:51 +08:00
|
|
|
glob: "*.{yaml,yml}"
|
2019-12-31 11:07:44 +08:00
|
|
|
# database.yml is an erb file not a yaml file
|
|
|
|
exclude: "database.yml"
|
2019-07-02 17:29:52 +08:00
|
|
|
run: bundle exec yaml-lint {staged_files}
|
2020-06-04 03:35:08 +08:00
|
|
|
i18n-lint:
|
|
|
|
glob: "**/{client,server}.en.yml"
|
|
|
|
run: bundle exec ruby script/i18n_lint.rb {staged_files}
|
2019-07-02 17:29:52 +08:00
|
|
|
|
|
|
|
commands: &commands
|
|
|
|
bundle-install:
|
2021-07-20 16:18:55 +08:00
|
|
|
files: git diff --name-only HEAD main
|
2019-11-15 22:21:51 +08:00
|
|
|
glob: "{Gemfile,Gemfile.lock,*.gemspec}"
|
2019-07-02 17:29:52 +08:00
|
|
|
run: bundle install
|
|
|
|
yarn-install:
|
2021-07-20 16:18:55 +08:00
|
|
|
files: git diff --name-only HEAD main
|
2019-11-15 22:21:51 +08:00
|
|
|
glob: "{package.json,yarn.lock}"
|
2019-07-02 17:29:52 +08:00
|
|
|
run: yarn install
|
|
|
|
|
|
|
|
post-checkout:
|
|
|
|
commands: *commands
|
|
|
|
|
|
|
|
post-merge:
|
|
|
|
commands: *commands
|
|
|
|
|
|
|
|
post-rewrite:
|
|
|
|
commands: *commands
|
|
|
|
|
|
|
|
lints:
|
|
|
|
parallel: true
|
|
|
|
commands:
|
|
|
|
rubocop:
|
|
|
|
run: bundle exec rubocop --parallel
|
|
|
|
prettier:
|
2020-08-20 18:36:52 +08:00
|
|
|
glob: "*.{js,es6}"
|
|
|
|
include: "app/assets/javascripts|test/javascripts"
|
2021-01-28 00:25:48 +08:00
|
|
|
run: yarn pprettier --list-different {all_files}
|
2019-07-02 17:29:52 +08:00
|
|
|
eslint-assets-es6:
|
|
|
|
run: yarn eslint --ext .es6 app/assets/javascripts
|
|
|
|
eslint-assets-js:
|
|
|
|
run: yarn eslint app/assets/javascripts
|
2020-08-20 18:36:52 +08:00
|
|
|
eslint-test-es6:
|
2019-07-02 17:29:52 +08:00
|
|
|
run: yarn eslint --ext .es6 test/javascripts
|
2020-08-20 18:36:52 +08:00
|
|
|
eslint-test-js:
|
|
|
|
run: yarn eslint test/javascripts
|
2019-07-02 17:29:52 +08:00
|
|
|
eslint-plugins-assets:
|
2020-06-04 03:35:08 +08:00
|
|
|
run: yarn eslint --global I18n --ext .es6 plugins/**/assets/javascripts
|
2019-07-02 17:29:52 +08:00
|
|
|
eslint-plugins-test:
|
2020-06-04 03:35:08 +08:00
|
|
|
run: yarn eslint --global I18n --ext .es6 plugins/**/test/javascripts
|
2019-07-02 17:29:52 +08:00
|
|
|
eslint-assets-tests:
|
|
|
|
run: yarn eslint app/assets/javascripts test/javascripts
|
2020-06-04 03:35:08 +08:00
|
|
|
i18n-lint:
|
|
|
|
glob: "**/{client,server}.en.yml"
|
|
|
|
run: bundle exec ruby script/i18n_lint.rb {all_files}
|