al-quran_kaios/rake/tasks/format.rake

27 lines
535 B
Ruby
Raw Normal View History

2024-10-17 04:57:13 +02:00
# frozen_string_literal: true
namespace :format do
desc "Run rubocop (Ruby)"
task :rubocop do
sh "bundle exec rubocop --config etc/rubocop.yml"
end
desc "Apply rubocop (Ruby)"
task :"rubocop:apply" do
sh "bundle exec rubocop -A --config etc/rubocop.yml"
end
desc "Run eslint (TypeScript)"
task :eslint do
sh "npm run eslint"
end
desc "Run eslint (TypeScript)"
task :"eslint:apply" do
sh "npm run eslint:apply"
end
end
desc "Run all formats"
task format: ["format:rubocop", "format:eslint"]