al-quran.reflectslight.io/rake/tasks/format.rake

30 lines
622 B
Ruby
Raw Normal View History

2023-07-25 19:18:15 +02:00
# frozen_string_literal: true
2024-05-02 15:46:40 +02:00
namespace :format do
2024-09-16 23:02:46 +02:00
desc "Apply all formats"
task apply: %i[format:rubocop:apply format:eslint:apply]
2023-07-25 19:18:15 +02:00
desc "Run rubocop (Ruby)"
task :rubocop do
2024-08-22 20:39:55 +02:00
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"
2023-07-25 19:18:15 +02:00
end
desc "Run eslint (TypeScript)"
task :eslint do
sh "npm run eslint"
end
2024-08-22 20:39:55 +02:00
desc "Run eslint (TypeScript)"
task :"eslint:apply" do
sh "npm run eslint:apply"
end
2023-07-25 19:18:15 +02:00
end
2024-05-02 15:46:40 +02:00
desc "Run all formats"
2024-06-09 21:51:35 +02:00
task format: ["format:rubocop", "format:eslint"]