From 62d7990b9bb30cf33ed87017c5c633d1cccc75c2 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Thu, 28 Feb 2019 19:57:34 +0100 Subject: Ran standardrb --fix on the whole codebase Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_. --- lib/tasks/yarn.rake | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'lib/tasks/yarn.rake') diff --git a/lib/tasks/yarn.rake b/lib/tasks/yarn.rake index 2ac88a039e7..8d2a1339821 100644 --- a/lib/tasks/yarn.rake +++ b/lib/tasks/yarn.rake @@ -1,40 +1,39 @@ - namespace :yarn do - desc 'Ensure Yarn is installed' + desc "Ensure Yarn is installed" task :available do - unless system('yarn --version', out: File::NULL) + unless system("yarn --version", out: File::NULL) warn( - 'Error: Yarn executable was not detected in the system.'.color(:red), - 'Download Yarn at https://yarnpkg.com/en/docs/install'.color(:green) + "Error: Yarn executable was not detected in the system.".color(:red), + "Download Yarn at https://yarnpkg.com/en/docs/install".color(:green) ) abort end end - desc 'Ensure Node dependencies are installed' - task check: ['yarn:available'] do - unless system('yarn check --ignore-engines', out: File::NULL) + desc "Ensure Node dependencies are installed" + task check: ["yarn:available"] do + unless system("yarn check --ignore-engines", out: File::NULL) warn( - 'Error: You have unmet dependencies. (`yarn check` command failed)'.color(:red), - 'Run `yarn install` to install missing modules.'.color(:green) + "Error: You have unmet dependencies. (`yarn check` command failed)".color(:red), + "Run `yarn install` to install missing modules.".color(:green) ) abort end end - desc 'Install Node dependencies with Yarn' - task install: ['yarn:available'] do - unless system('yarn install --pure-lockfile --ignore-engines') - abort 'Error: Unable to install node modules.'.color(:red) + desc "Install Node dependencies with Yarn" + task install: ["yarn:available"] do + unless system("yarn install --pure-lockfile --ignore-engines") + abort "Error: Unable to install node modules.".color(:red) end end - desc 'Remove Node dependencies' + desc "Remove Node dependencies" task :clobber do - warn 'Purging ./node_modules directory'.color(:red) - FileUtils.rm_rf 'node_modules' + warn "Purging ./node_modules directory".color(:red) + FileUtils.rm_rf "node_modules" end end -desc 'Install Node dependencies with Yarn' -task yarn: ['yarn:install'] +desc "Install Node dependencies with Yarn" +task yarn: ["yarn:install"] -- cgit v1.2.1