DEV: yarn exec doesn't do what I think it does.

This commit is contained in:
Guo Xiang Tan 2018-08-30 15:55:36 +08:00
parent a928bf4300
commit 492b6dc306
2 changed files with 13 additions and 13 deletions

View File

@ -76,11 +76,11 @@ script:
if [ '$RUN_LINT' == '1' ]; then
bundle exec rubocop --parallel && \
bundle exec danger && \
yarn exec eslint --ext .es6 app/assets/javascripts && \
yarn exec eslint --ext .es6 test/javascripts && \
yarn exec eslint --ext .es6 plugins/**/assets/javascripts && \
yarn exec eslint --ext .es6 plugins/**/test/javascripts && \
yarn exec eslint app/assets/javascripts test/javascripts
yarn eslint --ext .es6 app/assets/javascripts && \
yarn eslint --ext .es6 test/javascripts && \
yarn eslint --ext .es6 plugins/**/assets/javascripts && \
yarn eslint --ext .es6 plugins/**/test/javascripts && \
yarn eslint app/assets/javascripts test/javascripts
else
if [ '$QUNIT_RUN' == '1' ]; then
bundle exec rake qunit:test['500000'] && \

View File

@ -40,28 +40,28 @@ task 'docker:test' do
@good = true
unless ENV['SKIP_LINT']
puts "Running linters/prettyfiers"
puts "eslint #{`yarn exec eslint -v`}"
puts "prettier #{`yarn exec prettier -v`}"
puts "eslint #{`yarn eslint -v`}"
puts "prettier #{`yarn prettier -v`}"
if ENV["SINGLE_PLUGIN"]
@good &&= run_or_fail("bundle exec rubocop --parallel plugins/#{ENV["SINGLE_PLUGIN"]}")
@good &&= run_or_fail("yarn exec eslint --ext .es6 plugins/#{ENV['SINGLE_PLUGIN']}")
@good &&= run_or_fail("yarn eslint --ext .es6 plugins/#{ENV['SINGLE_PLUGIN']}")
puts "Listing prettier offenses in #{ENV['SINGLE_PLUGIN']}:"
@good &&= run_or_fail("yarn exec prettier --list-different 'plugins/#{ENV['SINGLE_PLUGIN']}/**/*.scss' 'plugins/#{ENV['SINGLE_PLUGIN']}/**/*.es6'")
@good &&= run_or_fail("yarn prettier --list-different 'plugins/#{ENV['SINGLE_PLUGIN']}/**/*.scss' 'plugins/#{ENV['SINGLE_PLUGIN']}/**/*.es6'")
else
@good &&= run_or_fail("bundle exec rubocop --parallel") unless ENV["SKIP_CORE"]
@good &&= run_or_fail("yarn exec eslint app/assets/javascripts test/javascripts") unless ENV["SKIP_CORE"]
@good &&= run_or_fail("yarn exec eslint --ext .es6 app/assets/javascripts test/javascripts plugins") unless ENV["SKIP_PLUGINS"]
@good &&= run_or_fail("yarn eslint app/assets/javascripts test/javascripts") unless ENV["SKIP_CORE"]
@good &&= run_or_fail("yarn eslint --ext .es6 app/assets/javascripts test/javascripts plugins") unless ENV["SKIP_PLUGINS"]
unless ENV["SKIP_CORE"]
puts "Listing prettier offenses in core:"
@good &&= run_or_fail('yarn exec prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.es6" "test/javascripts/**/*.es6"')
@good &&= run_or_fail('yarn prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.es6" "test/javascripts/**/*.es6"')
end
unless ENV["SKIP_PLUGINS"]
puts "Listing prettier offenses in plugins:"
@good &&= run_or_fail('yarn exec prettier --list-different "plugins/**/*.scss" "plugins/**/*.es6"')
@good &&= run_or_fail('yarn prettier --list-different "plugins/**/*.scss" "plugins/**/*.es6"')
end
end
end