From 723a6d9e55cc3893b3b6e6bf58283256edd977ee Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 5 Jan 2023 00:14:54 -0300 Subject: [PATCH] Add "lint:eslint:fix" task --- Rakefile.rb | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Rakefile.rb b/Rakefile.rb index aa074f2f1..01bbc57be 100644 --- a/Rakefile.rb +++ b/Rakefile.rb @@ -86,16 +86,23 @@ namespace :env do end end -namespace :linter do - desc "Run the Ruby linter" - task :ruby do +namespace :lint do + desc "Run rubocop (Ruby)" + task :rubocop do sh "bundle exec rubocop lib/ src/" end - desc "Run the TypeScript linter" - task :typescript do + desc "Run eslint (TypeScript)" + task :eslint do sh "npm run eslint" end + + namespace :eslint do + desc "Run eslint with the --fix option (TypeScript)" + task :fix do + sh "npm run eslint-autofix" + end + end end task lint: ["linter:ruby", "linter:typescript"] task default: "deploy:local"