From d96c77583355db6d0312619d1b9e1bed6740fcb8 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 8 Jun 2018 17:38:29 +0200 Subject: [PATCH] enforces prettier --- lib/tasks/docker.rake | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake index 7ce9076dbc4..432d1e690f4 100644 --- a/lib/tasks/docker.rake +++ b/lib/tasks/docker.rake @@ -37,8 +37,6 @@ end desc 'Run all tests (JS and code in a standalone environment)' task 'docker:test' do begin - system("yarn install --dev") - @good = true unless ENV['SKIP_LINT'] puts "Running linters/prettyfiers" @@ -46,22 +44,22 @@ task 'docker:test' do @good &&= run_or_fail("bundle exec rubocop --parallel plugins/#{ENV["SINGLE_PLUGIN"]}") @good &&= run_or_fail("eslint --ext .es6 plugins/#{ENV['SINGLE_PLUGIN']}") - # puts "Listing prettier offenses in #{ENV['SINGLE_PLUGIN']}:" - # @good &&= run_or_fail("prettier --list-different 'plugins/#{ENV['SINGLE_PLUGIN']}/**/*.scss'") + puts "Listing prettier offenses in #{ENV['SINGLE_PLUGIN']}:" + @good &&= run_or_fail("prettier --list-different 'plugins/#{ENV['SINGLE_PLUGIN']}/**/*.scss'") else @good &&= run_or_fail("bundle exec rubocop --parallel") unless ENV["SKIP_CORE"] @good &&= run_or_fail("eslint app/assets/javascripts test/javascripts") unless ENV["SKIP_CORE"] @good &&= run_or_fail("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('prettier --list-different "app/assets/stylesheets/**/*.scss"') - # end + unless ENV["SKIP_CORE"] + puts "Listing prettier offenses in core:" + @good &&= run_or_fail('prettier --list-different "app/assets/stylesheets/**/*.scss"') + end - # unless ENV["SKIP_PLUGINS"] - # puts "Listing prettier offenses in plugins:" - # @good &&= run_or_fail('prettier --list-different "plugins/**/*.scss"') - # end + unless ENV["SKIP_PLUGINS"] + puts "Listing prettier offenses in plugins:" + @good &&= run_or_fail('prettier --list-different "plugins/**/*.scss"') + end end end